codegraph
MCP server by codegraph-ai Community
CodeGraph builds a semantic graph of a codebase and exposes it to AI assistants through 42 MCP tools. It is aimed at AI agents and developers who need code understanding beyond grepping files.
Install codegraph
Built from the published package, never by AI.
claude mcp add codegraph -- npx -y @astudioplus/codegraph-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"codegraph": {
"args": [
"-y",
"@astudioplus/codegraph-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"codegraph": {
"args": [
"-y",
"@astudioplus/codegraph-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"codegraph": {
"args": [
"-y",
"@astudioplus/codegraph-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add codegraph -- npx -y @astudioplus/codegraph-mcp{
"mcpServers": {
"codegraph": {
"args": [
"-y",
"@astudioplus/codegraph-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add codegraph npx -y @astudioplus/codegraph-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the codegraph block.
About
CodeGraph builds a semantic graph of your codebase, covering functions, classes, imports and call chains. It parses 38 languages via tree-sitter and exposes the graph through 42 MCP tools. The server indexes the current working directory automatically, and a --graph-only flag skips embeddings for faster structural queries.
Agents get structured code understanding instead of grepping through files. Tools cover context for editing, impact analysis, complexity, circular dependencies and pattern search. The project also ships a VS Code extension, a JetBrains plugin, a persistent memory layer and a GitHub Action for PR review. It is built for AI agents and developers.
Written from the project's README and checked against it.
Tools it gives your assistant
get_ai_contextIntent-aware context with token budgeting: source, related symbols, imports, siblings and debug hints.get_edit_contextSource, callers, tests, memories and git history needed before editing.get_curated_contextCross-codebase context for a natural language query.analyze_impactPredicts the blast radius of modifying, deleting or renaming code.analyze_complexityCyclomatic complexity with a breakdown of branches, loops, nesting and exceptions.find_circular_depsDetects circular import and dependency chains across files.find_hot_pathsRanks the most-called functions by transitive caller count.find_dead_importsFinds imported modules that are never referenced.get_module_summarySummarises a directory: file count, functions, languages and complex functions.search_by_patternRegex search across function bodies, signatures, names and docstrings.
What you need
- An MCP client such as Claude Code, Cursor or another MCP-compatible client
- VS Code or a JetBrains IDE, only if you want the editor plugins
- GITHUB_TOKEN, built into GitHub Actions, for the PR review workflow
Try asking
- What would break if I rename this function?
- Show the callers and tests before I edit this function.
- Find circular dependencies in this project.
Good to know
- In --graph-only mode, semantic search and memory tools are unavailable.
- The full 42-tool surface adds to the agent's prompt-context cost. Profiles can narrow it.
- The analysis engine is a native binary that runs with your permissions and is downloaded separately.
- CodeGraph Pro adds 27 more tools, 17 of them security analyzers.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to codegraph
All alternatives →Creates, opens, edits and exports Word, Excel, PowerPoint and PDF files through the MR Office MCP server. It suits AI assistants that need to work on real office documents, with the editor shown in chat when the client supports MCP Apps.
Parses Korean documents such as HWP, HWPX, PDF, XLSX, DOCX and PPTX into Markdown, and writes HWPX or HWP official documents from Markdown. It runs as a library, CLI, HTTP API or MCP server for AI assistants.
Desktop Commander is an MCP server that lets an AI assistant run terminal commands, edit files and manage processes on your computer. It is for developers and users who want an assistant to work with local code and text.
Connects AI assistants to the Linear GraphQL API so they can manage projects, issues, and documents. Built for teams that want planning and project-management workflows in Linear, beyond basic issue CRUD.
pptx-viewer MCP server and tools: manipulate, convert, and collaborate on PowerPoint .pptx files from AI agents.
Reactive Resume is a free, open-source resume builder with an MCP server for document management, imports, exports, checks and job application workflows. It suits people who want to write and track resumes and keep their data under their own control. The source describes the app itself and does not describe the DeepSeek Harness connection.
Compare with MR Office, kordoc or Desktop Commander
codegraph: common questions
Does CodeGraph need an API key?
The GitHub Action runs graph-only, with no embeddings, no ONNX model and no API keys, using the built-in GITHUB_TOKEN. The source does not list API key requirements for the MCP server.
Which programming languages does CodeGraph support?
CodeGraph parses 38 languages via tree-sitter. Identifiers in camelCase languages such as TypeScript, Java and C# are also embedded in word-split form.
Can I use CodeGraph with Claude Code or Cursor?
Yes. The source shows setup for Claude Code through ~/.claude.json and says it works with Cursor and any MCP client.
How do I install codegraph?
In Claude Code run claude mcp add codegraph -- npx -y @astudioplus/codegraph-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is codegraph the official server?
codegraph is a community project by codegraph-ai, not verified by a company domain.
Is codegraph free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is codegraph safe to use?
It scores 83 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to codegraph?
Similar MCP servers: MR Office, kordoc, Desktop Commander, MCP Linear.
Does codegraph work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
