Sourcebook
@maroondlabs
Sourcebook について
Live codebase intelligence for AI agents. Analyzes import graphs (PageRank), git history (reverted commits, co-change coupling), and conventions to generate context files (CLAUDE.md, .cursorrules, copilot-instructions.md). Only surfaces non-discoverable information — things agent
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"sourcebook": {
"command": "npx",
"args": [
"-y",
"sourcebook",
"serve"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Sourcebook?
Sourcebook is a safety layer for code changes that analyzes git diffs for completeness — it flags files that should have been modified but weren't. It uses rules-based structural detection plus optional AI-powered semantic analysis, with a claim of zero false positives on clean diffs. It is designed for developers and AI agents working in version-controlled repositories.
How to use Sourcebook?
Sourcebook can be used via CLI, as a Claude Code hook, or as an MCP server. For MCP usage, run npx sourcebook serve and add the server configuration to your MCP client. To analyze a diff, run npx sourcebook check with optional flags like --ai (requires ANTHROPIC_API_KEY), --quiet (exit code only), --json, or --branch <branch>. Run npx sourcebook init to set up Claude Code hooks and generate context files.
Key features of Sourcebook
- Detects missing test files when a source file changes
- Identifies sibling modules that import or are imported by changed files
- Flags co-change companions based on historical git commit patterns
- Warns about hub file blast radius (files with many dependents)
- AI analysis catches semantic relationships like field renames needing migrations
- Supports TypeScript/JavaScript, Python, Go, and Rust with full import graph analysis
Use cases of Sourcebook
- Catching missing test updates when a source file is modified
- Ensuring sibling modules and related configuration files are updated together
- Scanning recent commits for previously missed file changes (
scan-history) - Using as a pre-commit hook via Claude Code integration to prevent incomplete commits
FAQ from Sourcebook
What does Sourcebook catch?
Sourcebook detects missing test files, unchanged sibling modules, files that historically co-change, and hub files with wide blast radius. With the --ai flag, it also finds cross-module semantic relationships, field renames needing migrations, and stale validation logic.
Does Sourcebook require an AI model?
No. The rules-based analysis (co-change, test detection, import graph, hub detection) works without an LLM and runs in under one second. The --ai option adds semantic analysis using Claude Sonnet at about $0.012 per run.
What runtime or API keys are needed?
No configuration is needed for rules-based analysis. The --ai flag requires the ANTHROPIC_API_KEY environment variable. Sourcebook reads your repo’s git history and file structure directly.
Which languages are supported?
TypeScript/JavaScript, Python, Go, and Rust have full import graph and git analysis. Rust has partial convention detection. Other languages may work for co-change and test detection but without import graph support.
What is the license for Sourcebook?
Sourcebook is licensed under BSL-1.1 — source-available and free to use, but cannot be offered as a hosted service. It converts to MIT on 2030-03-25.
「AI とエージェント」の他のコンテンツ
MCP-NixOS - Because Your AI Assistant Shouldn't Hallucinate About Packages
utensilsMCP-NixOS - Model Context Protocol Server for NixOS resources
Just Prompt - A lightweight MCP server for LLM providers
dislerjust-prompt is an MCP server that provides a unified interface to top LLM providers (OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama)
欢迎来到 智言平台
Shy2593666979AgentChat 是一个基于 LLM 的智能体交流平台,内置默认 Agent 并支持用户自定义 Agent。通过多轮对话和任务协作,Agent 可以理解并协助完成复杂任务。项目集成 LangChain、Function Call、MCP 协议、RAG、Memory、HITL、Skill、Milvus 和 ElasticSearch 等技术,实现高效的知识检索与工具调用,使用 FastAPI 构建高性能后端服务。
MCP Claude Code
SDGLBLMCP implementation of Claude Code capabilities and more
21st.dev Magic AI Agent
21st-devIt's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
コメント