AI coding assistants are great at writing code, but they’re terrible at understanding your code. They don’t know your code’s unwritten rules, and that gap shows up every time they generate something that compiles but doesn’t fit. The problem isn’t model quality. It’s context. Model Context Protocol (MCP) is the infrastructure layer that fixes this, and it’s how Scrubby delivers codebase intelligence directly into the AI editors your team already uses.

What is Model Context Protocol?

Model Context Protocol is an open standard developed by Anthropic that defines how AI models connect to external tools and data sources. Before MCP, every AI tool integration was bespoke. Each editor plugin had its own way of feeding context to the model. MCP standardizes all of that. It defines how a server exposes capabilities, how a client discovers and invokes them, and how results get back to the model.

So why does this matter for code review? Because MCP gives AI editors a clean mechanism for accessing codebase knowledge in real time. Instead of relying on whatever context the editor happens to include, the model can actively query for exactly what it needs, such as the architecture of the codebase, the conventions of the team, or the relationships between files.

The context problem in AI code review

To see why MCP matters, think about what an AI coding assistant actually sees when it reviews your code.

In most editors, the AI has access to your current file and maybe a handful of related files that the editor’s context engine picked out. Some tools index your repository and provide retrieval-augmented generation over the full codebase. That’s better, but it’s still fundamentally a text-search approach. The AI can find files that contain similar strings, but it doesn’t understand the structural relationships between them.

What’s missing is architectural knowledge. The AI doesn’t know:

  • Domain boundaries: Which parts of the codebase are logically separate and should stay decoupled.
  • Co-change patterns: Which files typically change together when a feature gets modified, and which ones are missing from a given changeset.
  • File organization rules: Where new files should go, what the expected structure of a new feature looks like.
  • Review conventions: What your team typically flags in review and what it considers acceptable.

Without this knowledge, the AI generates code that compiles and passes tests but doesn’t fit your codebase. It’s like hiring a senior engineer from another company. They may be technically excellent, but they’re still unfamiliar with how your team works. That human engineer will (hopefully!) learn your conventions in a few weeks. An AI without Scrubby never does.

How MCP servers work for code review

An MCP server is a process that runs alongside your AI editor and exposes a set of tools the model can call. When the AI needs information beyond what’s in its context window, it issues a tool call to the MCP server and gets structured data back.

For code review, the flow looks like this:

  1. A developer opens a file or starts a review session in their AI editor.
  2. The AI recognizes it needs codebase context and issues a tool call to the MCP server.
  3. The MCP server queries its knowledge base.
  4. The server returns structured context that gives the AI the info it needs.
  5. The AI incorporates this context into its review or generation, producing output that actually aligns with the team’s practices.

This is fundamentally different from static context injection. The AI isn’t receiving a dump of possibly-relevant text. It’s making targeted queries for specific types of knowledge and getting structured responses it can reason over. The model decides what it needs to know, asks for it, and integrates the answer.

Scrubby as an MCP server

Scrubby implements an MCP server purpose-built for codebase intelligence. It connects to the AI editors your team already uses and exposes several capabilities:

Domain information. Your favorite AI agent can query Scrubby for a map of your codebase’s domains and how each one relates to another. When the agent’s about to generate code that crosses a domain boundary, it knows to use the appropriate API rather than reaching directly into another domain.

File summaries and review context. Before editing or reviewing a file, an agent can ask what Scrubby the file does, what domain it belongs to, and what conventions apply. No more guesswork that leads to convention violations.

Changeset review. An entire set of changes can be reviewed at once, checking for missing files, convention violations, and whether expected co-changes are missing. Scrubby’s MCP server gives your AI a comprehensive review capability that goes far beyond syntax checking.

The result is an AI assistant that behaves less like a generic coding tool and more like a senior engineer who’s been on your team for years. It knows your team’s conventions and what parts of your code usually change together.

How Scrubby uses MCP to deliver codebase intelligence

Most MCP integrations require manual setup such as writing config files, defining tool schemas, and curating knowledge bases. Scrubby skips all of that. You connect your repository and Scrubby automatically builds its knowledge base from your code and git history. It learns from the codebase itself and keeps learning as the codebase evolves.

Because Scrubby delivers this codebase intelligence through MCP, it works everywhere your team already codes, like Claude Code, Cursor, and VS Code. Your AI agents get structured, real-time access to your codebase’s architecture without anyone needing to maintain it. The context stays current because Scrubby updates automatically as your code changes.

For developers, the value is immediate. AI-generated code fits your codebase from the start instead of needing multiple rounds of review to fix structural issues. New developers onboard faster because the conventions are surfaced in real time, not buried in a wiki. And every PR gets checked against your actual patterns before it merges.

Why this matters now

MCP is becoming the standard way AI models connect to development tools. As that ecosystem grows, AI agents will orchestrate across your entire workflow through a single protocol.

But the protocol is only as useful as the knowledge behind it. MCP gives AI agents a way to ask questions; Scrubby gives them answers worth having. That’s the shift from AI as a generic coding tool to AI as a codebase-aware collaborator. The models are already good enough. Scrubby provides the missing piece: the structured knowledge about your codebase that makes the AI’s output meaningful.