$git clone https://github.com/nikolai-vysotskyi/trace-mcpMCP server for Claude Code and Codex. One tool call replaces ~42 minutes of agent exploration
| 1 | <p align="center"> |
| 2 | <img src="packages/app/build/icon-256.png" alt="trace-mcp logo" width="128" /> |
| 3 | </p> |
| 4 | |
| 5 | <h1 align="center">trace-mcp</h1> |
| 6 | |
| 7 | <p align="center"> |
| 8 | <a href="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/ci.yml"><img src="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/ci.yml/badge.svg?branch=master" alt="CI" /></a> |
| 9 | <a href="https://glama.ai/mcp/servers/nikolai-vysotskyi/trace-mcp"><img src="https://glama.ai/mcp/servers/nikolai-vysotskyi/trace-mcp/badges/score.svg" alt="Glama score" /></a> |
| 10 | <a href="https://www.npmjs.com/package/trace-mcp"><img src="https://img.shields.io/npm/v/trace-mcp" alt="npm version" /></a> |
| 11 | <img src="https://img.shields.io/node/v/trace-mcp" alt="Node.js version" /> |
| 12 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="License" /></a> |
| 13 | </p> |
| 14 | |
| 15 | <p align="center"> |
| 16 | <a href="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/codeql.yml"><img src="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/codeql.yml/badge.svg" alt="CodeQL" /></a> |
| 17 | <a href="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/semgrep.yml"><img src="https://github.com/nikolai-vysotskyi/trace-mcp/actions/workflows/semgrep.yml/badge.svg" alt="Semgrep" /></a> |
| 18 | <a href="https://securityscorecards.dev/viewer/?uri=github.com/nikolai-vysotskyi/trace-mcp"><img src="https://api.securityscorecards.dev/projects/github.com/nikolai-vysotskyi/trace-mcp/badge" alt="OpenSSF Scorecard" /></a> |
| 19 | <a href="https://github.com/nikolai-vysotskyi/trace-mcp/security"><img src="https://img.shields.io/badge/security-policy-blue" alt="Security policy" /></a> |
| 20 | <a href="https://github.com/nikolai-vysotskyi/trace-mcp/security/dependabot"><img src="https://img.shields.io/badge/Dependabot-enabled-success" alt="Dependabot enabled" /></a> |
| 21 | </p> |
| 22 | |
| 23 | <p align="center"> |
| 24 | <strong>AI agents recompute the same work. trace-mcp makes them reuse instead.</strong><br> |
| 25 | The recomputation → reuse layer for AI systems. |
| 26 | </p> |
| 27 | |
| 28 | <p align="center"> |
| 29 | <strong>40–50% fewer tokens</strong> on average · <strong>up to 2× effective capacity</strong> · <strong>up to 99% less redundant processing</strong> |
| 30 | <br> |
| 31 | <sub>Based on early benchmarks across agent workflows with repeated context and dependency traversal.</sub> |
| 32 | </p> |
| 33 | |
| 34 | > AI systems don't scale because they recompute instead of reuse. Every turn, the agent re-reads the same files, re-traverses the same dependencies, and re-inflates the context window with structure it already discovered. Token bills grow. Latency grows. Reasoning quality drops. The model isn't the bottleneck — the recomputation leak is. |
| 35 | > |
| 36 | > trace-mcp builds a framework-aware graph of your codebase **once**, then serves it through MCP so the agent reasons from a precomputed structure instead of brute-reading the repo. Ask *"what breaks if I change this model?"* — instead of 80 Grep calls and 190 file reads, the agent calls `get_change_impact` once and gets the blast radius across PHP, Vue, migrations, and DI. One tool call replaces ~42 minutes of agent exploration. 81 framework integrations across 80 languages, 170 tools. |
| 37 | > |
| 38 | > **The same engine indexes markdown vaults.** `[[wikilinks]]` become first-class edges, frontmatter and `#tags` become metadata, headings become nested sections. `find_usages` returns backlinks. `apply_rename` rewrites every link to a renamed note. One MCP for code and knowledge — no second tool to plug in. |
| 39 | |
| 40 | <p align="center"> |
| 41 | <img src="docs/images/app-graph.png" alt="trace-mcp desktop app — GPU graph explorer" width="820" /> |
| 42 | <br/> |
| 43 | <sub>Also ships a <a href="#desktop-app">desktop app</a> with a GPU graph explorer over the same index.</sub> |
| 44 | </p> |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## Why this matters |
| 49 | |
| 50 | AI is bottlenecked not by models, but by **recomputation**. Agents treat the context window like a database — they re-read the same files, re-traverse the same dependencies, and re-inflate context every turn with structure they already computed five steps ago. Token bills, latency, and hallucinations all grow with project size instead of with task complexity. |
| 51 | |
| 52 | trace-mcp closes the recomputation leak. The graph is built once, kept incrementally fresh, and served to every agent that asks — so the same work isn't paid for over and over. |
| 53 | |
| 54 | - **Lower cost** — fewer tokens per successful answer, on average and at peak |
| 55 | - **Lower latency** — fewer sequential tool calls, fewer round-trips to the model |
| 56 | - **Higher accuracy** — less noise in context means fewer hallucinations and stronger first-response correctness |
| 57 | - **Production stability** — context that scales with project size, not against it |
| 58 | |
| 59 | We started with code intelligence — the hardest, noisiest context most agents handle today — and the same engine now indexes markdown knowledge vaults (Obsidian, Logseq, plain MD) as a peer domain. Wikilinks, tags, frontmatter, and embeds become graph edges and symbol metadata; `search`, `find_usages`, `get_change_impact`, and `apply_rena |