# VibeDrift > VibeDrift detects and prevents drift in AI-written code: the behavioral deviation that creeps in when stateless AI coding agents make a codebase stop agreeing with itself. It scans a repo for drift, gives it a Vibe Drift Score, and runs as an MCP server so your agent checks the codebase's own conventions before it writes. VibeDrift is a CLI and MCP server for keeping AI-generated codebases coherent. Local scans and the MCP tools are free and open source on every plan. Run `npx @vibedrift/cli .` for an instant local scan (code never leaves your machine), or add the MCP server so Claude Code, Cursor, Windsurf, and any MCP-compatible agent can consult your repo's conventions mid-task. ## Key facts - What it is: drift detection and prevention for AI-written code. "Drift" = behavioral deviation across stateless AI sessions (mismatched patterns, missing auth, duplicate or hallucinated code, convention fracture) that still compiles and passes review. - Local scan: `npx @vibedrift/cli .` — runs locally in ~2s, free, open source, unlimited; code never leaves your machine. - Vibe Drift Score: a composite 0–100 coherence score plus a letter grade, built from five detectors (architectural consistency, security posture, redundancy, convention adherence, scaffolding hygiene). - Deep scan: `vibedrift . --deep` adds Claude-validated semantic analysis (semantic duplicates, intent mismatch, a ranked coherence report, copy-ready fixes). - MCP server: free and open source, local, no login. Install with `claude mcp add vibedrift -- npx -y @vibedrift/cli mcp`. Five tools: get_dominant_pattern, find_similar_function, check_file_drift, validate_change, get_intent_hints. - CI: `npx @vibedrift/cli . --json --fail-on-score 70` gates merges below a threshold. - Pricing: Free $0 (unlimited local scans, free MCP tools forever, 1 deep scan/month). Pro $15/month (12 deep scans, drift trend over time, in-editor deep checks via MCP, watch mode and a git pre-push gate). Enterprise: contact us (self-host/BYOC, SSO, custom rules, SLA). Top up 5 deep scans for $10 on any plan; credits never expire. ## Product - [Homepage](https://www.vibedrift.ai): what VibeDrift is and why AI codebases drift. - [Vibe Check](https://www.vibedrift.ai/vibe-check): free, no-signup tool — paste a public GitHub repo URL and get an instant Vibe Drift Score, letter grade, and five-category drift breakdown, run in the browser by the latest VibeDrift (code analyzed in memory, never stored). - [Guide](https://www.vibedrift.ai/guide): install, scan, deep scan, and MCP setup for every client. - [Pricing](https://www.vibedrift.ai/#pricing): free, Pro, and Enterprise plans. - [Releases](https://www.vibedrift.ai/releases): changelog and product updates. - [FAQ](https://www.vibedrift.ai/faq): common questions about drift, scanning, and the MCP server. ## Blog - [AI technical debt: the hidden cost of agent-written code](https://www.vibedrift.ai/blog/ai-technical-debt): what AI technical debt is, why it's invisible, and how to measure and pay it down. - [Claude Code is drifting your repo. Here's how to stop it.](https://www.vibedrift.ai/blog/stop-claude-code-drift): why Claude Code drifts on large repos and how to stop it with in-loop MCP checks. - [What is an MCP server? A practical guide for coding agents](https://www.vibedrift.ai/blog/what-is-an-mcp-server): the Model Context Protocol explained, and how to add an MCP server to Claude Code or Cursor. - [Why AI-generated code passes review but breaks your codebase](https://www.vibedrift.ai/blog/why-ai-code-passes-review-but-breaks): why human review and linters miss behavioral drift, and what catches it. - [Cursor rules vs MCP: why config files aren't enough](https://www.vibedrift.ai/blog/cursor-rules-vs-mcp): how Cursor rules and MCP differ, and why you want both. - [CLAUDE.md best practices (and where they quietly fail)](https://www.vibedrift.ai/blog/claude-md-best-practices): how to write a CLAUDE.md agents follow, and how to stop conventions from eroding. - [5 MCP tools that make your AI agent write better code](https://www.vibedrift.ai/blog/best-mcp-tools-for-coding-agents): the five VibeDrift MCP tools and the drift each one prevents. - [How to keep a large codebase consistent when AI writes most of it](https://www.vibedrift.ai/blog/ai-codebase-consistency): a practical playbook for AI codebase consistency. - [Adding a drift gate to CI: block incoherent AI code before merge](https://www.vibedrift.ai/blog/drift-gate-ci): how to add a VibeDrift drift gate to GitHub Actions. - [Measuring code coherence: what a Vibe Drift Score actually tells you](https://www.vibedrift.ai/blog/code-coherence-vibe-drift-score): how to read the Vibe Drift Score and the five detectors behind it. - [From detection to prevention: the missing feedback loop in AI coding](https://www.vibedrift.ai/blog/from-detection-to-prevention): moving drift control from after-the-fact scanning to in-loop prevention via MCP. - [VibeDrift now runs inside your coding agent (MCP), and we measured the impact](https://www.vibedrift.ai/blog/does-a-drift-checker-change-agent-output): the controlled eval on whether the MCP signal changes what an agent writes. - [Your AI-written codebase is drifting. Here's how to measure it.](https://www.vibedrift.ai/blog/your-ai-codebase-is-drifting): what drift is and how VibeDrift measures it. ## Resources - [npm: @vibedrift/cli](https://www.npmjs.com/package/@vibedrift/cli): the CLI and MCP server package. - [GitHub: VibeDrift](https://github.com/VibeDrift/VibeDrift): open-source scanner and MCP server. - [VibeLang](https://thevibelang.org): sister project, a language where behavioral intent is compiler-enforced.