Scrubby + Claude Code
Claude Code is Anthropic's terminal-native coding agent. It speaks Model Context Protocol natively, which means Scrubby plugs in cleanly: your agent gets architectural awareness, convention knowledge, and co-change detection without any custom glue. The result is an agent that writes code that actually fits your repo.
What you get
- Convention-aware code generation. Claude consults Scrubby before editing a file, so the code it writes lines up with the patterns your team already uses.
- Blast-radius checks. Before making cross-cutting changes, Claude can ask Scrubby what else historically moves with the file it's touching.
- Pre-commit changeset review. Claude can run
scrubby_review_changesetagainst your staged files to catch missing co-changes before you push. - Lower token consumption. Claude stops aimlessly grepping for context. Scrubby returns one structured answer, and Claude gets back to writing code.
Setup
1. Add the MCP server
Create a .mcp.json file at the root of your repo (or edit it if it already exists):
{
"mcpServers": {
"scrubby": {
"type": "http",
"url": "https://mcp.scrubby.ai/mcp"
}
}
} 2. Authenticate
The first time Claude Code connects to Scrubby it opens a browser window for GitHub OAuth. Sign in with the same GitHub account you used for Scrubby. If your session ever expires, run /mcp in Claude Code to reconnect.
3. Index your repository
Ask Claude to index your repo:
"Index my repo with Scrubby — it's owner/repo-name." Indexing takes 1–3 minutes depending on size. You'll get an email when it finishes. After that, indexing is incremental and runs automatically as commits land.
4. Start coding
That's it. Scrubby's MCP server tells Claude how to use it via the protocol's instructions hook. Claude will consult Scrubby before editing files, before answering architecture questions, and before committing — no extra prompting needed.
Tools available to Claude
| Tool | What Claude uses it for |
|---|---|
scrubby_index | Index a repository for the first time, or re-index after major changes |
scrubby_review | Get domain, conventions, connected files, and git history for a specific file before editing it |
scrubby_review_changeset | Check a set of changed files for missing co-changes, consistency issues, and domain crossings before commit |
scrubby_get_domains | List all architectural domains discovered in the repository |
scrubby_get_segments | List code segments with their conventions and file summaries |
scrubby_get_network | Get the domain connection graph showing how areas of the codebase relate |
scrubby_get_findings | Retrieve findings from previous reviews |
scrubby_report_findings | Report issues found during review so Scrubby can strengthen its connection weights |
How it feels in practice
Before editing a file
Claude calls scrubby_review on the file it's about to touch. Scrubby returns the file's domain, the conventions in that domain, what other files historically change with it, and the relevant slice of git history. Claude incorporates that into the code it generates.
Before answering architecture questions
Claude calls scrubby_get_domains or scrubby_get_network instead of guessing from filenames. Answers are grounded in Scrubby's domain map.
Before committing
Claude can run scrubby_review_changeset against your staged changes. If you updated a model but forgot the serializer, that gets surfaced before the PR opens.
Continuous learning
When Claude calls scrubby_report_findings after a review, Scrubby strengthens the connection weights between domains that produced useful findings. Over time, the system converges on the relationships that actually matter for your repo.
Troubleshooting
- Session expired — run
/mcpin Claude Code to reconnect. Sessions auto-reconnect after server restarts. - Repository not indexed — ask Claude to run
scrubby_indexwith your repo name inowner/repoformat. - Tools not appearing — check that
.mcp.jsonis in your project root and the URL matches the snippet above.