ts-review-graph
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ts-review-graphShow minimal context for reviewing changes to src/api/auth.ts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ts-review-graph
Build a TypeScript dependency graph in SQLite and tell Claude Code (via MCP) the minimal file set to read before any code review, implementation, or debugging session.
日本語: TypeScript プロジェクトの依存グラフを SQLite に構築し、コードレビュー・実装・デバッグ前に「読むべき最小ファイルセット」を Claude Code (MCP) に伝えるツール。
Why?
Claude Code reads too many files. It grabs large files one after another and stuffs unrelated code into its context.
ts-review-graph pre-builds the project's dependency graph and instantly computes the blast radius (impact surface) of changed files — so Claude only reads what matters.
Real-world benchmark (manako project)
From BENCHMARK.md:
Metric | Baseline | ts-review-graph | Reduction |
| 14 | 3 | −79% |
File content bytes | 219,139 | 58,583 | −73% |
Estimated tokens | ~54,784 | ~14,645 | −73% |
Graph size: 1,191 nodes / 1,400+ edges (Cloudflare Workers monorepo)
Related MCP server: depwire
Requirements
Node.js 20+
Installation
Single tsconfig
npx @elchika-inc/ts-review-graph@latest install --tsconfig tsconfig.jsonConfig is saved to .ts-review-graph/config.json, MCP server is registered in .mcp.json, and usage instructions are appended to CLAUDE.md. Restart Claude Code and the MCP server connects automatically.
Monorepo (multiple tsconfigs)
npx @elchika-inc/ts-review-graph@latest install \
--tsconfig apps/api/tsconfig.json \
--tsconfig apps/web/tsconfig.app.json \
--tsconfig apps/worker/tsconfig.jsonMultiple tsconfigs are merged into a single unified graph (tested with 1,191+ nodes across layers).
Usage
In Claude Code (automatic)
Claude calls get_minimal_context automatically before reading source files:
get_minimal_context(["src/routes/monitors.ts"], "implement")Example output (implement mode, apps/web + apps/api):
Changed: src/routes/monitors.ts
── Files affected (REVERSE depth=3) ──
1. src/routes/services.ts [IMPORTS_FROM]
── Files to change together (FORWARD depth=1) ──
1. src/env.ts [direct import]
2. src/lib/schemas.ts [direct import]
3. src/lib/format.ts [direct import]
4. packages/db/src/index.ts [direct import]
SKIP: 1170 other files — not in blast radiusCLI commands
Command | Description |
| Setup + initial build + register MCP + append |
| Rebuild the graph |
| Incremental update for a single file |
| Show graph statistics |
| Remove MCP registration |
MCP tools
Tool | Key args | Description |
|
| Minimal file set (REVERSE/FORWARD BFS) |
|
| Files affected by a change, with depth |
|
| Nodes that reference a type |
|
| Corresponding test files |
|
| General-purpose graph traversal |
|
| Rebuild the graph |
| — | Graph statistics |
BFS depth by mode
Mode | REVERSE | FORWARD | Use case |
| depth=2 | — | Pre-review impact analysis (downstream) |
| depth=3 | depth=1 (direct imports only) | Pre-implementation change surface (bidirectional) |
| depth=5 | — | Wide exploration for bug investigation |
Configuration
.ts-review-graph/config.json (auto-generated by install, commit to repo):
{
"tsconfigs": [
"apps/api/tsconfig.json",
"apps/web/tsconfig.app.json",
"apps/monitor-worker/tsconfig.json"
]
}graph.db is a build artifact — added to .gitignore automatically. Share config.json with your team.
How it works
Build phase
Load each
tsconfig.jsonWalk the AST using the TypeScript Compiler API
Extract import/export/type relationships
Store nodes and edges in SQLite (
graph.db)
Query phase
Specify changed files (
["src/routes/monitors.ts"])Run BFS in the selected mode:
REVERSE: who imports this file (downstream impact)
FORWARD: what this file imports (upstream co-change candidates)
Return only files within the blast radius
Tech stack
Language: TypeScript 5.4+
Database: SQLite 3 (better-sqlite3)
Graph traversal: SQL recursive CTE (
WITH RECURSIVE)MCP: Model Context Protocol SDK v1.0.0
CLI: Commander.js 12.0.0
License
MIT
Packages
Package | Description | Version |
| CLI tool | 0.3.0 |
| MCP server | 0.3.0 |
| Graph build & query engine | 0.3.0 |
Links
BENCHMARK.md — benchmark data
CHANGELOG.md — release notes
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/elchika-inc/ts-review-graph'
If you have feedback or need assistance with the MCP directory API, please join our Discord server