gographctx
Short Interactive Demo
Related MCP server: polycodegraph
Why Use GoGraphCtx?
AI coding agents struggle on real codebases for three reasons:
The "Context Tax" of
grepandglob: Agents waste thousands of tokens and dozens of round-trips scanning comments, imports, and homonyms (Service.runvsJob.run) instead of traversing actual cross-file call chains.Silent Guesses in Heuristic Graph Tools: Legacy code-graph tools often emit fallback guesses (substring path matches or alphabetical-first matches) as verified call edges, causing agents to miss callers or refactor the wrong function.
Heavy Infrastructure: Python/Cypher graph servers require Neo4j/FalkorDB/Docker containers, ~90 pip dependencies, or brittle per-language LSP setups, taking seconds per query and hundreds of megabytes of RAM.
GoGraphCtx solves all three in one 15.8 MB static binary:
Pure-Go AST & Resolution Engine: Compiled-in
gotreesitterparsers (CGO_ENABLED=0) for Go, Python, TypeScript/TSX, JavaScript/JSX, Rust, and Java.8-Tier Confidence Model: Every edge carries explicit confidence (
certainvsLIKELY_CALLSvsCallSiteevidence). Speculative guesses are never misrepresented as verified facts.Zero External Graph Database: Builds an indexed in-memory graph and persists an atomic, zstd-compressed binary snapshot + CRC32C Write-Ahead Log (
.ggctx/index.ggctx).7 Token-Budgeted MCP Tools: Designed around strict LLM context budgets (
default: 4000tokens) with binary-search shrinking, repo-relative paths, and confidence summaries—instead of 30–50 noisy overlapping tools.Real-Time Incremental Watcher (
~22.8ms):fsnotifyre-indexes changed files and affected reverse-dependents in milliseconds alongside live MCP serving.
30-Second Quickstart
1. Install (No Go Required)
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/roshankumar0036singh/gographctx/main/scripts/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/roshankumar0036singh/gographctx/main/scripts/install.ps1 | iexGo toolchain (Go 1.25+) or GitHub Releases:
go install github.com/roshankumar0036singh/gographctx/cmd/gographctx@latest(Or build locally from source: git clone https://github.com/roshankumar0036singh/gographctx.git && cd gographctx && make build.)
2. Index & Query Any Repository
# Index a repository in ~0.5s (creates .ggctx/index.ggctx)
gographctx index ./your-repo
# Check index statistics & resolution coverage
gographctx stats ./your-repo
# Run an impact analysis query directly from CLI
gographctx query get_impact pkg::Service::Handle --path ./your-repo3. Connect Your AI Coding Agent (MCP)
claude mcp add gographctx -- gographctx watch /absolute/path/to/your/repoAdd to ~/.cursor/mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"gographctx": {
"command": "gographctx",
"args": ["watch", "/absolute/path/to/your/repo"]
}
}
}{
"servers": {
"gographctx": {
"type": "stdio",
"command": "gographctx",
"args": ["serve", "${workspaceFolder}"]
}
}
}Measured Benchmarks & Multi-Tool Comparison
All GoGraphCtx numbers below were measured directly via cmd/ggctx-bench (go1.25.1, windows/amd64, 16 vCPUs):
Benchmark Metric | Measured Result | Target SLA |
Flask-scale Python repo (83 | 533.39 ms / 51.02 MB RSS |
|
Go monorepo (1,000 | 1,401.70 ms / 116.92 MB RSS |
|
Flask strong-tier call edge ratio | 100.0% ( |
|
Incremental file update (body edit / export change, p50) | 22.78 ms / 22.77 ms |
|
MCP tool query latency (warm stdio, p95) | 3.80 ms |
|
CLI cold startup ( | 22.80 ms |
|
Stripped static binary ( | 15.79 MB |
|
How GoGraphCtx Compares Against Other Code Intelligence Tools
Tool | Category | Runtime / Setup | Call Graph | Impact BFS | Confidence Tiers | Key Trade-off vs GoGraphCtx |
GoGraphCtx | Code-Graph MCP | 15.8 MB static Go binary, zero external DB | Yes | Yes ( | Yes (8 tiers + | 98.4% Flask precision, sub-second index, zero DB setup (trades aggressive speculative guesses for high-precision edges + explicit unresolved disclosure) |
CodeGraphContext (CGC) | Code-Graph MCP | Python + ~90 pip deps + Neo4j / FalkorDB / Kuzu | Yes | Yes | Partial (emits Tier 7–8 guesses as facts; ~61% of edges) | 69.2% Flask precision, higher heuristic recall (~70% vs Jedi), requires Cypher DB & Python env |
SCIP ( | Compiler Oracle | Node/Python/Go toolchain + full dependency install | Yes | External script | Exact compiler oracle | Requires buildable env & project deps installed |
Universal Ctags | Tag Indexer | Native CLI binary | No | No | No | No cross-file call graph or receiver type resolution |
ast-grep ( | AST Search CLI | Rust binary | No | No | Exact syntax match | Great ad-hoc syntax search, no persistent call/impact graph |
Serena | LSP MCP Server | Python + live language servers ( | Yes | Limited | Type-checker-backed | Heavier LSP warmup & 50+ tool context footprint |
ripgrep ( | Lexical Search | Rust binary | No | No | Text only | Fast regex, high noise on homonyms/imports/comments |
See docs/benchmarks.md for reproduction commands (ggctx-bench), SCIP ground-truth evaluation details, and CI release regression workflows.
7 Focused MCP Tools
Tool | Purpose | Key Parameters |
| Pattern/kind/file/language symbol lookup |
|
| Direct callers with confidence tier & call sites |
|
| Direct callees with confidence tier & call sites |
|
| Transitive reverse-dependency blast radius |
|
| Structured imports, classes, functions, fields, vars |
|
| Multi-filter query with cyclomatic complexity |
|
| Repo metrics, language mix & coverage summary |
|
Full JSON schemas and envelope examples are documented in docs/mcp-tools.md.
Comprehensive Documentation
MCP Tools Reference — Complete schemas, confidence summaries, and token-budget truncation behavior
CLI, Configuration & IDE Setup —
index,serve,watch,query,stats,.ggctxrc,.ggctxignore,GGCTX_*env vars, and editor configsArchitecture & Storage — In-memory
Graph/ReadView, compact.ggctxbinary snapshots, CRC32C WAL, 8-tier resolver, andfsnotifywatcherLanguage Support Matrix — Go, Python, TypeScript/TSX, JavaScript/JSX, Rust, and Java AST + resolution capabilities
Benchmarks & SCIP Validation — Reproducible benchmark methodology and multi-tool comparison suite
Contributing Guide · Security Policy · Code of Conduct · MIT License
Roadmap (v0.2)
Package manager distribution (Homebrew tap formula, Scoop manifest, container image)
Expanded Python/TS/Rust framework idioms and cross-package trait/protocol resolution
Multi-repository workspace graph linking and richer CLI query presets
Contributing & Community
Contributions of all sizes are welcome! Check CONTRIBUTING.md to set up your local environment, add new language resolvers, or run make bench-suite.
If GoGraphCtx saves tokens and time for your AI coding workflow, please consider giving the repository a Star!
Available Tools
7 toolsfile_outlineA
Return the structured symbol outline (module, imports, classes/fields, functions/methods, variables, type aliases) of a source file.
Inputs: file (required), include_private.
find_symbolB
Find code symbols (functions, classes, structs, interfaces, variables, type aliases) by name pattern, kind, file, or language.
Inputs: file, kind, name, limit, +2 more.
get_calleesA
Return functions and methods called by a source function with confidence tiers and source line sites.
Inputs: symbol (required), file, limit, include_likely.
get_callersB
Return direct callers of a target function or method with confidence tiers and exact call-site locations.
Inputs: symbol (required), file, limit, include_likely.
get_impactB
Compute transitive reverse-dependency blast radius for a symbol up to max_depth hops, separated by certain vs likely edges.
Inputs: symbol (required), file, limit, max_depth.
repo_overviewA
Return aggregate repository statistics: file counts, symbol/edge breakdowns, language distribution, resolution coverage, and complexity distribution.
Inputs: limit, include_top_complex.
search_codeC
Multi-criteria search across indexed symbols filtering by name, qualified name, kind, language, file, export status, and cyclomatic complexity.
Inputs: kinds, limit, offset, languages, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
get_callers, get_callees, get_impact, file_outline, and repo_overview each target a clearly distinct aspect of the code graph. However, find_symbol (find symbols by name pattern, kind, file, language) and search_code (multi-criteria symbol search by name, qualified name, kind, language, file, export status, complexity) overlap heavily, making it hard to know which to pick for a simple symbol lookup.
All names are consistent snake_case, and the get_/find_/search_ verbs are used with reasonable intent. The only wrinkle is that file_outline and repo_overview are bare noun compounds rather than verb_noun, a minor deviation from the otherwise predictable pattern.
Seven tools is well within the ideal range and each tool maps to a distinct analysis need (callers, callees, impact, symbol lookup, file structure, repo stats). Nothing feels padded or missing at the count level.
The core call-graph and symbol surface is solid, but there are notable gaps for a code-intelligence server: no find_references for non-call uses (types, fields), no implementation/override or type-hierarchy lookup, and no path-trace between two symbols. Agents can partially work around these via search_code and get_impact, but the surface is not fully complete.
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Shared context for your codebase: a hosted code knowledge graph over MCP. Free plan, OAuth sign-up.
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseAqualityDmaintenanceCross-repository code knowledge graph MCP server for Java, Kotlin, JavaScript, and TypeScript. Indexes source code into embedded KuzuDB via tree-sitter and exposes 30+ tools for call-flow tracing, multi-hop taint analysis (OWASP/CWE/PCI/STIG), entry-point reachability filtering, performance hotspot detection, and license compliance — without reading source files. 95% fewer tokens vs source-read332MIT
- AlicenseNot gradedqualityCmaintenanceMulti-language code-graph MCP server with 18 tools for structural code queries — find_symbol, callers, callees, blast_radius, dead_code, and cross-stack dataflow_trace from HTTP request through service layers to SQL. Tree-sitter parsing for Python, TypeScript, JavaScript, and Go; local-first, no API key required.18MIT
- AlicenseBqualityBmaintenanceHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 159 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.1749,252MIT

mcp-reposkeinofficial
AlicenseAqualityCmaintenanceDeterministic code-graph (GraphRAG) over your repo for LLM agents — local-first, git-native, zero-infra, served via MCP. Python, TS/JS, Rust, Go, Java, C#.813Apache 2.0