Skip to content
codegraph-ai avatar

Codegraph

codegraph-ai/codegraph

Semantic code graph over 38 languages, exposing callers, impact analysis, memory, and PR review tools.

CCM score
69 of 100
GitHub stars
174
tools
42
transport
STDIO
last updated
Oct 6, 2026
View on GitHub

Own this MCP server? Claim it

What it does

  • Reads code structure with get_callers, get_callees, symbol_search, and find_related_tests, plus context-building tools like get_ai_context and get_edit_context
  • Analyzes risk with analyze_impact, analyze_complexity, find_circular_deps, and find_dead_imports; writes persistent notes via memory_store and index_markdown
  • Runs locally over stdio with no API keys required; semantic search uses bundled or optional static embedding models
  • Designed for large-codebase navigation, pre-edit impact checks, and automated PR review in CI or agent workflows

Tools

42 tools

Public tool metadata for what this MCP can expose to an agent.

get_ai_contextPrimary context tool. Intent-aware (explain/modify/debug/test) with token budgeting. Returns source, related symbols, imports, siblings, debug hints.

Primary context tool. Intent-aware (explain/modify/debug/test) with token budgeting. Returns source, related symbols, imports, siblings, debug hints.

No parameter schema in public metadata yet.

get_edit_contextEverything needed before editing: source + callers + tests + memories + git history

Everything needed before editing: source + callers + tests + memories + git history

No parameter schema in public metadata yet.

get_curated_contextCross-codebase context for a natural language query ("how does auth work?")

Cross-codebase context for a natural language query ("how does auth work?")

No parameter schema in public metadata yet.

analyze_impactBlast radius prediction — what breaks if you modify, delete, or rename

Blast radius prediction — what breaks if you modify, delete, or rename

No parameter schema in public metadata yet.

analyze_complexityCyclomatic complexity with breakdown (branches, loops, nesting, exceptions, early returns)

Cyclomatic complexity with breakdown (branches, loops, nesting, exceptions, early returns)

No parameter schema in public metadata yet.

find_circular_depsDetect circular import/dependency chains across files

Detect circular import/dependency chains across files

No parameter schema in public metadata yet.

find_hot_pathsMost-called functions ranked by transitive caller count

Most-called functions ranked by transitive caller count

No parameter schema in public metadata yet.

find_dead_importsFind unused imports — modules imported but never referenced

Find unused imports — modules imported but never referenced

No parameter schema in public metadata yet.

get_module_summaryHigh-level summary of a directory: file count, functions, language breakdown, top complex functions

High-level summary of a directory: file count, functions, language breakdown, top complex functions

No parameter schema in public metadata yet.

search_by_patternRegex search across function bodies, signatures, names, and docstrings

Regex search across function bodies, signatures, names, and docstrings

No parameter schema in public metadata yet.

search_by_errorFind functions that throw, catch, or handle specific error types

Find functions that throw, catch, or handle specific error types

No parameter schema in public metadata yet.

symbol_searchFind symbols by name or natural language (hybrid BM25 + semantic search)

Find symbols by name or natural language (hybrid BM25 + semantic search)

No parameter schema in public metadata yet.

get_callersWho calls this? (with transitive depth)

Who calls this? (with transitive depth)

No parameter schema in public metadata yet.

get_calleesWhat does it call? (with transitive depth)

What does it call? (with transitive depth)

No parameter schema in public metadata yet.

get_detailed_symbolFull symbol info: source, callers, callees, complexity

Full symbol info: source, callers, callees, complexity

No parameter schema in public metadata yet.

get_symbol_infoQuick metadata: signature, visibility, kind

Quick metadata: signature, visibility, kind

No parameter schema in public metadata yet.

get_dependency_graphFile/module import relationships with depth control

File/module import relationships with depth control

No parameter schema in public metadata yet.

get_call_graphFunction call chains (callers and callees)

Function call chains (callers and callees)

No parameter schema in public metadata yet.

find_by_importsFind files importing a module

Find files importing a module

No parameter schema in public metadata yet.

find_by_signatureSearch by param count, return type, modifiers

Search by param count, return type, modifiers

No parameter schema in public metadata yet.

find_entry_pointsMain functions, HTTP handlers, CLI commands, event handlers

Main functions, HTTP handlers, CLI commands, event handlers

No parameter schema in public metadata yet.

find_implementorsFind all functions registered as ops struct callbacks

Find all functions registered as ops struct callbacks

No parameter schema in public metadata yet.

find_related_testsTests that exercise a given function

Tests that exercise a given function

No parameter schema in public metadata yet.

traverse_graphCustom graph traversal with edge/node type filters

Custom graph traversal with edge/node type filters

No parameter schema in public metadata yet.

