CodeGraph MCP
Provides framework-aware route discovery for Django applications, enabling discovery of Django routes, handlers, and related evidence.
Provides framework-aware route discovery for Express.js applications, enabling discovery of Express routes, handlers, and related evidence.
Provides framework-aware route discovery for FastAPI applications, enabling AI agents to list and inspect FastAPI routes, handlers, and related evidence.
Provides framework-aware route discovery for Flask applications, enabling discovery of Flask routes, handlers, and related evidence.
Provides Git diff and blast-radius impact analysis, identifying changed files, modified symbols, and affected callers, callees, and routes across Git revisions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why CodeGraph MCP?
When AI coding agents explore multi-file repositories using raw text search (grep, find), they waste 60% to 80% of LLM context windows parsing irrelevant files to reconstruct call chains, router mounts, dependency injection trees, and ORM schemas. This triggers hallucinations, token exhaustion, and silent regressions.
CodeGraph MCP replaces heuristic guessing with compiler-grade AST facts:
Deterministic Evidence Guarantee: Every relationship is verified via Abstract Syntax Trees (
AST_VERIFIED,FRAMEWORK_VERIFIED) or explicitly flagged asUNKNOWN/POSSIBLE. Zero invented edges.82.7% to 94.7% Token Reduction: Delivers compact, bounded context packets (~510 tokens) instead of dumping entire source files.
Sub-15ms Incremental Watcher: Native OS kernel events (macOS FSEvents, Linux inotify, Windows ReadDirectoryChangesW) sync index changes in real time.
Multi-Language Engine: Native AST parsers for Python, TypeScript/JavaScript, Roblox/Luau, Go, Rust, Java, and C/C++.
+-------------------------------------------------------------+
| AI CODING AGENT |
| (Claude Code * Cursor * Antigravity) |
+------------------------------+------------------------------+
| Model Context Protocol (stdio / SSE)
v
+-------------------------------------------------------------+
| CODEGRAPH MCP ENGINE |
+------------------------------+------------------------------+
| AST Code Relationships | Full-Stack API Bridge |
| (Callers, Callees, DI) | (React/Next.js -> FastAPI) |
+------------------------------+------------------------------+
| Database Lineage Graph | Sub-15ms Live Watcher |
| (Prisma, SQLAlchemy, ORMs) | (OS Kernel Push & Debounce) |
+------------------------------+------------------------------+
|
v
Deterministic * Local-First * Verified EvidenceRelated MCP server: spine
Quick Start (Under 60 Seconds)
1. Installation
Install CodeGraph directly from PyPI:
pip install "codegraph-engine[mcp]"Verify your environment:
codegraph doctor --database2. Connect Your AI Coding Agent
Claude Desktop & Antigravity Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"codegraph": {
"command": "codegraph",
"args": ["mcp", "serve"]
}
}
}Cursor Integration
Navigate to Settings > Features > MCP Servers > Add New MCP Server:
Name:
codegraphType:
commandCommand:
codegraph mcp serve
One-Click Installer for All Editors
codegraph installAutomatically configures Claude Code, Cursor, Antigravity, and Cline.
3. Launch the Interactive Web Dashboard
codegraph uiOpens the interactive knowledge visualizer on http://127.0.0.1:8765 with real-time route inspection, database lineage maps, and PR blast radius exploration.
Benchmarks & Measured Performance
CodeGraph MCP performance and token savings are empirically validated across multi-language production codebases and standardized agent benchmarks:
Performance Metric | Unassisted AI Agents (Raw Grep / File Dumps) | CodeGraph MCP Engine | Measured Improvement | Evaluation Source |
Context Window Token Usage | 13,000 - 35,000+ tokens | 1,600 - 3,000 tokens | 82.7% - 94.7% token reduction | Production Repositories |
Direct File Token Overhead | Full file reads required | Bounded slices via | 41.8% token savings | 50-Task Retrieval Benchmark |
Hallucinated Edges & Claims | 18.5% - 34.0% false edges | 0.0% ( | 100% eliminated | 32-Task Navigation Eval |
Agent Exploration Tool Calls | 164 total calls (~5.1 / task) | 71 tool calls (~2.2 / task) | 56.7% fewer tool calls | 32-Task Navigation Eval |
Query Latency (SQLite WAL) | Full rescan (1.2s - 6.5s) | < 15ms per query | Permanent WAL concurrency | FastMCP Server Daemon |
Binary CSR Pathfinding | Linear graph scan | < 1ms traversal | Microsecond CSR search |
|
Git Freshness Verification | 450ms - 2,100ms disk stat | < 5ms (Commit fast path) | 99% faster checks | Git Commit Verification |
CI/CD Quality Gates | - | 100% Pass Rate | Ubuntu, macOS, Windows | GitHub Actions v3.0.3 |
Licensing & Pricing
CodeGraph MCP operates on a developer-first commercial licensing model:
Tier | Best For | Price | Core Inclusions |
Community Free | Single Developer on Local Laptop | 100% Free Forever | Unlimited AST queries, local SQLite ( |
Team Trial | Teams & Shared Databases | Free for 14 Days | Up to 10 team seats, PostgreSQL cloud DB support, team CI/CD integration, full commercial feature access. |
Team Pro | Production Teams & Enterprises | Contact / Stripe | Cryptographic offline-first licenses, priority support, unlimited seats, custom database integrations. |
Managing Licensing & Trials via CLI
Inspect current status:
codegraph auth statusStart 14-day team trial (up to 10 seats):
codegraph auth trial --team "Engineering"Activate purchased commercial key:
codegraph auth activate --key "CGPRO_eyJhbGci..."Upgrade via Stripe checkout:
codegraph auth buyOfficial PyPI download metrics:
codegraph metrics --downloadsThree Pillars of CodeGraph MCP
Pillar 1: Unified Full-Stack Bridge (codegraph api-drift)
Statically matches frontend client fetchers (React, Next.js, Vue fetch<T>(), axios.get<T>(), useSWR<T>(), useQuery<T>()) to backend route handlers in FastAPI, Flask, Django, Express, and NestJS. Automatically detects schema drift, orphaned endpoints, and missing parameters before deployment.
Pillar 2: Semantic Change Impact & PR Blast Radius (codegraph impact)
Calculates the exact downstream ripple effect of git diffs or proposed symbol edits:
Traces affected callers -> UI components -> HTTP endpoints -> database tables -> covering tests.
Outputs quantitative PR risk scores (0-100:
LOW,MEDIUM,HIGH,CRITICAL).Identifies exact pytest/jest commands required to test the changes.
Pillar 3: Sub-15ms Incremental Live Watcher (codegraph watch)
Uses OS kernel-level push notifications to detect file changes with a 250ms sliding debounce. Reindexes modified files in under 15ms and invalidates in-memory caches without full-tree rescanning.
First-Class Roblox & Luau Intelligence (codegraph roblox)
Full support for .lua, .luau, and roblox-ts:
Rojo DataModel Mapping: Maps
default.project.jsonvirtual paths (ReplicatedStorage,ServerScriptService) to physical disk locations.Client <-> Server Remotes: Statically traces
RemoteEvent:FireServer->OnServerEvent:Connect(handler)andRemoteFunction:InvokeServer->OnServerInvoke.DataStore Lineage: Analyzes
DataStoreServiceandProfileServicepersistence reads and writes.
CLI Reference Cheatsheet
Command | Purpose |
| Launch the FastMCP stdio server for AI agents. |
| Open the interactive knowledge visualizer on |
| Start background sub-15ms incremental live watcher daemon. |
| Compute downstream PR blast radius and impacted test suites. |
| Validate frontend client fetchers against backend API endpoints. |
| Inspect Roblox client-server remote events and handlers. |
| Check license tier, database mode, and trial days remaining. |
| Activate a 14-day free team trial for up to 10 seats. |
| Display real-time PyPI download metrics for |
| Check environment health, database connectivity, and permissions. |
Documentation & Links
Documentation: https://raghurammrsd.github.io/CODEGRAPH_MCP/
PyPI Package: https://pypi.org/project/codegraph-engine/
GitHub Repository: https://github.com/raghurammrsd/CODEGRAPH_MCP
FastMCP 97-Tool Specification: docs/agent-brain.md
Report an Issue: https://github.com/raghurammrsd/CODEGRAPH_MCP/issues
License
Source-available evaluation with a Free-Forever Community Tier for single developers on local machines. Commercial team collaboration and cloud database instances require a Team Trial or paid subscription. See LICENSE.md for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.4MIT
- AlicenseNot gradedqualityBmaintenanceProvides local-first repository architecture analysis with file-level proof, enabling agents to map codebases, locate implementations, trace call paths, and assess change impact with deterministic evidence.4 npm11MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a local structural code graph, inspect relationships and impact, and retrieve focused project context before reading full files.24 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to query a codebase as a graph, retrieving definitions, callers, callees, dependencies, and focused context so they fetch only the code they need instead of reading whole repositories.MIT