TempoGraph

TempoGraph

Code graph context engine that parses codebases with tree-sitter (170+ languages), builds structural dependency graphs, and provides 24 MCP tools for code intelligence. One prepare_context call gives your AI agent the right files for any task. Includes focus, blast radius, hotspots, dead code detection, and hybrid search.

Category
访问服务器

README

TempoGraph

<!-- mcp-name: io.github.Elmoaid/tempograph -->

CI License: AGPL v3 Python 3.11+ TempoGraph MCP server

<a href="https://glama.ai/mcp/servers/Elmoaid/TempoGraph"> <img src="https://glama.ai/mcp/servers/Elmoaid/TempoGraph/badges/card.svg" alt="TempoGraph MCP server" width="400"> </a>

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.

<p align="center"> <img src="docs/demo.gif" alt="TempoGraph demo" width="700"> </p>

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"

<details> <summary>All 24 tools</summary>

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

</details>

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选