Memtrace
OFFICIAL SERVERLocal code graph with symbol history that coding agents query for search, impact and change tracking
Local code graph of a repository, queried over MCP for impact, call paths and context
By Nikolai Vysotskyi (individual) TypeScript Local · stdio Developer toolsKnowledge and memory
62 popularity score ★ 202 ↓ 3.8k/wk
Opens the app, which asks before it adds the server.
claude mcp add trace -- npx -y trace-mcp@latest serve{
"mcpServers": {
"trace": {
"command": "npx",
"args": [
"-y",
"trace-mcp@latest",
"serve"
]
}
}
}{
"mcpServers": {
"trace": {
"command": "npx",
"args": [
"-y",
"trace-mcp@latest",
"serve"
]
}
}
}{
"servers": {
"trace": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"trace-mcp@latest",
"serve"
]
}
}
}[mcp_servers.trace]
command = "npx"
args = ["-y", "trace-mcp@latest", "serve"]gemini mcp add --scope user trace npx -- -y trace-mcp@latest serveTRACE_MCP_TELEMETRY |
Optional: Set to off to stop the once-a-day anonymous usage ping. |
|---|---|
TRACE_MCP_CLIENT_PROFILE |
Optional: Pin or turn off (off) the per-client tool surface; auto-detected by default. |
TRACE_MCP_REPO_ROOT |
Optional: Use this directory as the session's project root instead of the working directory. |
TRACE_MCP_AUTO_REGISTER_MODE |
Optional: Controls implicit registration of new roots; never turns it off. |
TRACE_MCP_AUTO_REGISTER_EXCLUDE |
Optional: Comma-separated globs of roots never to auto-register. |
OPENAI_API_KEY |
Optional: Only when the AI provider is set to openai; ANTHROPIC_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY serve other providers. |
trace-mcp parses a project once with tree-sitter and framework plugins, stores symbols, files and the edges between them in a local SQLite index, and answers an assistant's questions from that graph instead of having it open file after file. Typical questions are what depends on a symbol before it changes (get_change_impact), which code, tests and types belong to a task (get_task_context), or how a request travels from route through middleware to controller and view in frameworks such as Laravel, NestJS or Express. The same index also takes markdown vaults (Obsidian, Logseq, plain files), where notes, headings, wikilinks and tags become symbols and edges.
Beyond lookup it carries a decision log tied to code: it can mine Claude Code and Claw Code session logs for decisions by pattern matching, store them against files or symbols, and bring them back in impact results and at session start. It also has refactoring tools that edit files (rename, move, change a signature, extract a function, codemods), quality and security scans, a CI report command, and an optional Electron desktop app that shows the graph and wires up clients. Index and state live in ~/.trace/.
The tool total is larger than the README's headline: the generated tool index (last updated 23 September 2026) lists 195 registered tools, of which 163 register on every repo, 13 only when their framework is detected, and 19 only behind config flags such as topology.enabled or runtime.enabled. Five AI-backed tools (explain_symbol, suggest_tests, review_change, find_similar, explain_architecture) need ai.enabled set to true. The token-saving figures its makers publish are their own benchmarks, several marked by them as synthetic estimates.
| Runtime | Node.js 22+ |
|---|
Node.js 22 or newer (the package's engines field at v3.37.4 says >=22.0.0; the README does not state it). Run it inside the repository to index: the stdio server takes the project from its working directory, and `trace add` registers a project ahead of time. Semantic search runs on bundled ONNX embeddings by default; Ollama or an API key for OpenAI or another provider is needed only if you switch to them. get_diagnostics calls a type checker (tsc, mypy or pyright) that must already be installed. The desktop app is optional (macOS .dmg, Windows installer).
Each MCP session covers one project: stdio takes it from the working directory, the HTTP daemon from ?project=; queries across repositories in one session are not supported. extract_function handles TypeScript and JavaScript only. Framework tools appear only when the framework is detected, and the AI-backed tools only with ai.enabled. The --preset flag arrived after 3.11.0; older installs exit on it. On macOS `trace` clashes with Apple's /usr/bin/trace, so its makers advise keeping the `trace-mcp` command in scripts. trace init cannot write configs for Warp, JetBrains AI Assistant or the Kilo CLI 7+; those are set up by hand.
Suits developers using Claude Code, Cursor, Codex, Windsurf or another MCP client on medium to large codebases, especially multi-language or framework-heavy ones (Laravel with Vue/Inertia, NestJS, microservices with OpenAPI or gRPC contracts), who want impact analysis and task context served from a local index with no account. Teams that want decisions remembered against code get that in the same server. Less suited when you want a read-only server: several tools rewrite source files, and trace init by default changes client configs, hooks and CLAUDE.md. For a small single-language repo the plain file tools of the client may be enough.
get_project_mapsearchsearch_textget_symbolget_outlinefind_usagesget_change_impactget_task_contextget_feature_contextget_context_bundleplan_turnget_wake_upget_request_flowget_component_treeget_schemaget_call_graphget_type_hierarchyget_implementationsget_import_graphget_tests_forget_untested_symbolsget_dead_codeget_circular_importsassess_change_riskget_risk_hotspotsget_complexity_reportget_git_churncompare_branchesget_changed_symbolscheck_quality_gatescheck_architecturescan_securitytaint_analysisgenerate_sbomget_diagnosticsplan_refactoringcheck_renameapply_renameapply_movechange_signatureextract_functionapply_codemodremove_dead_codemine_sessionsadd_decisionremember_decisionquery_decisionssearch_sessionsget_subproject_impactget_service_mapgraph_querytraverse_graphget_pagerankvisualize_graphgenerate_docsverify_docsreindexget_index_healthbatchbenchmark_project