Skip to main content
Glama

graphdex

The code graph that's never stale.

A Python library + CLI + MCP server that maintains an always-correct structural code graph (functions, classes, imports, calls, tests) and serves token-budgeted, confidence-labeled context to AI coding agents.

Status: v0.1 core engine in development — Python parsing, two-pass import-aware resolution, subtoken search, and CLI are implemented; freshness (self-healing reads) and the MCP server land next. Design spec: docs/superpowers/specs/2026-07-17-graphdex-design.md.

Why graphdex

Code-graph tools for AI agents share four recurring weaknesses:

Problem elsewhere

graphdex answer

Stale graphs served as fresh when watchers die

Self-healing reads — every query dirty-checks the working tree and repairs the graph inline; every response carries a freshness field

Cross-file calls matched by bare name (false blast radii)

Import-aware two-pass resolution with per-edge confidence tiers (RESOLVED / IMPORT_INFERRED / NAME_ONLY) and min_confidence filtering

30 MCP tools taxing every agent request

8 consolidated tools that return source snippets inline within a token_budget

Search that only sees exact identifier names

Subtoken FTS5 indexinggetUserById matches "user by id"

Related MCP server: OpenCodeHub MCP Server

Planned surfaces (v1)

  • Library: from graphdex import Graphdex; gd = Graphdex("."); gd.callers_of("login")

  • CLI: graphdex build | status | search | impact | serve

  • MCP: graphdex serve (stdio) — works with Claude Code, Cursor, Codex, and any MCP client

v1 languages: Python, TypeScript, JavaScript (+JSX/TSX), Go, Rust, Java.

Credits

Clean-room implementation inspired by the excellent code-review-graph (MIT) — our analysis of its trade-offs shaped this design. No code is copied from it.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants with a structured, token-efficient map of a codebase's symbols, dependencies, and relationships via MCP tools like overview, query, and impact analysis.
    8
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.
    3
    Apache 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides structural code intelligence via 26 MCP tools, enabling AI assistants to query code symbols, dependencies, and call graphs accurately without file-pasting.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Serves structured code context via MCP, enabling AI agents to understand codebases with dependency graphs and significantly reduce token usage.
    22 npm
    MIT