reindex_workspaceFull or incremental workspace reindex

Full or incremental workspace reindex

No parameter schema in public metadata yet.

index_filesAdd/update specific files without full reindex

Add/update specific files without full reindex

No parameter schema in public metadata yet.

index_directoryAdd directory to graph alongside existing data

Add directory to graph alongside existing data

No parameter schema in public metadata yet.

memory_storeStore memories (BM25 + semantic)

Store memories (BM25 + semantic)

No parameter schema in public metadata yet.

memory_getRetrieve memories

Retrieve memories

No parameter schema in public metadata yet.

memory_searchSearch memories (BM25 + semantic)

Search memories (BM25 + semantic)

No parameter schema in public metadata yet.

memory_contextGet memories relevant to a file/function

Get memories relevant to a file/function

No parameter schema in public metadata yet.

memory_listBrowse memories

Browse memories

No parameter schema in public metadata yet.

memory_invalidateRetire memories

Retire memories

No parameter schema in public metadata yet.

memory_statsMonitor memories

Monitor memories

No parameter schema in public metadata yet.

pr_contextOne-call PR review: blast radius, test coverage and gaps, affected modules, change classification, stale-doc warnings, complexity, commit-message hint, suggested reviewers

One-call PR review: blast radius, test coverage and gaps, affected modules, change classification, stale-doc warnings, complexity, commit-message hint, suggested reviewers

No parameter schema in public metadata yet.

index_markdownIndex a local .md file into the persistent docs store with heading-tree chunking and leaf-node embeddings

Index a local .md file into the persistent docs store with heading-tree chunking and leaf-node embeddings

No parameter schema in public metadata yet.

search_docsSemantic search over indexed docs, returning matching sections with heading-path breadcrumbs

Semantic search over indexed docs, returning matching sections with heading-path breadcrumbs

No parameter schema in public metadata yet.

list_doc_sourcesList all indexed source files

List all indexed source files

No parameter schema in public metadata yet.

remove_doc_sourceRemove all indexed chunks from a source file

Remove all indexed chunks from a source file

No parameter schema in public metadata yet.

verify_designCross-reference doc claims vs code graph (forward, reverse, or both)

Cross-reference doc claims vs code graph (forward, reverse, or both)

No parameter schema in public metadata yet.

design_gapsFind identifiers described in docs that don't exist in code yet

Find identifiers described in docs that don't exist in code yet

No parameter schema in public metadata yet.

generate_architecture_docAuto-generate a structured ARCHITECTURE.md from the live code graph

Auto-generate a structured ARCHITECTURE.md from the live code graph

No parameter schema in public metadata yet.

Readme

CodeGraph

Cross-language code intelligence for AI agents and developers.

License

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.

Quick Start

MCP Server (Claude Code, Cursor, any MCP client)

Add to ~/.claude.json (or your MCP client config):

{
  "mcpServers": {
    "codegraph": {
      "command": "/path/to/codegraph-server",
      "args": ["--mcp"]
    }
  }
}

The server indexes the current working directory automatically.

VS Code Extension

Install the VSIX:

code --install-extension codegraph-0.21.2.vsix

View the full README on GitHub

Details

Repository
github.com/codegraph-ai/codegraph
Categories
Developer Tools, Memory & Context
Package
@astudioplus/codegraph-mcp
Transport
STDIO
Registry
MCP registry, active

Questions

What does the Codegraph MCP server let an AI agent do?

Codegraph builds a semantic graph of your codebase and exposes it through 42 MCP tools, letting an agent find callers, predict blast radius, and get context before editing. It parses 38 languages via tree-sitter, so agents get structured code understanding instead of grepping through files.

Where does Codegraph rank among Developer Tools MCP servers?

On the Developer Tools category page on Claude Marketplaces, Codegraph ranks in the top 100. Other top servers in the category include Front-End Checklist, Context7, Chrome DevTools MCP, Codebase Memory and Mcp Server Filesystem.

Which tools does Codegraph provide for pull request review?

The pr_context tool gives a one-call PR review covering blast radius, test coverage and gaps, affected modules, and suggested reviewers. The README also shows running it in CI with codegraph-server --graph-only, which needs no API keys, only the built-in GITHUB_TOKEN.

How do I connect Codegraph to Claude Code?

Add a mcpServers entry named codegraph to ~/.claude.json with the path to codegraph-server and the args --mcp. The server indexes the current working directory automatically, and it uses the stdio transport.

Does Codegraph have a memory feature for agents?

Yes, Codegraph includes a persistent memory layer with tools to store, get, search, list, retire and monitor memories using BM25 and semantic search. The memory_context tool returns memories relevant to a given file or function.

Similar to Codegraph

More Developer Tools