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
Tokens an agent reads to reach the right file Grep and Read Nexus-MCP

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.

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

LanguageRepoRight file firstTokens to the right fileSearch time
GrepNexusGrepNexusGrepNexus
Pythonpallets/flask83 files20%93%26,7201,388108 ms23 ms
TypeScriptvitejs/vite429 files43%83%16,5201,286159 ms25 ms
JavaScriptwebpack/webpack822 files37%67%25,6341,251564 ms34 ms
Javaapache/commons-lang264 files23%87%48,1761,241201 ms31 ms
C#JamesNK/Newtonsoft.Json242 files23%73%14,0041,547154 ms25 ms
PHPlaravel/framework1,751 files50%83%13,4791,086712 ms39 ms
C++chromium/chromium3,641 files43%80%19,7681,2431,851 ms88 ms
Goprometheus/prometheus201 files40%83%41,0341,195600 ms24 ms
Credis/redis229 files40%87%37,139988331 ms34 ms
Rusttokio-rs/tokio381 files33%93%21,138830215 ms27 ms

Answer the question live Claude Code runs, 6 tasks × 3 runs, median per task

LanguageRepoTokens per taskCost per taskTurnsCorrect
GrepNexusGrepNexusGrepNexusGrepNexus
Pythonhome-assistant/corebuild 2.4.165,99042,458−36%$0.050$0.037−27%736/66/6
Pythondjango/djangobuild 2.4.145,10241,916−7%$0.048$0.035−26%5.52.55/66/6
TypeScriptvitejs/vitebuild 2.4.069,79052,411−25%$0.059$0.046−22%5.546/66/6
JavaScriptwebpack/webpackbuild 2.4.0100,32074,638−26%$0.077$0.068−11%64.56/66/6
Javaapache/commons-langbuild 2.2.2+11cfccc50,44832,862−35%$0.044$0.022−49%4.526/66/6
C#JamesNK/Newtonsoft.Jsonbuild 2.2.2+11cfccc41,92942,139+1%$0.030$0.030+1%32.56/66/6
PHPlaravel/frameworkbuild 2.2.2+11cfccc52,91951,994−2%$0.051$0.039−24%535/65/6
C++chromium/chromiumbuild 2.2.2+0430f0170,49560,622−14%$0.065$0.055−16%6.54.56/66/6
Goprometheus/prometheusbuild 2.2.2+e5a9d9a52,01445,214−13%$0.047$0.037−22%4.52.55/66/6
Credis/redisbuild 2.2.2+e5a9d9a41,75250,578+21%$0.031$0.030−3%3.536/66/6
Rusttokio-rs/tokiobuild 2.2.2+0430f0141,18861,816+50%$0.029$0.041+42%3.54.54/65/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

  1. 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.

  2. Ask in plain words

    search combines meaning and keywords. Its top results carry their whole code, so the agent does not open the file again.

  3. Follow the structure

    find_symbol returns the code of several names in one call, with callers and callees. graph gives 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)
Illustrative output. Real results depend on your code.

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 setup

Finds 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".

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 eval

Your 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 where lists every stored file.
  • nexus-mcp-ci data clear removes them.
  • About 90 MB of memory idle, about 270 MB with the model loaded.

Every flow and storage location

Nexus-MCP data flow PyPI and Hugging Face send the package and the embedding model once. On your machine, Nexus-MCP reads your code, keeps its index in .nexus, and talks to your agent over stdio. Only eval --agent sends prompts and code to Anthropic or OpenAI, and only eval share posts numbers to a GitHub issue, each after a yes. PyPI the package, once Hugging Face the model, once Your machine Your code read Nexus-MCP server index and graph in .nexus/ stdio Your agent Claude Code, Codex, Cursor Anthropic or OpenAI eval --agent only GitHub issue eval share, numbers only downloaded once opt-in, asks first

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.