What Is pluck?
pluck is a local Rust daemon built by the hunhee98 project that replaces cat and grep as the default retrieval layer for AI agents. pluck is one of the best AI Coding Agents tools for developers using Claude Code, Cursor, and Codex, and the README claims 84-88% fewer tokens on code reads plus 0.07 ms warm search by gating every number through benchmarks/baseline.json.
Its job is narrow and useful: expose symbol-aware code search and reading over the Model Context Protocol (MCP) so agents can ask for the right chunk instead of slurping whole files. That makes pluck a better fit than raw shell reads when context window waste matters and the repo is large enough to punish naive file access.
Quick Overview
| Attribute | Details |
|---|---|
| Type | AI Coding Agents |
| Best For | Developers using Claude Code, Cursor, and Codex |
| Language/Stack | Rust, Tree-sitter, MCP, BM25F, model2vec-style embeddings |
| License | MIT |
| GitHub Stars | N/A in scraped page |
| Pricing | Open-Source |
| Last Release | N/A in scraped page |
Who Should Use pluck?
- Agent-heavy developers who want their coding assistant to read symbols, not whole files, and who care about token spend per task.
- Platform and infra teams maintaining medium to large repos where repeated
cat,grep, andrgcalls burn context and slow reviews. - Indie hackers shipping with Claude Code or Cursor who need a single retrieval policy that works across repos without hand-tuned scripts.
- Teams with log-heavy CI that want
pluck.digestto compress noisy build output while preserving the actual error lines and stack traces.
Not ideal for:
- Pure shell workflows where humans already know the exact file and line range they need.
- Binary-heavy repos where AST chunking is not useful and byte-level reads matter more than retrieval semantics.
- Teams unwilling to wire MCP into their agent runtime, because pluck only pays off when the agent actually routes reads through it.
Key Features of pluck
- AST-level chunking — pluck slices source files with Tree-sitter, so search and read operations operate on syntax-aware units instead of arbitrary line spans. That matters for languages with dense symbol trees like TypeScript, Rust, Python, and Go.
- MCP-native transport — pluck exposes retrieval through Model Context Protocol tools, which lets an agent call
mcp__pluck__read,mcp__pluck__search, and related actions without special-case shell glue. That is the main reason it fits Claude Code, Cursor, and Codex workflows. - Hybrid ranking — pluck combines BM25F over symbol, signature, and content fields with a semantic rerank pass using a model2vec-style lookup. The README names
potion-code-16M, which is about 60 MB on disk and avoids transformer inference at runtime. - Session deduplication — repeated chunks can be replaced with a one-token placeholder like
[already-shown: ...], which reduces repeated context cost when the agent keeps rediscovering the same code paths. This is especially relevant during refactors and large debugging sessions. - Lossless default behavior — pluck keeps original bytes intact and makes lossy modes opt-in, so type information, comments, and exact code structure stay available unless the agent intentionally asks for a filtered view. That is safer than tools that truncate or paraphrase by default.
- Raw fallback on every tool — every command has a
--rawmode that behaves like the traditional shell equivalent byte-for-byte. That means pluck can be the first retrieval choice without becoming a hard dependency for uncommon cases. - Log compression via digesting —
pluck.digestshrinks long CI or build logs while keeping failure signals intact. The README claims 71% shorter CI logs, which makes it useful when you need to paste logs into an agent without flooding the context window.
pluck vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| pluck | MCP-native code retrieval for AI agents | AST-aware chunking, session dedup, and raw fallback | Open-Source |
| ripgrep | Fast text search in terminals | Extremely fast regex search, but no agent-facing retrieval policy | Free |
| cat / sed / grep | Manual shell inspection | Ubiquitous Unix primitives, but zero context management | Free |
| Brainstorm MCP | MCP-based reasoning and planning workflows | Better for ideation and orchestration than repo-local retrieval | Open-Source |
Pick ripgrep when you already know the exact string and only need a fast terminal scan. Pick cat or sed when you are doing one-off human inspection and do not need symbol-aware chunking.
Pick pluck when the agent itself is the consumer and context discipline matters more than raw bytes-per-second. If your workflow is broader than retrieval, pair pluck with OpenSwarm for multi-agent execution or Claude Code Canvas for agentic editing flows that still benefit from pluck-first reads.
How pluck Works
pluck works by turning source files into symbol-aware AST chunks, then ranking those chunks with a two-stage retrieval pipeline. The first stage uses BM25F across symbol names, signatures, and body text, while the second stage uses semantic similarity to rescue queries that describe intent rather than exact identifiers. That design makes payment flow useful even when the repo never uses those exact words.
The architecture is intentionally local. The README describes a Rust runtime plus a lightweight embedding model, potion-code-16M, so search can stay fast without paying the overhead of transformer inference inside the loop. The result is a retrieval engine that behaves more like a code-aware index than a general-purpose chat layer.
# start the daemon for a repository
pluckd --repo .
# ask for a symbol-aware read
pluck symbol validate_token
# search conceptually, then inspect impact
pluck search "auth token expiry"
pluck impact validate_token
The example above starts the daemon, resolves a specific symbol, and then expands the investigation to callers and related chunks. In practice, that means the agent can move from broad concept search to exact code bodies without repeatedly re-reading the same file slices.
pluck also uses a fallback-first safety model. If the indexed repo cannot answer a request, the --raw path gives the exact shell-equivalent output, so agents never lose access to byte-perfect reads. That is a pragmatic design choice for mixed environments where some files are source, some are logs, and some are outside the index boundary.
Pros and Cons of pluck
Pros:
- Cuts context waste aggressively — the README claims 84-88% fewer tokens on code reads, which is a real win for large repositories and long debugging sessions.
- MCP integration is first-class — pluck is designed around agent tool calls, not retrofitted onto shell commands.
- Syntax-aware retrieval — Tree-sitter chunking keeps functions, methods, and imports in meaningful units.
- Strong search quality — BM25F plus semantic reranking handles both exact symbols and intent-based queries.
- Low-friction fallback —
--rawpreserves exact shell behavior when precision matters more than abstraction. - Log handling is practical —
pluck.digestreduces CI noise while preserving the signal you need to fix builds.
Cons:
- Requires MCP wiring — pluck is most valuable only after the agent is configured to use it first.
- Best on source code, not everything — binary assets and byte-exact shell pipelines still need traditional tools.
- Indexing overhead exists — AST chunking and search indexing add setup cost compared with typing
grep. - Smaller ecosystem than generic search tools — terminal users who want one universal command may find the workflow opinionated.
- Quality depends on repo structure — deeply dynamic codebases or non-standard file layouts can reduce the benefit of symbol-aware chunking.
Getting Started with pluck
A good first setup is to install both the daemon and CLI, then register the MCP server for your agent. The README shows Cargo and Homebrew paths, and it also includes target-specific bootstrap commands for Claude Code, Codex, and Cursor.
# install from crates.io
cargo install pluck-mcp pluck-cli
# or install via Homebrew
brew tap hunhee98/pluck && brew install pluck
# initialize for an agent
pluck init --target claude --mode aggressive
After installation, pluck should be registered as an MCP server named pluck, with project-scoped config preferred when the agent supports it. The next step is to verify that the agent calls mcp__pluck__read or mcp__pluck__search before falling back to cat, grep, or built-in file reads.
If you are onboarding a team, the most important configuration step is policy, not installation. Tell the agent to use pluck first for in-repo reads, then reserve Bash for binaries, paths outside the repo, and byte-exact operations that pluck cannot safely abstract.
Verdict
pluck is the strongest option for AI-assisted code retrieval when your team lives inside Claude Code, Cursor, or Codex and wants fewer wasted tokens on repo reads. Its biggest strength is AST-aware, MCP-native retrieval with exact-byte fallback; the main caveat is that you only get value after routing the agent through it. Use it if retrieval cost and context hygiene matter.



