Skip to main content

TempoGraph

CI License: AGPL v3 Python 3.11+ TempoGraph MCP server

TempoGraph MCP server

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.

TempoGraph demo

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 tempograph

Add 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 signals
  • Parses 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
blast_radius "What breaks if I change this file?"
focus "Show me everything related to auth"
hotspots "Which files are riskiest to change?"
dead_code "What can I safely delete?"
diff_context "What's the impact of my current changes?"
overview "Orient me in this new codebase"
All 24 tools
Tool What it does
prepare_context One-shot context for a task — the primary tool
overview Repository orientation: size, languages, entry points
focus Connected subgraph around a symbol — callers, callees
blast_radius What breaks if you change this file or symbol
diff_context Impact analysis of changed files
hotspots Ranked risk list — complexity x coupling x size
dead_code Unreferenced symbols — cleanup candidates
lookup "Where is X?", "What calls X?"
dependencies Circular imports, dependency layers
architecture Module-level dependency view
symbols Full symbol inventory
file_map File tree with top symbols per file
search_semantic Hybrid keyword + vector + structural search
cochange_context Files that historically change together
suggest_next Predicts the next useful tool call
run_kit Composable multi-tool workflows
stats Token budget estimates
get_patterns Codebase conventions and idioms
report_feedback Log whether output was useful
learn_recommendation Suggestions from feedback history
index_repo Build or rebuild the graph
watch_repo / unwatch_repo Live incremental updates
embed_repo 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 dead

Python 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.

Sponsor

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.

Metadata

Release files for tempograph 0.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tempograph 0.7.4
File Size Uploaded
tempograph-0.7.4.tar.gz 1.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tempograph 0.7.4
File Interpreter ABI Platform
tempograph-0.7.4-py3-none-any.whl Python 3 none any Details

Total release size: 2.2 MB

Release files / tempograph-0.7.4.tar.gz

Download URL tempograph-0.7.4.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
bd0fcf0327b660bbc886457e8b2575321c1d1944725985964e691bb329665fcc
BLAKE2b-256 checksum
How to use checksums
f1fc1c887ab6e9c6b9998c73961770b94b341a37fd179fa9d7b89201ba4eb304
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Release files / tempograph-0.7.4-py3-none-any.whl

Download URL tempograph-0.7.4-py3-none-any.whl
Size 455.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8681cac5246a8c0532ee17e1fe4875d063fc940d0fe7ed6e2e58c826672cbbec
BLAKE2b-256 checksum
How to use checksums
4bfae1798c909308d54606d24f78cde14811cfeed44af681ac12352b45303d51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.4 This release

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page