Chisel

Chisel

MCP server for test impact analysis and code intelligence. Maps tests to code and git history to determine impacted tests, risk scores, and ownership for AI coding agents.

Category
访问服务器

README

Chisel

Test impact analysis and code intelligence built for AI coding agents. Zero external dependencies, open source, MIT licensed.

Chisel maps tests to code, code to git history, and answers: what to run, what's risky, and who touched it. It runs as an MCP server alongside your agent — Claude Code, Cursor, Windsurf, Cline, or any MCP-compatible client.

Chisel analyzing a real project — risk map, churn, ownership, test gaps, and agent interpretation

What it does

Chisel builds a graph connecting your code, tests, and git history, then answers three questions:

1. What to run

You change engine.py:store_document(). Instead of running all 287 tests or guessing with -k "test_store", Chisel tells the agent exactly which tests are impacted — through direct edges and transitive import-chain coupling.

2. What's risky

Risk scores per file based on churn rate, coupling breadth, test coverage gaps, author concentration, and test instability. A file that changes often, has one author, and no tests? That's your highest risk.

3. Who touched it

Blame-based ownership (who wrote it) and commit-activity-based reviewer suggestions (who maintains it). Useful when multiple agents or developers work on the same codebase and you need to understand lineage.

Why it exists

When multiple LLM agents (or agents + humans) work on the same codebase, changes in one area can silently break another.

Chisel gives AI coding assistants the intelligence to understand the blast radius of their changes before they commit. One agent's refactor doesn't silently regress another agent's work — automated code quality checks that work at the speed of your agent.

Install

Available on PyPI:

pip install chisel-test-impact

Or from source:

git clone https://github.com/IronAdamant/Chisel.git
cd Chisel
pip install -e .

Use with Claude Code (MCP)

Add to your Claude Code MCP config (~/.claude/settings.json or project .mcp.json):

{
  "mcpServers": {
    "chisel": {
      "command": "chisel-mcp",
      "env": {
        "CHISEL_PROJECT_DIR": "/path/to/your/project"
      }
    }
  }
}

Run analyze first to build the project graph, then diff_impact after edits to see which tests to run. For large repos, analyze with force=True automatically falls back to a background job so you don't hit MCP timeouts. Working-tree analysis (--working-tree) reuses a cached static import index and falls back to fast stem-matching for untracked files to stay within timeout budgets.

Monorepo sharding: Split large codebases across multiple SQLite databases with the CHISEL_SHARDS environment variable or .chisel/shards.toml. Query tools automatically aggregate across shards; writes route to the correct shard by file path.

After running tests, call record_result so Chisel can track failure rates and test instability over time. Or use chisel run -- pytest tests/ to run tests and record results automatically.

There is also an installable Claude Code skill with the distilled agent protocol: copy skills/SKILL.md to ~/.claude/skills/chisel/SKILL.md.

Use with Cursor, Windsurf, Cline, or other MCP clients

Chisel exposes a standard MCP interface. For stdio-based clients:

pip install chisel-test-impact[mcp]
chisel-mcp

For HTTP-based clients:

chisel serve --port 8377

Quickstart (CLI)

# Analyze a project (builds the graph)
chisel analyze .

# What tests are impacted by my current changes?
chisel diff-impact

# What tests should I run for this file?
chisel suggest-tests engine.py

# Risk heatmap across the project
chisel risk-map

# Find code with no test coverage, sorted by risk
chisel test-gaps

# Who owns this code?
chisel ownership engine.py

# Run tests AND record pass/fail results in one step
chisel run -- pytest tests/

# Incremental update (near-instant when nothing changed)
chisel update

Try it on this repo

git clone https://github.com/IronAdamant/Chisel.git
cd Chisel
pip install -e .

chisel analyze .
chisel risk-map
chisel diff-impact
chisel test-gaps

MCP Tools

20 functional tools plus 6 advisory file-lock helpers for multi-agent coordination.

Tool What it does
analyze Full project scan — builds the code/test/git graph. Optional shard param for sharded monorepos
update Incremental re-analysis of changed files only. Optional shard param for sharded monorepos
diff_impact Detects your changes from git diff and returns impacted tests. working_tree=true enables full static import scanning for untracked files. auto_update=true refreshes stale DB inline
suggest_tests Ranks tests by relevance for a given file. Prefers same-directory tests via stem matching. auto_update=true refreshes stale DB inline
impact Which tests cover these files or functions?
risk_map Risk scores for all files (churn + coupling + coverage gaps). working_tree=true includes untracked files. exclude_new_file_boost=true suppresses the temporary boost. auto_update=true refreshes stale DB inline
test_gaps Code with zero test coverage, sorted by risk. working_tree=true elevates uncommitted files to the top. auto_update=true refreshes stale DB inline
triage Top risks + gaps + stale tests in one call. Supports exclude_new_file_boost and auto_update
churn How often does this file or function change?
coupling Files that change together or import each other
ownership Blame-based — who wrote this code?
who_reviews Commit-activity-based — who maintains this code?
stale_tests Tests pointing at code that no longer exists
history Commit history for a file
record_result Log test pass/fail outcomes for future prioritization
run CLI-only: run tests and auto-record results (pytest, Jest)
stats Database summary and diagnostic counts
start_job Run analyze/update in background (avoids MCP timeouts). Optional shard param
job_status Poll a background job until complete
cancel_job Request cooperative cancellation of a running background job
optimize_storage Compact and vacuum the SQLite database

Features

  • Zero dependencies — stdlib only, Python 3.11+, works anywhere
  • Multi-language — Python, JavaScript/TypeScript, Go, Rust, C#, Java, Kotlin, C/C++, Swift, PHP, Ruby, Dart
  • Framework-aware — pytest, Jest, Go test, Rust #[test], Playwright, xUnit/NUnit/MSTest, JUnit (incl. parameterized), XCTest + Swift Testing, PHPUnit, RSpec, Minitest, gtest, Dart test
  • Incremental — only re-processes changed files, not the whole repo; a no-change update is near-instant
  • gitignore-aware — ignored trees (vendored deps, build output, fixtures) are never scanned; untracked files still are (CHISEL_INCLUDE_IGNORED=1 to override)
  • Branch-awarediff_impact auto-detects feature branch vs main
  • Multi-agent safe — cross-process locks so parallel agents don't corrupt the graph
  • MCP + CLI — stdio and HTTP MCP servers, plus a full CLI with 28 subcommands
  • CI-friendly — real exit codes (chisel analyze && pytest just works); copy-paste GitHub Actions example in examples/github-actions/
  • Monorepo sharding — split analysis across per-directory SQLite databases (CHISEL_SHARDS)
  • Custom extractors — plug in tree-sitter or LSP via register_extractor() if you need it

Ecosystem

Chisel sits in the agent loop: impact -> tests -> record results -> refresh analysis. It works standalone or alongside Stele for semantic code context.

Docs: Agent playbook | Claude Code skill | Zero-dependency policy | Custom extractors

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选