CodeGraphy
Local-First Architecture Canvas · MCP Server

Map your codebase. Cut AI context bloat by 83%.

CodeGraphy turns your repository into an interactive dependency graph, prunes boilerplate via AST while keeping types and signatures intact, and detects architectural drift locally.

$ pip install codegraphy-lite
Explore UI
~82.8%
Weighted token savings
O(V+E)
Tarjan cycle detection
11 Tools
STDIO MCP server
100% Local
Zero code leaves machine

Inside CodeGraphy

Click through the five core views: canvas, token inspector, layered swimlanes, linter, and blast radius.

Main Workspace — Graph + Explorer + AI Context
Lite & Pro
CodeGraphy Main Workspace

Explore your entire repository as an interactive dependency graph with a live file tree on the left and compiled AI context metrics on the right.

AST Smart Context

Keep signatures. Drop boilerplate.

Instead of pasting 16 raw files into your coding assistant, CodeGraphy keeps the target file in Full mode and compresses 1-hop dependencies to AST skeletons (types, classes, imports, and function signatures).

Compiled Tokens
~13,288
Savings vs Raw
72%
Raw Baseline
47,795
dependency_context.py HYBRID (Full target + AST deps)

            

Built for real codebases

Everything runs locally on your machine — fast AST parsing, deterministic graph layout, and native MCP integration.

Unified Graph & Split Layers

Visualize Frontend UI, Backend API, and Core modules in automatic swimlanes with 1-hop neighbor isolation.

Multi-Language AST Pruning

Tree-sitter powered skeleton extraction preserves imports, types, and signatures while cutting up to 85% of token noise.

Architecture Drift Linter

Tarjan O(V+E) strongly connected components detect circular imports, layer boundary breaks, and god modules.

Blast Radius & Git Diff

Trace reverse upstream callers before refactoring shared interfaces and compare architectural changes across commits.

STDIO MCP Server

Connect directly to Claude Code, Cursor, Windsurf, or Cline so agents query architecture instead of grepping blind.

Hybrid Context Inspector

Audit exact token counts, verify disk provenance, redact secrets, and override files between Full, AST, or Off.

Lite (Open Source) vs Pro

Start free with CodeGraphy Lite via pip, or upgrade to Pro for full-repo AST compression and impact tooling.

Capability CodeGraphy Lite CodeGraphy Pro
Interactive Architecture Canvas & Lanes Included Included
Project Scan Limit Up to 35 files Unlimited
MCP Server Tools (STDIO) 3 core tools Full 11 tools
AST Smart Context (-85% tokens) — Included
Hybrid Context Inspector & Secret Redaction — Included
Blast Radius, Git Diff & Test Impact — Included