TempoGraph is an MCP server that builds a deep dependency graph of your codebase to provide AI agents with precise, context-aware file and symbol information for coding tasks.
Core Task Assistance
prepare_context– One-shot context for a coding task; selects relevant files, symbols, and hotspots within a token budget (proven +18.6% file prediction improvement)diff_context– Impact analysis for changed files, with git auto-detection (unstaged, staged, commit, branch)cochange_context– Uses git history to find files that frequently change together (logical coupling detection)
Codebase Understanding
overview– Project type, languages, biggest/most complex files, module dependencies, and circular import warningsfile_map– File tree with top symbols per filearchitecture– High-level module-to-module dependency viewsymbols– Full symbol index: every function, class, component, hook, and type with signatures and relationshipsstats– File/symbol/edge/line counts and estimated token costs per mode
Dependency & Impact Analysis
focus– Task-scoped context around a query or symbol, including callers/callees and related filesblast_radius– What breaks if you change a given file or symbol (importers, callers, cross-language bridges)dependencies– Detects circular imports and shows dependency layer structurelookup– Natural language questions: "where is X defined?", "what calls X?", "what imports X?"
Risk & Quality
hotspots– Ranks riskiest symbols by coupling, complexity, and cross-file callersdead_code– Exported symbols never referenced elsewhere — cleanup candidatesget_patterns– Coding conventions, naming patterns, and structural idioms
Search
search_semantic– Hybrid FTS5 keyword + vector similarity search to find symbols by meaning (requiresembed_repo)embed_repo– Generate local vector embeddings (BAAI/bge-small-en-v1.5) for semantic search
Automation & Workflows
run_kit– Composable multi-tool workflows (e.g.,explore,deep_dive,change_prep,code_review,health)suggest_next– Predicts the most useful next tool based on learned session patternslearn_recommendation– Data-driven context strategy recommendations based on task type and usage history
Repository Management
index_repo– Build or rebuild the semantic graph indexwatch_repo/unwatch_repo– Live incremental graph updates on file changes
Feedback
report_feedback– Log whether a tool's output was helpful to improve future recommendations
Supports deep extraction for Python, TypeScript, JavaScript, Rust, Go, Java, C#, and Ruby, plus generic support for 170+ additional languages. Warm queries run in ~21ms with content-hashed storage so only changed files are re-parsed.
TempoGraph
Your AI agent finds the right files. Every time.
TempoGraph builds a dependency graph of your codebase and gives your AI coding agent exactly the files it needs before making changes. One tool call. No guessing.
The Problem
AI coding agents guess which files to look at. They search by filename, grep for keywords, and hope for the best. In large codebases, they miss critical dependencies, break things downstream, and waste tokens reading irrelevant code.
The Fix
pip install tempographAdd to your MCP config (Claude Code, Cursor, Windsurf, or any MCP client):
{
"mcpServers": {
"tempograph": {
"command": "tempograph-server",
"args": []
}
}
}Your agent calls prepare_context with a task description. TempoGraph returns the exact files that matter — based on real dependency analysis, not text matching.
Does It Work?
Tested on real PRs from django, flask, httpx, fastapi, requests, and pydantic. Task: predict which files need to change.
Model | Without TempoGraph | With TempoGraph | Improvement |
GPT-4o | 21.7% F1 | 27.5% F1 | +27% |
GPT-4o-mini | 19.2% F1 | 24.5% F1 | +28% |
qwen2.5-coder:32b | — | — | +18.6% (p=0.049) |
Consistent improvement across every model. 2-3x more tasks helped than hurt. No other code context tool publishes retrieval benchmarks with statistical significance.
How It Works
your repo ──→ tree-sitter parse ──→ symbols + edges ──→ SQLite graph
│
AI agent calls prepare_context ─────────┘
│
◄── KEY FILES + callers + callees + risk signalsParses your code with tree-sitter into a structural dependency graph
Content-hashed and stored in SQLite — only changed files get re-parsed
Warm queries in ~21ms. Branch switching doesn't trigger a rebuild
Knows when NOT to inject context (adaptive gating avoids harming diffuse commits)
What Else Can It Do?
Beyond prepare_context, TempoGraph exposes 24 MCP tools for deeper analysis when your agent needs it:
Tool | When to use it |
| "What breaks if I change this file?" |
| "Show me everything related to auth" |
| "Which files are riskiest to change?" |
| "What can I safely delete?" |
| "What's the impact of my current changes?" |
| "Orient me in this new codebase" |
Tool | What it does |
| One-shot context for a task — the primary tool |
| Repository orientation: size, languages, entry points |
| Connected subgraph around a symbol — callers, callees |
| What breaks if you change this file or symbol |
| Impact analysis of changed files |
| Ranked risk list — complexity x coupling x size |
| Unreferenced symbols — cleanup candidates |
| "Where is X?", "What calls X?" |
| Circular imports, dependency layers |
| Module-level dependency view |
| Full symbol inventory |
| File tree with top symbols per file |
| Hybrid keyword + vector + structural search |
| Files that historically change together |
| Predicts the next useful tool call |
| Composable multi-tool workflows |
| Token budget estimates |
| Codebase conventions and idioms |
| Log whether output was useful |
| Suggestions from feedback history |
| Build or rebuild the graph |
| Live incremental updates |
| Generate vector embeddings |
CLI
# Orient in a new repo
tempograph ./my-project --mode overview
# What's connected to auth?
tempograph ./my-project --mode focus --query "authentication"
# What breaks if I touch db.ts?
tempograph ./my-project --mode blast --file src/lib/db.ts
# Find dead code to clean up
tempograph ./my-project --mode deadPython API
from tempograph import build_graph
graph = build_graph("./my-project")
results = graph.search_symbols("handleLogin")
importers = graph.importers_of("src/lib/db.ts")
dead = graph.find_dead_code()Languages
Python, TypeScript, JavaScript, Rust, Go, Java, C#, and Ruby get deep extraction (custom tree-sitter handlers). 170+ additional languages are supported via generic handler. pip install tempograph[full] for everything.
Support & Sponsorship
If TempoGraph saves you time, consider sponsoring the project. Sponsors get early access to new features.
Commercial Licensing
TempoGraph is AGPL-3.0 — free to use, modify, and distribute. If you use TempoGraph in a network service (SaaS, hosted IDE, AI coding platform), AGPL requires you to open-source your service code. If that doesn't work for you, commercial licenses are available.
Contact eali@needspec.com for commercial licensing terms.
License
AGPL-3.0 — free to use. Network service use requires source disclosure, or a commercial license.