Sourcebook
CLI and MCP server that flags files an AI agent forgot to change in a git diff
- Pricing
- Open source
- Platforms
- CLI, vscode, self-hosted
- Version
- 0.9.5
- Listing updated
- today
Similar MCP servers
About Sourcebook
Sourcebook is an open-source MCP server for developer tools. It is available on CLI, vscode and self-hosted.
The README says sourcebook is built to catch the companion files an AI coding agent leaves untouched after an edit. It compares a git diff against the repository's own structure, looking at missing test files, sibling modules that import or are imported by the changed code, files that historically change together in commit history, and high fan-in hub files with wide blast radius.
The core checks are rules-based and run locally without an LLM, using co-change mining, naming-convention test mapping and an import graph. An optional --ai mode sends the diff and dependency context to Claude Sonnet to look for semantic links such as field renames that need migrations, which requires the user's own Anthropic API key.
It is aimed at developers using agents like Claude Code who want a completeness check before a commit lands, and it can also run in CI with an exit-code-only mode. The license is BSL-1.1, which is source-available and prohibits offering it as a hosted service.
What it does
- Diff completeness check
- Analyzes staged or branch diffs and reports files that likely should have changed alongside them.
- Co-change analysis
- Mines git history for files that repeatedly change together and flags their companions.
- Import graph review
- Flags sibling modules that import or are imported by the modified files.
- Hub file warnings
- Warns when a file with many dependents is modified, indicating wider blast radius.
- Claude Code hooks
- Installs pre-commit hooks and generates CLAUDE.md so the agent sees missing files before committing.
- Optional AI analysis
- The --ai flag adds semantic checks using Claude Sonnet and requires an Anthropic API key.
Good for
- Catch missing test updates after an AI agent edits a source file
- Review a branch against main for files that were skipped during a change
- Run a completeness gate in CI without failing on clean diffs
- Give an agent on-demand repo structure and co-change data through MCP
Pricing
Open source
Source-available under BSL-1.1, free to use; optional AI mode needs an Anthropic API key; GitHub App is listed as coming soon.
Sourcebook FAQ
Does the AI analysis cost anything?
The README estimates about $0.012 per run for the --ai mode, which uses the user's own ANTHROPIC_API_KEY. The rules-based layer runs without an LLM.
Which languages are supported?
TypeScript and JavaScript, Python and Go have full import graph, git analysis and convention detection. Rust has full import graph and git analysis with partial convention detection.
Can I host it as a service?
The BSL-1.1 license states it is source-available and cannot be offered as a hosted service. It converts to MIT on 2030-03-25.
Is Sourcebook free?
Yes. Sourcebook is open source, so you can use and self-host it for free.
What are the best alternatives to Sourcebook?
The closest alternatives to Sourcebook are Brevio Core, CodeClone, Bloch, Honestcode and Cork.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.