Codegraph MCP Server

Cross-language code intelligence for AI agents and developers. CodeGraph builds a semantic graph of your codebase - functions, classes, imports, call chains - and exposes it through 42 MCP tools, a VS Code extension, a JetBrains IDE plugin, and a persistent memory layer. Parses 38 languages via tree-sitter. AI agents get structured code understanding instead of grepping through files. Its 40 documented tools cover context, analyze, symbol, graph.

People connecting database tools to Claude, Cursor, VS Code, or another MCP client. The project is written in C.

VERIFIED ACTIVE

LAST COMMIT 2026-08-10 · ★ 73 · #19 OF 151 MAINTAINED DATABASE · VERIFIED 2026-08-25

Apache-2.0 · C · how we verify → /methodology

01 · Install Codegraph

before you install - you'll need

The README does not document required environment variables for a basic install.

Claude Code

claude mcp add codegraph-ai-codegraph -- npx -y @astudioplus/codegraph-mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "codegraph-ai-codegraph": {
      "command": "npx",
      "args": [
        "-y",
        "@astudioplus/codegraph-mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license Apache-2.0 - declared in the repository

npm package @astudioplus/codegraph-mcp - the @astudioplus scope differs from the repo owner (codegraph-ai); confirm it's the project's official package

registry namespace io.github.codegraph-ai is GitHub-verified and matches the repo owner

03 · What Codegraph can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

With this server connected, an agent can detect circular import/dependency chains across files, find unused imports - modules imported but never referenced, find functions that throw, catch, or handle specific error types, and find symbols by name or natural language (hybrid BM25 + semantic search).

Capability map

Tools grouped from the project's README - what Codegraph lets an agent do.

read & search

16 tools - e.g. Detect circular import/dependency chains across files; Most-called functions ranked by transitive caller count; Find unused imports - modules imported but never referenced

find_circular_deps · find_hot_paths · find_dead_imports · get_module_summary · search_by_pattern · search_by_error…

Context

5 tools - e.g. Primary context tool. Intent-aware (explain/modify/debug/test) with token budgeting. Returns source, related symbols, imports, siblings, debug hints.; Everything needed before editing: source + callers +…

get_ai_context · get_edit_context · get_curated_context · memory_context · pr_context

Analyze

3 tools - e.g. Blast radius prediction - what breaks if you modify, delete, or rename; Cyclomatic complexity with breakdown (branches, loops, nesting, exceptions, early returns); Module coupling metrics and instability…

analyze_impact · analyze_complexity · analyze_coupling

Symbol

3 tools - e.g. Find symbols by name or natural language (hybrid BM25 + semantic search); Full symbol info: source, callers, callees, complexity; Quick metadata: signature, visibility, kind

symbol_search · get_detailed_symbol · get_symbol_info

Index

3 tools - e.g. Add/update specific files without full reindex; Add directory to graph alongside existing data; Index a local .md file (ARCHITECTURE.md, API_DESIGN.md, etc.) into the persistent docs store. Heading-tree…

index_files · index_directory · index_markdown

Doc

3 tools - e.g. List all indexed source files; Remove all indexed chunks from a source file; Auto-generate a structured ARCHITECTURE.md from the live code graph (modules, hot paths, complexity, circular deps)

list_doc_sources · remove_doc_source · generate_architecture_doc

Traverse

1 tool - e.g. Custom graph traversal with edge/node type filters

traverse_graph

Reindex

1 tool - e.g. Full or incremental workspace reindex

reindex_workspace

Latest releases

v0.20.1 · 2026-08-10

Engine binaries for CodeGraph 0.20.1. · Each binary has a matching .sha256. Clients that download an engine are · expected to verify it before running. · Windows additionally requires onnxruntime.dll alongside the…

v0.20.0 · 2026-08-09

Engine binaries for CodeGraph 0.20.0. · Each binary has a matching .sha256. Clients that download an engine are · expected to verify it before running. · Windows additionally requires onnxruntime.dll alongside the…

model · 2026-06-30

04 · Who maintains Codegraph

codegraph is maintained by codegraph-ai. It's the only MCP server we track from this author; the repo dates to Apr 2026.

05 · Facts

category
database - ranked #19 of 151 actively-maintained database servers as of 2026-08-25.
release cadence
3 releases in the last 90 days (latest 2026-08-10)
registry
io.github.codegraph-ai/codegraph (active, first published 2026-03-20 · 13 versions)
packages
npm:@astudioplus/codegraph-mcp

06 · Codegraph FAQ

Is Codegraph still maintained?

Yes - as of 2026-08-25, its last commit was 2026-08-10 and it shipped 3 releases in the last 90 days. We re-verify nightly.

What can Codegraph do?

With this server connected, an agent can detect circular import/dependency chains across files, find unused imports - modules imported but never referenced, find functions that throw, catch, or handle specific error types, and find symbols by name or natural language (hybrid BM25 + semantic search).

How do I install Codegraph?

Run `npx -y @astudioplus/codegraph-mcp`. The README does not document required environment variables for a basic install. You can also paste the ready-made client config above.

Does Codegraph run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Codegraph