Cursor rules vs MCP: why config files aren't enough
Cursor rules are the first thing most people try when an AI agent keeps writing code that doesn't fit the project. You write a .cursorrules file, list your conventions, and expect the agent to follow them. It usually does, at first. Then a few dozen sessions later you catch the agent quietly using axios again in a codebase that moved to fetch, and you wonder why your rules stopped working.
They didn't exactly stop working. The real reason is that .cursorrules, CLAUDE.md, Copilot context, and files like them are all input systems: they nudge what the model writes, but nothing checks that the output followed them. This post compares that approach to MCP, shows where each one helps, and makes the case for using both instead of picking a side.
What Cursor rules actually are
A .cursorrules file (or Cursor's newer per-directory rules, or a CLAUDE.md in Claude Code) is text added to the model's prompt before it writes. You tell the agent, in plain words, how this project does things: use this error pattern, prefer this library, name things this way, don't pull in that dependency.
This is genuinely useful. A good rules file does shift output toward your conventions, and it costs almost nothing to keep up to date. We wrote a full guide on doing it well in CLAUDE.md best practices. If you don't have a rules file yet, write one first; everything below assumes you already have one.
The limit here is built in, not a sign you need better rules. A rule is a suggestion given before the work starts. The model reads it, weighs it against the task, the open file, the chat so far, and its own training, then writes whatever wins that tug-of-war. Sometimes your rule wins. Sometimes the 400-line file the agent is editing wins. You don't find out which until you read the diff.
Why Cursor rules erode across sessions
AI coding agents are stateless. Each session starts fresh, with no memory of what the last one decided, so the only thing carrying your conventions forward is the rules file, re-added every time. That sounds solid until you count how much else is pulling at the model's attention in a given session.
- +Attention gets split. A long file or a hard task drowns out a rule tucked away in a config file. The instruction is there but barely weighted.
- +Local context wins. If the file the agent is editing already breaks a rule, the agent tends to copy its neighbors instead of your rule. Drift breeds more drift.
- +No feedback loop. Nothing tells the agent it just broke a rule, so nothing gets fixed. It moves on, the diff looks fine, and the deviation ships.
The result is drift: small deviations that pile up across stateless sessions. No single diff is wrong enough to catch in review, but together they slowly pull the codebase away from its own conventions. Your rules are still there, doing their best. They just can't guarantee anything, because suggestions never can.
Cursor rules vs MCP: suggestion vs checked
MCP, the Model Context Protocol, is a different kind of fix. Instead of putting text in front of the model and hoping, an MCP server gives the agent tools it can call mid-task. The agent pauses, asks the server a question about the real codebase, gets a clear answer back, and acts on it before writing. The split is simple:
- •Static text added to the prompt up front
- •Nudges the model before it writes a line
- •Competes with the task, the open file, and training
- •Compliance is hoped for, never confirmed
- ★A tool the agent calls partway through the task
- ★Answers from the real codebase, not the prompt
- ★Returns a fact the agent can't argue with
- ★Compliance is checked before the code lands
- +A Cursor rule is an input. It's added before the model writes, to steer the output. Compliance is hoped for, never confirmed.
- +An MCP tool is a check. It runs during the task, reads the real code, and returns a fact the agent can't argue with. Compliance is checked, not assumed.
This isn't the same as output checks, either. Linters, PR bots, and drift scanners also check, but they only speak after the code is written and committed. MCP closes that gap by running the check in the loop, before the code exists. We dig into that shift in from detection to prevention.
When each one helps
These aren't rivals. They cover different failures, and each is weak right where the other is strong.
Cursor rules are the right tool when the convention is broad, stable, and easy to state: tone, formatting, which libraries are blessed, high-level design intent. A rule points every write toward the right default with no per-call cost. It raises the floor.
MCP is the right tool when the answer depends on the current state of the codebase and a wrong guess is costly: does a helper for this already exist, what's the main error-handling pattern in this module, would this change cause drift. A rule can't know any of that; only a tool reading the real repo can.
How VibeDrift does the verification
VibeDrift finds and prevents drift in AI-written code, and its MCP server is the "check" half of this pairing. It gives your agent five local tools so it can ask the codebase about its own conventions before it writes a line:
- +
get_dominant_pattern— what's the usual way this kind of code is written here? - +
find_similar_function— does something like this already exist, so the agent doesn't rebuild it? - +
check_file_drift— does this file already differ from its peers? - +
validate_change— would this change cause drift? - +
get_intent_hints— what conventions has the team written down inCLAUDE.mdor.cursorrules?
That last tool is the bridge. get_intent_hints reads your rules file and hands it back as a tool result the agent fetches mid-task, instead of leaving it as prompt text the model may ignore. Your Cursor rules become something the agent looks up and checks against, not just background it skimmed once at the start.
Adding the server is one line. Most clients run it through npx, so there's nothing to install globally. In Claude Code:
claude mcp add vibedrift -- npx -y @vibedrift/cli mcp
In Cursor, Windsurf, and other MCP clients, paste the same thing into your MCP settings:
{
"mcpServers": {
"vibedrift": {
"command": "npx",
"args": ["-y", "@vibedrift/cli", "mcp"]
}
}
}Use both, not either
Treating .cursorrules versus MCP as a choice is the wrong frame. Rules are the cheapest way to steer the model, and you should keep them sharp. But they're always just suggestions, and across enough stateless sessions some of them get ignored. An MCP server adds the in-loop check that rules can't: a real answer from the codebase, fetched before the agent locks in a decision.
Keep writing good rules. Then give the agent a way to check it followed them. Add the VibeDrift server with the one-liner above, or read the full per-client setup in the MCP guide. If you just want to see where your codebase stands today, the scanner is one command:
npx @vibedrift/cli .
Frequently asked questions
Cursor rules are an input system: they're added to the prompt to bias generation, but the model can silently weight them down against the immediate task, a long file, or its own training priors. Nothing checks that the output actually followed them. Over many sessions, compliance drifts. That's not a bug in your rules; it's a structural limit of any instruction-only system.
Cursor rules (and .cursorrules / CLAUDE.md) are suggestions injected before the agent writes. MCP is a tool the agent calls during the task to get a grounded answer from the actual codebase. Rules bias generation; MCP verifies against reality. One is hoped-for compliance, the other is checked compliance.
Both. Use Cursor rules to bias the model toward your conventions up front, and an MCP server to let the agent verify a change against the real codebase before it writes. Rules raise the floor; MCP catches what slips through. They solve different halves of the same problem.
Yes. VibeDrift's MCP tools run locally, are free and open source on every plan, and never send your code anywhere. Only the opt-in deep semantic check draws from your deep-scan budget.
Local scans and the MCP tools are free and open source, forever. The free tier includes 1 deep scan a month; Pro is $15/mo for 12, and you can top up 5 more for $10 on any plan. Credits never expire.