Your coding agent reads less code to find the right file.
Nexus-MCP is a local MCP server for Claude Code, Codex, Cursor and any MCP client. The agent asks one question in plain words and gets the code back, instead of a tour of grep and file reads. Same answers, fewer tokens.
uvx --python 3.12 nexus-mcp-ci setup
Finds your MCP clients and asks before it writes. Not sure yet? Measure it on your own code first, free and offline.
- Runs on your machine
- No API keys
- MIT licence
- downloads
95% fewer tokens and 9× faster search, median of 10 repos in 10 languages. Pick a language:
Grep and Read
26,720 tokens108 msright file first 20%
Nexus-MCP
1,388 tokens23 msright file first 93%
pallets/flask, 83 files, 30 questions, median per question.
Grep and Read
16,520 tokens159 msright file first 43%
Nexus-MCP
1,286 tokens25 msright file first 83%
vitejs/vite, 429 files, 30 questions, median per question.
Grep and Read
25,634 tokens564 msright file first 37%
Nexus-MCP
1,251 tokens34 msright file first 67%
webpack/webpack, 822 files, 30 questions, median per question.
Grep and Read
48,176 tokens201 msright file first 23%
Nexus-MCP
1,241 tokens31 msright file first 87%
apache/commons-lang, 264 files, 30 questions, median per question.
Grep and Read
14,004 tokens154 msright file first 23%
Nexus-MCP
1,547 tokens25 msright file first 73%
JamesNK/Newtonsoft.Json, 242 files, 30 questions, median per question.
Grep and Read
13,479 tokens712 msright file first 50%
Nexus-MCP
1,086 tokens39 msright file first 83%
laravel/framework, 1,751 files, 30 questions, median per question.
Grep and Read
19,768 tokens1,851 msright file first 43%
Nexus-MCP
1,243 tokens88 msright file first 80%
chromium/chromium, 3,641 files, 30 questions, median per question.
Grep and Read
41,034 tokens600 msright file first 40%
Nexus-MCP
1,195 tokens24 msright file first 83%
prometheus/prometheus, 201 files, 30 questions, median per question.
Grep and Read
37,139 tokens331 msright file first 40%
Nexus-MCP
988 tokens34 msright file first 87%
redis/redis, 229 files, 30 questions, median per question.
Grep and Read
21,138 tokens215 msright file first 33%
Nexus-MCP
830 tokens27 msright file first 93%
tokio-rs/tokio, 381 files, 30 questions, median per question.
Measured on 12 open-source repos
Each repo is pinned to one commit. The baseline is the agent's own Grep and Read, with the same model, prompt and tools. Losses are shown, not hidden.
95% fewer tokens to reach the right file, median of 10 repos (89% to 97%).
9× faster search than Grep and Read, median (5× to 25×).
8 of 11 repos cost less per task in live Claude Code runs, with 64 of 66 tasks correct against 61.
Find the right file offline check, no LLM
| Language | Repo | Right file first | Tokens to the right file | Search time | |||
|---|---|---|---|---|---|---|---|
| Grep | Nexus | Grep | Nexus | Grep | Nexus | ||
| Python | pallets/ | 20% | 93% | 26,720 | 1,388 | 108 ms | 23 ms |
| TypeScript | vitejs/ | 43% | 83% | 16,520 | 1,286 | 159 ms | 25 ms |
| JavaScript | webpack/ | 37% | 67% | 25,634 | 1,251 | 564 ms | 34 ms |
| Java | apache/ | 23% | 87% | 48,176 | 1,241 | 201 ms | 31 ms |
| C# | JamesNK/ | 23% | 73% | 14,004 | 1,547 | 154 ms | 25 ms |
| PHP | laravel/ | 50% | 83% | 13,479 | 1,086 | 712 ms | 39 ms |
| C++ | chromium/ | 43% | 80% | 19,768 | 1,243 | 1,851 ms | 88 ms |
| Go | prometheus/ | 40% | 83% | 41,034 | 1,195 | 600 ms | 24 ms |
| C | redis/ | 40% | 87% | 37,139 | 988 | 331 ms | 34 ms |
| Rust | tokio-rs/ | 33% | 93% | 21,138 | 830 | 215 ms | 27 ms |
Answer the question live Claude Code runs, 6 tasks × 3 runs, median per task
| Language | Repo | Tokens per task | Cost per task | Turns | Correct | ||||
|---|---|---|---|---|---|---|---|---|---|
| Grep | Nexus | Grep | Nexus | Grep | Nexus | Grep | Nexus | ||
| Python | home-assistant/ | 65,990 | 42,458−36% | $0.050 | $0.037−27% | 7 | 3 | 6/6 | 6/6 |
| Python | django/ | 45,102 | 41,916−7% | $0.048 | $0.035−26% | 5.5 | 2.5 | 5/6 | 6/6 |
| TypeScript | vitejs/ | 69,790 | 52,411−25% | $0.059 | $0.046−22% | 5.5 | 4 | 6/6 | 6/6 |
| JavaScript | webpack/ | 100,320 | 74,638−26% | $0.077 | $0.068−11% | 6 | 4.5 | 6/6 | 6/6 |
| Java | apache/ | 50,448 | 32,862−35% | $0.044 | $0.022−49% | 4.5 | 2 | 6/6 | 6/6 |
| C# | JamesNK/ | 41,929 | 42,139+1% | $0.030 | $0.030+1% | 3 | 2.5 | 6/6 | 6/6 |
| PHP | laravel/ | 52,919 | 51,994−2% | $0.051 | $0.039−24% | 5 | 3 | 5/6 | 5/6 |
| C++ | chromium/ | 70,495 | 60,622−14% | $0.065 | $0.055−16% | 6.5 | 4.5 | 6/6 | 6/6 |
| Go | prometheus/ | 52,014 | 45,214−13% | $0.047 | $0.037−22% | 4.5 | 2.5 | 5/6 | 6/6 |
| C | redis/ | 41,752 | 50,578+21% | $0.031 | $0.030−3% | 3.5 | 3 | 6/6 | 6/6 |
| Rust | tokio-rs/ | 41,188 | 61,816+50% | $0.029 | $0.041+42% | 3.5 | 4.5 | 4/6 | 5/6 |
Not there yet: C (redis/redis, +21% tokens, build 2.2.2+e5a9d9a) and Rust (tokio-rs/tokio, +50% tokens, build 2.2.2+0430f01). These runs are older; a rerun on the current build is pending. Each row is the latest run of that repo. The same code can vary by about 20% in cost with 3 runs per task (measured 2026-10-28). Every number, the build of each row and the method.
How it works
-
Index once
The first call parses your code with tree-sitter and ast-grep, embeds each function and class with a local model, and stores it in
.nexus/. A file watcher keeps the index current after each save. -
Ask in plain words
searchcombines meaning and keywords. Its top results carry their whole code, so the agent does not open the file again. -
Follow the structure
find_symbolreturns the code of several names in one call, with callers and callees.graphgives the blast radius before a change.
# "Where do we retry failed charges?"
search("how failed charges are retried")
billing/retry.py:42 schedule_retry() whole code
billing/webhooks.py:18 on_charge_failed()
# Two names, one call
find_symbol("schedule_retry, RetryJob")
billing/retry.py:42-61 def schedule_retry(charge, attempt)
callers: on_charge_failed
billing/jobs.py:8 class RetryJob, outline of 4 methods
# Before the refactor
graph("schedule_retry", direction="callers", transitive=True)
6 callers in 3 files (static edges: a lower bound)
What your agent gets
Five tools by default. Each one replaces several grep and read calls. The server tells the agent which tool answers which question when it connects.
search- "Where is", "how does". Hybrid search with the whole code of the top results.
find_symbol- Names you know. The code of each, with callers and callees. Long classes come back as an outline.
graph- Who calls this, and what breaks if it changes.
map- Layers, entry points and hub symbols of an unfamiliar repo.
index- The first call in a project. Incremental after that, multi-folder for monorepos.
Set NEXUS_EXTRA_TOOLS=all for memory (decisions that last across sessions), analyze (complexity and code smells) and status. Keep your agent's own grep for exact names you can type.
Call graph for Python, TypeScript, JavaScript, Go, Java, Rust, C, C++, C# and PHP. Search for 25+ languages.
Install in a minute
You need uv. Every route runs the same server.
uvx --python 3.12 nexus-mcp-ci setupFinds Claude Code, Codex, Cursor, VS Code, Cline, Windsurf, Gemini CLI and Claude Desktop, shows each change and asks first. --dry-run shows the changes only; --uninstall removes them. Or tell your agent: "Install Nexus-MCP from github.com/jaggernaut007/nexus-mcp-ci".
/plugin marketplace add jaggernaut007/nexus-mcp-ci
/plugin install nexus-mcp@nexus-mcp
The plugin registers the server and a short skill that tells the agent when to use each tool. Use the plugin or setup, not both.
One click each. Both run uvx --python 3.12 nexus-mcp-ci.
Download nexus-mcp.mcpb from the latest release and open it. Claude Desktop installs the server.
claude mcp add nexus-mcp -- uvx --python 3.12 nexus-mcp-ci{
"mcpServers": {
"nexus-mcp": { "command": "uvx", "args": ["--python", "3.12", "nexus-mcp-ci"] }
}
}
Any client that speaks MCP over stdio takes this config. Docker and GitHub Actions: every channel.
Measure it on your code first
About 30 questions made from your project, Grep and Read against Nexus-MCP. Free, offline, no LLM. You get a verdict: Strong fit, Likely fit or Weak fit. On a tiny project Grep and Read win, and the report says so.
uvx --python 3.12 nexus-mcp-ci evalYour code stays on your machine
The server makes no network calls and has no telemetry. Two downloads come in once: the package and the embedding model. Nothing goes out unless you run one of two opt-in commands, and both ask first.
nexus-mcp-ci data wherelists every stored file.nexus-mcp-ci data clearremoves them.- About 90 MB of memory idle, about 270 MB with the model loaded.
Questions
What is Nexus-MCP?
A local Model Context Protocol (MCP) server for AI coding agents. It indexes your code and answers questions about it with hybrid search, symbol lookup and a static call graph. The agent gets the code it needs in one call instead of a series of grep and file reads, so it uses fewer tokens. It runs on your machine and needs no API keys.
How do I test Nexus-MCP on my own code before I install it?
Run uvx --python 3.12 nexus-mcp-ci eval in your project folder. It compares Nexus-MCP with Grep and Read on about 30 questions made from your code, offline and with no LLM calls, and prints a verdict: Strong fit, Likely fit or Weak fit. For the real agent cost, nexus-mcp-ci eval --agent claude runs a paid A/B with your own Claude Code login after it shows the cost. The full guide.
Does Nexus-MCP lower token use for every project?
Not for every project. The saving is large on code the model does not know and small on code it knows from training, and on a tiny project Grep and Read win. The results table shows every repo we measured, including the ones where Nexus-MCP used more tokens.
Does my code leave my machine?
No. Parsing, embeddings and the index all run locally. Nexus-MCP sends no code to any service, has no telemetry and needs no API keys. The embedding model downloads once; set NEXUS_OFFLINE=1 after that. Only the opt-in eval --agent and eval share commands send anything, and both ask first.
Which agents and languages does it work with?
Any MCP client that supports the stdio transport, including Claude Code, Claude Desktop, Codex, Cursor, VS Code, Cline, Windsurf and Gemini CLI. Search, symbols and the call graph cover Python, TypeScript, JavaScript, Go, Java, Rust, C, C++, C# and PHP. Search covers more than 25 languages.
How does Nexus-MCP compare with Serena and claude-context?
Serena finds code through language servers and can edit code. claude-context runs hybrid search over a vector database with an embedding provider. Nexus-MCP is read only and fully local: hybrid search in a local index with a local embedding model, and a static call graph for ten languages. Measure it on your own repository with nexus-mcp-ci eval instead of relying on any comparison. Feature table.
Try it on the repo you work in today
Install it with one command, or measure it first. If it saves you tokens, a star helps other developers find it.