Skip to main content
Glama

Short Interactive Demo


Related MCP server: polycodegraph

Why Use GoGraphCtx?

AI coding agents struggle on real codebases for three reasons:

  1. The "Context Tax" of grep and glob: Agents waste thousands of tokens and dozens of round-trips scanning comments, imports, and homonyms (Service.run vs Job.run) instead of traversing actual cross-file call chains.

  2. 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.

  3. 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 gotreesitter parsers (CGO_ENABLED=0) for Go, Python, TypeScript/TSX, JavaScript/JSX, Rust, and Java.

  • 8-Tier Confidence Model: Every edge carries explicit confidence (certain vs LIKELY_CALLS vs CallSite evidence). 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: 4000 tokens) with binary-search shrinking, repo-relative paths, and confidence summaries—instead of 30–50 noisy overlapping tools.

  • Real-Time Incremental Watcher (~22.8ms): fsnotify re-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 | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/roshankumar0036singh/gographctx/main/scripts/install.ps1 | iex

Go 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-repo

3. Connect Your AI Coding Agent (MCP)

claude mcp add gographctx -- gographctx watch /absolute/path/to/your/repo

Add 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 .py files, 705 nodes, 2,208 edges)

533.39 ms / 51.02 MB RSS

< 1s / < 80 MB

Go monorepo (1,000 .go files, 6,002 nodes, 8,000 edges)

1,401.70 ms / 116.92 MB RSS

< 3s / < 150 MB

Flask strong-tier call edge ratio

100.0% (TierStructural..TierSamePackage)

>= 85%

Incremental file update (body edit / export change, p50)

22.78 ms / 22.77 ms

< 50ms / < 100ms

MCP tool query latency (warm stdio, p95)

3.80 ms

< 10 ms

CLI cold startup (gographctx version, p50)

22.80 ms

< 50 ms

Stripped static binary (CGO_ENABLED=0)

15.79 MB

< 30 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 (get_impact)

Yes (8 tiers + LIKELY_CALLS + unresolved_hints)

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 (scip-python, scip-go)

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 (sg)

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 (pyright, gopls)

Yes

Limited

Type-checker-backed

Heavier LSP warmup & 50+ tool context footprint

ripgrep (rg)

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

find_symbol

Pattern/kind/file/language symbol lookup

name, kind, file, language, exported_only, limit

get_callers

Direct callers with confidence tier & call sites

symbol, file, include_likely, limit

get_callees

Direct callees with confidence tier & call sites

symbol, file, include_likely, limit

get_impact

Transitive reverse-dependency blast radius

symbol, file, max_depth, limit

file_outline

Structured imports, classes, functions, fields, vars

file, include_private

search_code

Multi-filter query with cyclomatic complexity

name_pattern, qname_pattern, kinds, min_complexity, max_complexity

repo_overview

Repo metrics, language mix & coverage summary

include_top_complex, limit

Full JSON schemas and envelope examples are documented in docs/mcp-tools.md.


Comprehensive Documentation


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 tools
file_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

    B3.4/5.0

    Scored across 7 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness3/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Cross-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-read
      33
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Multi-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.
      18
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      High-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.
      17
      49,252
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Deterministic 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#.
      8
      13
      Apache 2.0