Best Code Graph MCP Servers for Coding Agents (2026)

Raghav Chamadiya13 min read
Compared in this post: repowise and
  • CodeGraph
  • Graphify
  • Serena
  • GitNexus
  • codebase-memory-mcp
  • code-review-graph
  • jCodeMunch
  • CodeGraphContext
On this page

Nine MCP servers give a coding agent a queryable code graph, and the license narrows the list before anything else: GitNexus and jCodeMunch need a paid license for work use. Of the rest, CodeGraph is the smallest setup (one tool and a file watcher), Graphify draws a graph your team can open, Serena edits symbols through live language servers, and repowise keeps git history, ownership and health on the same index. codebase-memory-mcp, code-review-graph and CodeGraphContext each fit a narrower job, covered below.

We build repowise. Star counts, releases, licenses and tool lists come from each project's repository, docs and pricing pages, read on 29 October 2026. Measured numbers come from our published benchmarks, with raw data.

We build repowise, so weigh our entry accordingly. The measurements we publish about it, with their methods, are on the benchmarks page.

What a code graph MCP server does

A code graph MCP server parses a repository into nodes (files, classes, functions) and edges (imports, calls, inheritance), stores the result, and exposes it to a coding agent as Model Context Protocol tools. The agent asks "who calls charge_card" or "what breaks if I change this file" and gets an answer from the graph, instead of running grep, opening ten files and reasoning over the raw text.

The servers differ in three ways:

  • How edges are made. Most servers parse with tree-sitter and resolve names with heuristics. Serena asks real language servers at query time. A few add SCIP or language-server type resolution on top.
  • What else sits next to the graph. Some stop at symbols and calls. Others add docs, PDFs, infrastructure files, git history or review risk.
  • How many tools the agent sees. Each tool schema a client loads costs prompt tokens on every turn. CodeGraph lists one tool by default; Serena's classic interface has 53; jCodeMunch keeps more than ninety behind a six-tool front door.

Beyond those, we noted how each stays current (watcher, git hook or manual re-index) and its terms (license, paid tiers, telemetry defaults). Call-graph accuracy is graded for the five servers we have benchmark data for.

Code graph MCP servers compared

ServerHow it builds the graphStorageMCP toolsLanguages (as stated)LicensePaid tier
repowiseTree-sitter parse, typed resolution, git mining; no modelSQLite plus LanceDBTen core, more opt-in28 full ASTAGPL-3.0Hosted Pro and Teams; self-hosting free
CodeGraphTree-sitter with a Rust kernelSQLite1 listed, 8 in all20+MITHosted platform on a waitlist
GraphifyTree-sitter for code; a model pass for docs and mediagraph.json (Neo4j optional)10~40Apache-2.0Graphify Cloud, per seat
SerenaLive language servers, no stored graphNone5340+GPL-3.0-or-later (MIT core library)Paid JetBrains plugin backend
GitNexusTree-sitter plus type resolutionLadybugDB (formerly Kuzu)1918PolyForm Noncommercial 1.0.0Commercial license and Enterprise
codebase-memory-mcp162 tree-sitter grammars plus LSP type resolutionSQLite17162 grammarsMITNone
code-review-graphTree-sitterSQLite30~35 listedMITNone
jCodeMunchTree-sitter, optional SCIP importLocal index in ~/.code-index/6 front door, 90+ in all70+Custom dual-use$79, $349 or $1,999 one-time
CodeGraphContextTree-sitter, optional SCIPFalkorDB Lite, Kuzu, Neo4j and others2023MITNone

Scroll the table sideways to see every column.

How accurate is each graph?

A call graph is only useful if its edges are real, so we graded five of these servers against call graphs produced by the Go and TypeScript compilers on five public repositories. Precision is the share of reported edges that are correct; recall is the share of real edges found. Read the two together: a tool can look precise by reporting very little.

Precision / recall against call graphs generated by the Go and TypeScript toolchains. Both numbers must be read together.

Oracle cellRepowiseCodeGraphcodebase-memoryGraphifycode-review-graph
cobra / tests0.972 / 0.6840.929 / 0.7630.912 / 0.7430.971 / 0.4330.997 / 0.174
gitleaks / no tests0.976 / 0.9550.972 / 0.9200.934 / 0.9670.997 / 0.8860.759 / 0.026
gitleaks / tests0.974 / 0.9140.971 / 0.8950.922 / 0.9450.995 / 0.8320.800 / 0.032
syft / no tests0.943 / 0.5130.872 / 0.5080.635 / 0.5420.771 / 0.4470.968 / 0.201
syft / tests0.950 / 0.3220.864 / 0.3380.673 / 0.3610.802 / 0.2730.966 / 0.086
zod / no tests0.992 / 0.7030.729 / 0.3730.987 / 0.6940.825 / 0.2480.932 / 0.652
hono / no tests0.977 / 0.7310.805 / 0.6840.949 / 0.6860.980 / 0.6880.966 / 0.691

