Provides cross-language code intelligence for C++, allowing AI agents to analyze call chains, dependencies, and code complexity.
Enables mining and searching git commit history to extract architectural insights and maintain a persistent memory layer of code changes.
Offers semantic understanding of Kotlin codebases, including impact analysis, dependency mapping, and symbol search.
Facilitates semantic analysis of PHP code, providing tools for detailed symbol discovery and call graph traversal.
Supports deep analysis of Python projects, offering tools for symbol search, call graph navigation, and unused code detection.
Enables semantic exploration of Ruby codebases, including dependency graph generation and impact analysis.
Provides semantic graph building and navigation for Rust projects, including cross-file symbol resolution and complexity metrics.
Enables semantic search and impact analysis for Swift source code, identifying callers, callees, and related symbol metadata.
Provides comprehensive semantic intelligence for TypeScript projects, including call chains, symbol search, and module dependency analysis.
CodeGraph
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 31 tools, a VS Code extension, and a persistent memory layer. AI agents get structured code understanding instead of grepping through files.
Quick Start
MCP Server (Claude Code, Cursor, any MCP client)
npm install -g @memoryx/codegraph-mcpAdd to ~/.claude.json (or your MCP client config):
{
"mcpServers": {
"codegraph": {
"command": "codegraph-mcp",
"args": []
}
}
}The server indexes the current working directory automatically — no --workspace flag needed. It also accepts MCP roots from the client for workspace discovery.
VS Code Extension
code --install-extension codegraph-0.9.0.vsixThe extension registers 30 tools as VS Code Language Model Tools. To steer Copilot toward using them:
// .vscode/settings.json
{
"github.copilot.chat.codeGeneration.instructions": [
"When analyzing code structure, callers, callees, dependencies, or complexity, prefer codegraph_* tools over file search. CodeGraph has a pre-built semantic graph that returns structured results instantly."
]
}Tools (31)
Code Analysis (9)
Tool | What it does |
| Primary context tool. Intent-aware (explain/modify/debug/test) with token budgeting. Returns source, related symbols (full or signature-only), file imports, sibling functions, debug hints, architecture. |
| Everything needed before editing: source + callers + tests + memories + git history |
| Cross-codebase context for a natural language query ("how does auth work?") |
| File/module import relationships with depth control |
| Function call chains (callers and callees) |
| Blast radius prediction — what breaks if you modify, delete, or rename |
| Cyclomatic complexity with breakdown (branches, loops, nesting, exceptions, early returns) |
| Dead code detection with confidence scoring |
| Module coupling metrics and instability scores |
Code Navigation (12)
Tool | What it does |
| Find symbols by name (hybrid BM25 + semantic search) |
| Who calls this? What does it call? (with transitive depth) |
| Full symbol info: source, callers, callees, complexity |
| Quick metadata: signature, visibility, kind |
| Find files importing a module ( |
| Search by param count, return type, modifiers |
| Main functions, HTTP handlers, tests |
| Tests that exercise a given function |
| Custom graph traversal with edge/node type filters |
| Search across all indexed projects |
Memory (10)
Persistent AI context across sessions — debugging insights, architectural decisions, known issues.
Tool | What it does |
| Store, retrieve, search memories (BM25 + semantic) |
| Get memories relevant to a file/function |
| Browse, retire, monitor |
| Auto-create memories from commits |
| Semantic search over commit history |
All tool names are prefixed with codegraph_ (e.g. codegraph_get_ai_context).
Languages
15 languages parsed via tree-sitter — all with functions, imports, call graph, complexity metrics, dependency graphs, symbol search, impact analysis, and unused code detection:
TypeScript/JS, Python, Rust, Go, C, C++, Java, Kotlin, C#, PHP, Ruby, Swift, Tcl, Verilog
Architecture
MCP Client (Claude, Cursor, ...) VS Code Extension
| |
MCP (stdio) LSP Protocol
| |
└───────────┐ ┌───────────┘
▼ ▼
┌─────────────────────────────┐
│ Shared Domain Layer (16 modules) │
├─────────────────────────────┤
│ 14 tree-sitter parsers │
│ Semantic graph engine │
│ AI query engine (BM25) │
│ Memory layer (RocksDB) │
│ Fastembed (384d ONNX) │
│ HNSW vector index │
└─────────────────────────────┘A single Rust binary serves both MCP and LSP. Both protocols call the same domain layer — identical logic, identical results.
Indexing: Sub-10s for 100k LOC. Incremental re-indexing on file changes.
Queries: Sub-100ms for navigation. Cross-file import and call resolution at index time.
Embeddings: fastembed BGE-Small-EN-v1.5 (384d). Auto-downloads on first run.
Indexing Configuration
Auto-indexing is off by default. Use the command palette (CodeGraph: Index Directory) for on-demand indexing, or configure paths:
// .vscode/settings.json
{
"codegraph.indexOnStartup": true,
"codegraph.indexPaths": [
"/path/to/project-a",
"/path/to/project-b"
],
"codegraph.excludePatterns": ["**/logs/**", "**/*.bin"],
"codegraph.maxFileSizeKB": 1024
}indexPaths accepts any absolute paths — they don't have to be inside your workspace. All paths are indexed into a single unified graph. In multi-root workspaces, put indexPaths in one settings.json only (arrays are not merged across folders).
Always-skipped directories: node_modules, target, .git, dist, build, out, __pycache__, vendor, DerivedData, tmp, coverage, logs.
Building from Source
git clone https://github.com/codegraph-ai/codegraph-vscode
cd codegraph-vscode
npm install
cargo build --release -p codegraph-lsp # Rust server
npm run esbuild # TypeScript extension
npx @vscode/vsce package # VSIXRequires Node.js 18+, Rust stable, VS Code 1.90+.
License
Apache-2.0
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.