ai-architect-mcp-codebase — Claude Code MCP server: code graph
Turns a repository into a local symbol graph so an agent can answer structural questions: who calls this, what depends on it, which symbols a diff touches.
Open on GitHubWhat ai-architect-mcp-codebase does
The server parses source with tree-sitter and keeps definitions, calls, imports and implementations in an embedded LadybugDB graph on your machine. An agent then queries that graph over MCP: symbol search, callers and callees, reverse dependencies, execution flows from entry points, mapping a git diff onto changed symbols, and comparing two graphs of the same code. Answers include source locations and a note on how complete the analysis is.
Indexing and queries stay local, with no network calls, and no language model reads your code. The server never edits the files it indexes. Its graph and sidecar files go to the output_dir you pass; a snapshot lands in the repository only on a separate request. Everything comes from static parsing, so reflection, dynamic dispatch, generated code and unexpanded macros produce no edges unless you enable the language-server pass (lsp: true) or load runtime traces (ingest_traces). Ruby is extracted shallowly. An empty result can mean either that the relationship does not exist or that it was never indexed, and the coverage report is what separates the two.
One of two tool sets loads at startup, picked by the --profile flag or the AP_PROFILE variable, with the flag taking precedence. The core profile holds 8 tools: health_check, analyze_codebase, search_codebase, get_context, get_symbol, get_impact, query_graph, detect_changes.
What it helps with
- find every caller of a function before renaming it
- see which modules a change to shared code will touch
- map an unfamiliar repository through its entry points and flows
- match a git diff to the symbols it changes
- compare the structure of two versions of the same code
Example prompts for the agent
- Index the repo into
/tmp/repo-graphand show the coverage report - Who calls
src/main.rs::handle_tool_call, and what depends on it? - Which symbols does the diff between
mainandHEADchange?
How to install ai-architect-mcp-codebase
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ai-architect-mcp-codebase
How do I install ai-architect-mcp-codebase in Claude Code?
As a plugin: claude plugin marketplace add cdeust/ai-architect-mcp-codebase, then claude plugin install ai-architect-mcp-codebase@ai-architect-mcp-codebase-marketplace. The plugin fetches the release binary and checks its Sigstore provenance, which requires GitHub CLI 2.68 or newer.
What does ai-architect-mcp-codebase do?
It builds a local graph of symbols and their relationships from a repository's source and serves it to an agent over MCP. The agent can search that graph, inspect a symbol's context, measure the impact of a change, and break down a diff.
Why are some calls missing from the graph?
Parsing is static, so reflection, dynamic dispatch, generated code and unexpanded macros leave no edges. The language-server pass with lsp: true or loaded traces can add them.