Scroll the table sideways to see every column.

Precision / recall in every cell. Five tools, seven cells, 37,853 oracle edges. No tool that finds as much of the graph as Repowise gets more of it right in any cell. Repowise does not lead recall in the five Go cells and is most precise outright in only one cell.

repowise sits on the precision-recall frontier in all seven cells: no server beats it on both numbers at once. Other tools lead single columns. Graphify is the most precise on both gitleaks cells (0.997 and 0.995), codebase-memory-mcp has the highest recall on gitleaks (0.967 and 0.945) and on both syft cells (0.542 and 0.361), and CodeGraph has the highest recall on cobra (0.763). Serena is absent because it stores no graph to grade, and GitNexus, jCodeMunch and CodeGraphContext were not in this run.

Token savings in a real agent loop, file retrieval and build cost for four of these servers are in Serena vs Graphify vs CodeGraph vs repowise.

The servers, one by one

repowise: a code graph with history, docs and health on the same index

repowise builds a two-tier graph of files and symbols during repowise init, with no model calls and no network. Every edge records the strategy that produced it and a confidence, so an agent can tell a resolved call from a name match (graph docs). The same pass mines git history for ownership, hotspots and files that change together, and the index also holds the generated wiki, decision records and a health score per file.

Agents reach it through ten tools. get_context(targets, include=["callers"]) returns callers with their confidence; get_risk returns a file's bug-fix history and structural reach before an edit; get_why returns the decision behind a pattern. In a workspace, one server covers several repositories and adds contracts matched across them; cross-repo code intelligence tools compares that job across vendors.

repowise init registers the server with Claude Code, and the post-commit hook it installs keeps the index current. The self-hosted CLI sends anonymous usage telemetry by default, and repowise telemetry disable turns it off. The hosted version serves the same tools to Claude.ai, ChatGPT, Cursor and VS Code through a remote connector, private repositories included.

Architecture map of the repowise-dev/repowise repository, files grouped into communities with import links drawn between them
The graph behind the MCP tools, shown as the architecture map for repowise-dev/repowise

CodeGraph: one MCP tool and a file watcher

CodeGraph (MIT, about 75,800 stars) parses with tree-sitter and a native Rust kernel, writes a SQLite database to .codegraph/, and keeps it current with a debounced file watcher that is on by default. It lists one MCP tool, codegraph_explore, which returns source and call paths together; seven more (codegraph_callers, codegraph_impact and others) can be switched on with CODEGRAPH_MCP_TOOLS. No API key, no external service. A hosted PR-impact platform is on a waitlist.

In our build-cost run across 35 repositories, CodeGraph had the fastest build on 16, the most of any tool. Its README reports 88% fewer tool calls and 62% fewer tokens across seven repositories in its own agent benchmark. Pick it if you want zero-config local context that stays current on its own. Our CodeGraph alternative page compares it with repowise directly.

Graphify: a graph of code, docs and PDFs you can open in a browser

Graphify (Apache-2.0, about 138,000 stars, now maintained by the YC-backed Graphify Labs) is a /graphify skill for Claude Code, Codex, Cursor and others, with an optional MCP server of ten tools such as query_graph, get_neighbors, shortest_path and get_pr_impact. Code is parsed with tree-sitter, with no model; Markdown, PDFs, images and video go through your assistant's model. It writes graph.html, GRAPH_REPORT.md and graph.json, so the output is something a team browses as well as queries.

