Token-efficient code reading for coding agents: symbol-aware, budgeted, diff-aware reads.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.

Token-efficient code search and navigation for AI coding agents. speedread is an MCP server and CLI that gives Claude Code, GitHub Copilot, Codex, Cursor, Gemini CLI and other agents the part of a codebase a question needs, within a token budget: the function around each search hit, a large file's skeleton, a symbol's callers and implementations, or only what changed since the last read. Not whole files and bare grep hits.
Read is the wrong abstraction for coding agents. Agent code reading should be adaptive, stateful, symbol-aware and token-budgeted instead of byte-oriented. Every model call re-sends the system prompt, tool definitions and conversation so far (18β21k tokens before any code, in our evals), so an agent's cost is driven more by round trips than by bytes. ripgrep returns matches and cat returns bytes, so the agent asks again: open the file, find the function, search for the next hop. speedread returns the minimum useful unit of code for the question, with enough structure that the next call often isn't needed.
| The agent needs | Built-in tools return | speedread returns |
|---|---|---|
| where something is | file names, or bare matching lines | each hit under its enclosing function or class, with its line range (search) |
| one function in a large file | the file in 2,000-line pages, or a guessed range | that symbol's full source (read path#Symbol), or a skeleton of the file |
| callers, callees, implementations | a search per hop, then more reads | the relationship in one call, up to three levels deep (trace) |
| a file again, after an edit | the file again | only what changed, labelled by symbol (read path@etag) |
One of the ten code-question tasks, replayed from its recorded eval transcripts at recorded speed; all three trials of each condition behaved identically. The built-in grep answers with a file name, so the agent has to ask again, twice. speedread's search answers with the matching lines under their enclosing declaration. This is the second-largest saving of the ten tasks; two tasks came out about 1% worse, and across all ten, input tokens fell 35%. Full interactive report: brennengreen.github.io/speedread (also self-contained in demo/index.html), generated by demo/build.py from evals/results/.
Real agents on real repositories, with the same model (claude-sonnet-5) and harness (GitHub Copilot CLI) in both arms: built-in tools vs speedread as the reader. Every trial, transcript, grader and diff is committed, including the workloads where speedread didn't help.
| Workload (real agent, same model and harness) | Trials per arm | Input tokens | Model time (median) | Quality |
|---|---|---|---|---|
| Code questions: find, read, answer | 30 | β35% (95% CI β45 to β23%) | β47% | pass^3 90% β 100% |
| Relationship questions: callers, callees, implementations | 8 | β57% (CI β74 to β20%) | β34% (not significant) | 100% β 100% |
| Bug fixes: find, edit, run the test suite (with guidance Β· exclusive) | 16 | β3% Β· β1% (not significant) | β24% Β· β27% (not significant) | 100% β 100%; compression never hid the bug |
| Installed but not made the reader (Q&A Β· bug fixes) | 10 Β· 16 | +31% Β· +46% (higher on 9 of 10 Β· 8 of 8 tasks) | β | used in 0 of 26 trials |
trace in one hop. On bug fixes, editing and testing dominate the turns, and read results were about 1% of input, so tokens barely moved.pass^3 is the share of tasks whose three trials all passed. Intervals are 95% bootstrap intervals on the ratio of means (evals/stats.py). Per-suite detail: Results Β· method: evals/README.md Β· every table: evals/RESULTS.md Β· raw trials and transcripts: evals/results/
1. Install (macOS on Apple Silicon, Rust 1.90+; a clean build took 80 s on an M4, plus downloads):
Prebuilt binaries, a one-click Claude Desktop bundle, other platforms, and why the tap name: Install.
2. Add it to your agent as the reader, not as one more tool. Installed alongside the built-in tools with no guidance, it went unused and made runs more expensive (above).
VS Code, Cursor, Codex, Gemini CLI, Zed and Claude Desktop: Configuration. Where the built-in tools can't be removed, add the reading instructions to AGENTS.md, CLAUDE.md or .github/copilot-instructions.md.
3. Or try it by hand in any repository:
Four tools over MCP, mirrored by the CLI:
| Primitive | Job | Returns |
|---|---|---|
| map | locate structure | budgeted repo tree with line counts, importance-weighted; top-level symbols on request |
| search | locate text | ripgrep's engine; every hit grouped under its enclosing function or class, with line range |
| trace | locate relationships | callers, callees, references, implementations: syntactic and receiver-aware |
| read | obtain exact evidence | batched targets and path#Symbols under one token budget; path@etag returns only what changed |
read: batched, budgeted, symbol-awareOne call takes any mix of targets. They share one token budget (default 8,000).
| Target | Returns |
|---|---|
src/app.ts | The whole file. If it doesn't fit, a skeleton: signatures, types and docs, with bodies collapsed as A-B β―. If that's still too big, an outline. Never a blind cut. |
src/app.ts:120-180, src/app.ts:120 | Those lines; a single line (or file:line:col from a compiler error) returns the enclosing function or class. |
src/app.ts#handleRequest, #Server.start | That symbol's full source, including docs and decorators. #Name alone finds the definition anywhere. |
README.md#Install, package.json#scripts | A Markdown section, or a JSON, YAML or TOML key. |
src/**/*.test.ts | A glob (.gitignore-aware); large sets degrade largest-first. |
src/app.ts@<etag> | Only what changed since the version whose etag appeared in a header. |
A real skeleton of flask's 1,628-line app.py (excerpt) costs 3.4k tokens, against 21k for the file:
Symbol-aware re-reads. After an edit, path@etag returns unchanged, the appended tail for a growing log, or a diff that names what changed. Hunks carry git-style function context, and mode=outline returns only the symbol summary. From tests/mcp.rs:
A signature edit reads f3 [25-27]: signature changed: `pub fn f3() -> u32` β `pub fn f3(k: u32) -> u32` ; a new function reads g [133-135]: added `pub fn g() -> u8` .
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/speedread)<a href="https://allmcps.com/mcp/speedread"><img src="https://allmcps.com/api/badge/speedread?style=directory" alt="Speedread on AllMCPs" /></a>