Probe MCP
AST-aware code search: the agent gets whole functions and classes instead of line fragments, with no indexing and no model calls
- 740 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Reads files in the chosen directory and passes the found fragments to the model context
- In `agent` mode with `--allow-edit` and `--enable-bash` it changes code and runs shell commands
- The `install.sh` and `install.ps1` scripts are downloaded from the main branch and run at once
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/probeDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads files in the chosen directory and passes the found fragments to the model context
- In `agent` mode with `--allow-edit` and `--enable-bash` it changes code and runs shell commands
- The `install.sh` and `install.ps1` scripts are downloaded from the main branch and run at once
This is third-party code. Review the repository files before installing.
What it does
Probe searches code as structure, not as text. It combines ripgrep speed with tree-sitter parsing and returns a whole function, class or struct. Queries use Elasticsearch syntax: `AND`, `OR`, `NOT`, quoted phrases and filters such as `ext:rs` or `lang:python`. Results are ranked with BM25, TF-IDF or a mix, and the `--max-tokens` flag sets the answer budget. No prior indexing and no embedding model are needed, and the search runs locally. There are two ways to attach Probe to an agent. The `mcp` mode exposes four tools: `search`, `query` for AST pattern matching, `extract` to cut a block by line number or symbol name, and `symbols` listing a file's symbols. The `agent --mcp` mode puts a built-in agent in front of them, which builds queries itself and reasons over the findings. It reuses Claude Code or Codex authorization or an Anthropic, OpenAI or Google key. The same functions work in a terminal: `probe search`, `probe extract`, `probe query` and one-shot questions with `probe agent`. The `--allow-edit` flag lets the agent edit code, and `--enable-bash` lets it run shell commands.
Who it is for. For developers whose Claude Code, Cursor or Codex burn many steps on grep across a large repository and cut functions in the middle.
Good fit when
- The repository has hundreds of thousands of lines and the agent must find all authentication logic with one `authentication AND login` query
- You need a function's code by symbol name or line: `probe extract src/main.rs:42`
- You need structural pattern search, for example all Rust functions returning `Result`, through `probe query`
- You want local search with no vector database and no embedding service that returns the same answer every time
- You must explore an unfamiliar codebase or review code without letting the agent edit files
Not a fit when
- You need meaning-based search where no query word appears in the code: Probe matches words, so the model has to rephrase the query
- Your language is outside the supported list: Rust, JavaScript, TypeScript, Python, Go, C, C++, Java, Ruby, PHP, Swift, Solidity, Crystal, C#, Bash, QML and markup
- The repository is small and plain `grep` with file reads is enough for the agent
- You want an agent for multi-file edits with undo: Probe's built-in agent only reads until you turn on `--allow-edit`
Example request
Use Probe to find all authentication logic in this repository and show whole functionsMCP
- Transport
- stdio
- Authentication
- not required
Environment variables
ANTHROPIC_API_KEYsecret- Anthropic key for the `agent` mode. Not needed when the agent reuses Claude Code authorization.
OPENAI_API_KEYsecret- OpenAI key for the `agent` mode.
GOOGLE_API_KEYsecret- Google key for the `agent` mode.
FORCE_PROVIDER- Forces a provider, for example `anthropic`.
Limitations
- Search is lexical. The agent has to supply synonyms itself by listing them with `OR`.
- The `agent` mode needs model access: Claude Code or Codex authorization, or a key in `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` or `GOOGLE_API_KEY`. The `mcp` mode calls no model.
- The `agent` mode with an external model sends retrieved code to that provider.
- `npm install -g @probelabs/probe` downloads a binary. The `install.sh` and `install.ps1` scripts run a script from the repository, so read them before running.
How to disable. Remove the `probe` block from the agent's MCP configuration and restart it. `npm uninstall -g @probelabs/probe` removes a global install. A run through `npx` leaves nothing but the npm cache.
FAQ
How do I connect Probe to Claude Code?
Add an MCP entry with the `npx` command and the arguments `-y @probelabs/probe@latest mcp`. That gives the agent the `search`, `query`, `extract` and `symbols` tools. For Probe's built-in agent, replace `mcp` with `agent --mcp` and it reuses Claude Code authorization.
How is Probe different from grep and ripgrep?
Probe parses code with a tree-sitter tree and returns the whole block, while `grep` returns lines. Speed is comparable because ripgrep runs inside. On top it adds BM25 ranking and a `--max-tokens` budget.
Does Probe need an index or embeddings?
No. Probe works with no indexing and no embedding model, results appear at once and are reproducible: the same query gives the same answer. Code stays on the machine unless you turn on the built-in agent with an external model.
How do I get a function's code by name?
Run `probe extract <file>#<symbol>` or give a line: `probe extract src/main.rs:42`. Over MCP the `extract` tool does the same. `symbols` lists a file's symbols.
How do I stop the Probe agent from changing files?
Turn nothing on: code editing is off without the `--allow-edit` flag, and shell commands are closed without `--enable-bash`. The `mcp` mode with its four search tools never changes files.
Discussion
No questions or reviews yet.
Related
MCP serversFast semantic code search for agents: returns the exact snippets instead of reading whole files and spends far fewer tokens
Context Engine: code search and memory for an agent
Context Engine
A skill that teaches an agent to query the Context Engine code index and symbol graph before reading files directly
Source search ranks matches using code structure and gives agents relevant snippets without a separate search index.
Local search and MCP server for agents: one Rust binary that indexes code, docs and logs
Local code index for agents: the MCP tool map searches by meaning and structure, and code never leaves your machine
codesearch searches code across several repositories with hybrid retrieval and runs fully offline, without a GPU or Docker.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Probe (this card) | no | not required | 740 | |
| code-index-mcp | no | not required | 162 | builds a project index in advance, while Probe searches with no indexing |
| ast-grep | no | 16,589 | a CLI for structural rewrites by pattern, while Probe focuses on search and context for the agent | |
| Serena | no | not required | 31,335 | works through language servers and can edit symbols, while Probe only reads code |
README in short
The README opens by comparing Probe with grep and embedding-based tools, then shows four ways to run it: the agent over MCP, raw MCP tools, a CLI agent and direct commands. It continues with a feature table, a Node.js SDK section, LLM Script, install methods, the language list and environment variables.