Install with uv tool install graphifyy (the PyPI name has two y's), and keep it current with graphify hook install or graphify watch. Graphify Cloud adds hosted memory, cross-repo support and PR review, with a free plan and per-seat paid plans. Pick it if you want one graph spanning code, docs and schemas, with a visual map. See the Graphify alternative page.

Serena: symbol edits through real language servers

Serena (about 30,800 stars) builds no graph. It drives the language servers your editor uses, so find_symbol, find_referencing_symbols and rename_symbol return compiler-grade answers with nothing to re-index. It also edits, through replace_symbol_body, insert_after_symbol and safe_delete_symbol, so an agent can refactor with it as well as read. It covers 40+ languages, and a paid JetBrains plugin swaps in the IDE's own analysis.

Version 2.0.0 (13 October 2026) moved the application from MIT to GPL-3.0-or-later, with v1.7.0 the last MIT release, and contributions need a CLA. The classic interface exposes 53 tools, 13 of which need the JetBrains backend; trim the rest with Serena's modes and contexts if prompt size matters. Pick it if your agent edits more than it explores. More on the Serena alternative page.

GitNexus: impact, tracing and Cypher, under a noncommercial license

GitNexus (about 48,100 stars) indexes a repository into a knowledge graph of symbols, calls and execution flows in LadybugDB, with no model. Its 19 MCP tools go further than most: impact, trace, detect_changes, a previewed rename, raw cypher queries, API route and response-shape checks, and group_sync for linking repositories through their API contracts. A web graph explorer with chat ships alongside.

Read the license first. GitHub shows "NOASSERTION" because the LICENSE file is PolyForm Noncommercial 1.0.0, so any commercial use needs a paid license from Akon Labs, which also sells an Enterprise tier with a unified multi-repo graph, PR review and auto-reindexing. Prices are not published. Pick it if you want impact analysis, tracing and raw Cypher for personal or research work, or your company is ready to license it. If the license rules it out, the closest MIT options are codebase-memory-mcp (Cypher-like query_graph, detect_changes) and CodeGraphContext (Cypher on a graph database).

codebase-memory-mcp: one binary, 162 grammars

codebase-memory-mcp (MIT, about 47,800 stars) is a single native C binary with 162 tree-sitter grammars compiled in, plus language-server type resolution for supported languages. It indexes Docker, Kubernetes, Helm, Terraform and CI files next to the code, stores everything in SQLite under ~/.cache/codebase-memory-mcp/, and re-indexes in the background. Its 17 tools include trace_path, query_graph (Cypher-like), detect_changes with test impact and manage_adr. A visual explorer, CBM Lens, is in open beta.

In our compiler-graded run it had the highest recall on gitleaks (0.967 and 0.945) and on both syft cells (0.542 and 0.361). Pick it if you want one dependency-free install that sees infrastructure as well as code.

code-review-graph: built for pull request review

code-review-graph (MIT, about 32,500 stars) keeps a tree-sitter graph in one SQLite file and focuses on review: blast radius, risk scoring and a GitHub Action that posts a sticky risk comment on each pull request and can fail the check above a threshold. It exposes 30 MCP tools, from get_impact_radius_tool to generate_wiki_tool and cross_repo_search_tool. Updates are incremental through editor hooks, a pre-commit hook or watch mode.

Pick it if your main use is reviewing pull requests with an agent and gating merges on blast radius. See the code-review-graph alternative page.

jCodeMunch: symbol retrieval by byte offset

jCodeMunch MCP (about 2,800 stars) fetches code by symbol with byte offsets, so the agent reads the function it needs and not the file around it. It parses 70+ languages with tree-sitter, can import SCIP for compiler-verified references, and adds edit, delete and rename safety checks, a PR risk profile and hotspots. New installs see a six-tool front door; more than ninety tools sit behind it.

The license is its own dual-use license (version 1.2, effective 21 October 2026): free for personal and non-commercial use, paid for any use inside a for-profit company, at $79, $349 or $1,999 one-time depending on team size. It also sends an anonymous token-savings counter by default (share_savings: false turns it off). Its README reports 96.2% fewer tokens per lookup than grep-and-read, over 15 lookups. Pick it if token cost per lookup is your main constraint and a small license fee is fine.

CodeGraphContext: your code graph in a real graph database

CodeGraphContext (MIT, about 4,400 stars) writes the graph into a graph database: FalkorDB Lite by default, or Kuzu, LadybugDB, Neo4j and others. Its 20 MCP tools include execute_cypher_query, find_dead_code and calculate_cyclomatic_complexity, it supports 23 languages, and it can load pre-indexed bundles of popular repositories. Pick it if you already run Neo4j or want to write your own Cypher queries against the code.

Hosted options: Sourcegraph and Augment

If the code is spread across hundreds of repositories and you prefer buying to running, two hosted services expose code context over MCP. The Sourcegraph MCP server has 16 tools, including go_to_definition, find_references, commit_search and deepsearch, and is included in the Enterprise plan, which starts at $16K a year. Augment's Context Engine MCP offers semantic retrieval through a codebase-retrieval tool, on plans from $20 a month, with each query billed at about $0.03 to $0.06 in tokens. Neither exposes a stored graph: Sourcegraph answers from its search and navigation index, Augment from semantic retrieval. Our Augment Context Engine alternatives post covers that category.

Check the license before you install it at work

Two of the nine need a commercial license for work use, two are copyleft, and five are permissive:

ServerLicenseWhat it means for a company
GitNexusPolyForm Noncommercial 1.0.0Commercial use needs a license from Akon Labs
jCodeMunchCustom dual-use v1.2Any for-profit use needs a $79 to $1,999 license
SerenaGPL-3.0-or-later since v2.0.0Fine to use; modifying and redistributing it carries GPL terms
repowiseAGPL-3.0Free to run internally; offering a modified version as a network service carries AGPL terms
CodeGraph, codebase-memory-mcp, code-review-graph, CodeGraphContextMITPermissive
GraphifyApache-2.0Permissive

Scroll the table sideways to see every column.

How to choose a code graph MCP server

Start from what the agent spends its turns on. If it mostly explores, CodeGraph is the least setup, and codebase-memory-mcp is the better fit when the repository is half Kubernetes, Terraform and CI files. If it mostly edits, use Serena, with one graph server next to it for broad questions. If a person needs to see the graph too, or the docs and PDFs belong in it, use Graphify.

Two jobs point at specialists: pull request review gated in CI (code-review-graph) and Cypher over your own graph database (CodeGraphContext, or GitNexus for non-commercial work). When the agent's questions are about who owns a file, what changes with it or why it is built that way, structure alone will not answer them; that is where repowise fits, and repowise for AI agents lists what each tool returns.

Keep the surface small. Two servers whose tools overlap make the agent choose between them on every turn, so add one line to CLAUDE.md or AGENTS.md saying which server answers which question. For a broader stack (docs, browser, GitHub), see our best MCP servers for coding agents.

Ask two servers the same two questions

Index one repository with two servers and ask both a structural question and a history question:

bash
# repowise: graph, history, docs and health; registers the MCP server with Claude Code
pip install repowise
repowise init --yes --no-prose

# CodeGraph: one-tool call graph with a file watcher
npm i -g @colbymchenry/codegraph
codegraph install && codegraph init

Then ask "who calls the function that charges a card" and "which files changed most in the last 90 days, and who owns them". CodeGraph answers the first from its call graph; the second needs git history, which repowise mines and CodeGraph does not.

FAQ

What is a code graph MCP server?
It is a Model Context Protocol server that parses a repository into a graph of files, symbols and their relationships (imports, calls, inheritance), stores it, and answers a coding agent's structural questions from that graph. It replaces many grep and file-read steps with one tool call.
What is the best MCP server for codebase indexing?
It depends on whether your agent mostly explores, edits or reviews. CodeGraph is the least setup for exploring, Serena needs no index for edits, code-review-graph is built for review, and repowise adds git history and health to the graph.
Do code graph MCP servers need an API key?
Not for the graph itself. All nine parse code without a model. Optional extras use a provider you configure: Graphify's pass over docs, PDFs and media, embeddings in code-review-graph and GitNexus, AI summaries in jCodeMunch, and wiki prose in repowise.
Is GitNexus open source?
No. GitNexus is source-available under the PolyForm Noncommercial 1.0.0 license, so you can read and run it for non-commercial purposes, and commercial use needs a license from Akon Labs. MIT-licensed alternatives include CodeGraph, codebase-memory-mcp and code-review-graph; repowise is AGPL-3.0.
Is there a free code graph MCP server for commercial use?
Yes. CodeGraph, codebase-memory-mcp, code-review-graph and CodeGraphContext are MIT, Graphify is Apache-2.0, and repowise is AGPL-3.0; all are free to run inside a company, with AGPL terms applying if you offer a modified repowise as a network service. Serena is free under GPL-3.0-or-later. GitNexus and jCodeMunch need a paid license for commercial use.
Which code graph MCP servers work with Claude Code and Cursor?
All nine speak MCP, so any client that registers a server (claude mcp add in Claude Code) can use them; Graphify's server is an optional install, graphifyy[mcp]. Several install the wiring for you: repowise init registers with Claude Code, codegraph install wires supported agents, and graphify install adds its skill. repowise's hosted connector also works in Claude.ai and ChatGPT.
Can I run more than one code graph MCP server?
Yes. Serena for edits plus one graph server for orientation is a sensible pair. Each server adds its tool schemas to the prompt, so keep the count low and note in CLAUDE.md or AGENTS.md which server answers which question.