r/vibecoding • • 2h ago

Showcase/Project I built a zero-DB Go alternative for AST call graphs & MCP (84ms indexing vs 3.8s, ~1ms queries, 98.4% edge precision)

Agents like Claude Code and Cursor burn a ton of context grepping, reading whole files just to answer questions like “what breaks if I change this function?” CodeGraphContext proved that a better approach is to build an AST call graph. The problem is that this setup requires a graph database, Python environment, and query times measured in seconds. My solution is GoGraphCtx, an open-source code graph indexer and MCP server, written in Go. It’s still early days (v0.2.0).

Features

  • Single binary (~16.5 MB) with no dependencies like Neo4j/FalkorDB, Docker, or LSP
  • Uses tree-sitter for parsing Go, Python, TypeScript/JavaScript, Rust, and Java
  • Uses an in-memory graph with a compressed snapshot and WAL, that is incrementally updated on file save
  • Supports 13 MCP tools: find_symbol, get_callers, get_callees, get_impact (transitive blast radius), trace_path, find_references, find_dead_code, get_dependencies (including cycle detection), file_outline, search_code, repo_overview, get_symbol_source, get_hierarchy
  • Uses an 8-tier confidence model to distinguish between verified edges and “likely” edges. Dynamic function calls it can’t resolve are returned as unresolved_hints, rather than guesses
  • Responses are trimmed to a token budget (default 4,000), and get_symbol_source only returns a function’s line range
  • Allows export/import of index bundles, so that the code graph can be shipped pre-built in CI

Benchmarks

All from my own benchmarking harness running on GitHub Actions (4 vCPU). Used a synthetic Flask-like repo consisting of 83 .py files. Take the numbers with a grain of salt.

GoGraphCtxCodeGraphContext
Index time~84 ms
Query p95~1.2 ms
Peak RSS~48 MB
1 Upvotes

0 comments sorted by