SuperAPI AI Directory

pluck

Coding & development

View repository

Updated 10-15 21:36

About this skill

Pluck — MCP-native Code Retrieval Engine

Local Rust daemon that provides symbol-aware code reading and search for AI agents. Exposes tools via the MCP protocol.

Core advantages

  • 84-88% token savings: smart outline replaces cat on the entire file
  • Session deduplication: already-sent code blocks use a 1-token placeholder
  • Hybrid search: BM25F + static embedding (potion-code-16M)
  • AST chunking: Tree-sitter syntax-aware, chunk granularity down to function/class
  • 100% capability guaranteed: every tool has --raw fallback

MCP tools

Tool Purpose Parameters
read Smart outline + on-demand expansion path, raw?, lines?
search BM25 + semantic hybrid search query, top_k?, compact?
grep Regex search (ripgrep wrapper) pattern, args?, cwd?
symbol Precise function body extraction name
peek Function signature + callers name
expand Expand function body + N-hop callees name, hop?
digest Log compression 71% input, format?
impact Call chain analysis name, depth?
deps Forward/reverse import graph path, reverse?
plan Task → relevant code recommendation task, top_k?

Usage patterns

Prefer pluck

# 读文件 → 用 pluck.read 代替 cat
mcp__pluck__read path="src/auth/login.ts"

# 搜索代码 → 用 pluck.search 代替 rg/grep
mcp__pluck__search query="auth token validation"

# 找函数 → 用 pluck.symbol 代替 rg + cat
mcp__pluck__symbol name="validate_token"

# 看调用链 → 用 pluck.impact
mcp__pluck__impact name="validate_token" depth=3

# 分析依赖 → 用 pluck.deps
mcp__pluck__deps path="src/auth/login.ts"

Fallback rules

When pluck tools fail or are not applicable (binary files, paths outside the repo), fall back to:

  • rg search
  • read tool to read
  • fd find files

CLI usage

# 初始化(Claude Code)
pluck init --target claude --mode aggressive

# 初始化(Cursor)
pluck init --target cursor --mode strong

# 手动启动 daemon
pluckd --repo /path/to/repo

Environment variables

Variable Description
PLUCK_DISABLE_EMBEDDINGS=1 Disable semantic search, BM25 only
RUST_LOG=debug Debug logging

Configuration

MCP server configuration (~/.claude.json):

{
  "pluck": {
    "command": "pluckd",
    "args": ["--repo", "."],
    "env": {}
  }
}

Requirements

  • Rust 1.75+
  • Tree-sitter grammars are downloaded automatically
  • First launch requires indexing the repo (may take a few seconds for large repos)

Links