Codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI.
MCPpedia last refreshed this data
Drift is an MCP server that codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI. Its tool list has not been published yet over stdio and http, requires no API key, and scores 90/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"drift": {
"args": [
"-y",
"@drift/cli"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y '@drift/cli' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked @drift/cli against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in developer-tools / ai-ml
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Manage Supabase projects — databases, auth, storage, and edge functions
MCP server for using the GitLab API
A cross-platform desktop application for managing AI Agents and MCP Servers. 一款用于管理AI智能体与MCP服务器的跨平台桌面应用程序。
MCP Security Weekly
Get CVE alerts and security updates for Drift and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Drift stops an AI agent from writing code that violates conventions your repo already follows. It runs entirely on your machine.
Beta install: build from source. Nothing is published to npm yet —
npm install -g @drift/clidoes not work, and thedriftdetectpackage on npm is the unrelated v1 from January. Building needs a Rust toolchain (rustup) because the scan engine is Rust.
git clone https://github.com/dadbodgeoff/drift.git && cd drift
pnpm install --frozen-lockfile
pnpm build && pnpm build:engine
# There is no `drift` binary yet; the entry point is the built CLI.
alias drift="node $PWD/packages/cli/dist/main.js"
drift doctor --repo-root . # fails loudly if the toolchain is missing
Then, in the repository you want to protect:
cd your-repo
drift start --repo-root . --accept-defaults
start prints whether the convention it accepted will actually block, and the command to make it a
gate if it will not. Now have an agent add a route that queries the database directly, the way a
hundred other routes in your repo do not, and check the change:
drift check --diff HEAD~1...HEAD --scope changed-hunks
It names the file, the line, and the convention that was broken. In block mode it exits 2.
--diff main...HEADonly works once your branch has commits thatmaindoes not. On a freshly cloned repo you are onmain, so that range is empty and Drift refuses rather than reporting a pass it cannot support — exit3. That refusal is correct; give it a range with changes in it.
Drift enforces one convention family well, and says so rather than implying more:
| Languages | TypeScript, JavaScript |
| Frameworks | Next.js API routes (App Router and Pages) |
| Convention | API routes must not import data-access clients directly |
| Status | Beta — local CLI and a read-only MCP server |
It does not review code generally, support other languages, modify your source, or sync anything to a server.
The data layer is recognised when its import specifier contains prisma, database, db or
data-access. A repo naming its data layer store or supabase must declare it with
--data-modules. Drift bootstraps and enforces a declared layering contract — it does not
learn conventions in general, and the claims manifest blocks that claim explicitly.
Security heuristics exist behind --experimental-security and are not proofs. Their own audit
is in docs/internal/architecture/security-heuristic-audit.md.
Evaluated on seven open-source Next.js repos on every change
(pnpm eval:external):
| Onboards, learns the real data layer, catches an injected violation | 7 / 7 |
Correct file:line evidence | 7 / 7 |
| A properly layered route falsely flagged | 0 / 7 |
| False-positive rate (dub, 494 routes) | 3.1% |
Evasion shapes caught, at the contract's mode (pnpm eval:evasion) | 66 / 66 testable cells |
And, because the number that decides whether a first session is tolerable is not recall but how often
Drift declines to answer — eight ordinary edits per repo, none of them a violation
(pnpm eval:bench):
| Ordinary edits refused rather than answered | 0 / 56 |
| Local imports the resolver places | 96.1% – 99.9% |
Every check reports its own coverage, so a clean result is never mistaken for full coverage. Where
Drift cannot resolve something it says so, with the offending specifiers — see
drift doctor and summary.import_coverage.
If findings appear but the check exits 0, the convention is in warn mode, deliberately.
Drift infers the c