Drift
Codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI.
What is Drift?
Drift is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to codebase intelligence for ai. detects patterns & conventions + remembers decisions across sessions. mcp server for any ide. offline cli.
Codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Codebase intelligence for AI. Detects patterns & conventions
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx driftConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Drift
Drift is a codebase intelligence MCP server that scans your project, detects patterns and architectural conventions, and maintains a persistent memory of engineering decisions across AI sessions. It exposes six primary tools — scan, status, explain, discover, workflow, and a gateway to ~70 internal analysis and cortex memory tools — enabling AI assistants to understand code structure, detect violations, analyze security issues, map call graphs, and remember context between conversations. Developers use it to give their AI coding assistant a stable, accurate model of the codebase rather than re-explaining architecture each session. Drift v2 is built in Rust and TypeScript and supports stdio and HTTP transports.
Prerequisites
- Node.js installed (for running the drift-mcp package from the monorepo)
- Drift v2 repository cloned locally from https://github.com/dadbodgeoff/drift (use the 'drift v2' directory)
- The drift-mcp package built: navigate to 'drift v2/packages/drift-mcp' and run the build step
- An MCP-compatible client: Claude Desktop, Cursor, Windsurf, or any stdio/HTTP MCP client
- Optional: Docker and Docker Compose for the HTTP transport mode
Clone the Drift repository
Clone the repository and navigate into the v2 directory, which contains the active monorepo.
git clone https://github.com/dadbodgeoff/drift.git
cd "drift/drift v2"Install dependencies and build the MCP package
Install npm dependencies for the monorepo and build the drift-mcp package so the compiled index.js is available.
npm install
npm run build --workspace=packages/drift-mcpConfigure your MCP client to point at the built server
Add the drift MCP server to your client config, specifying the absolute path to the compiled index.js and the --project-root argument pointing at the codebase you want to analyze.
Restart your MCP client
Reload Claude Desktop, Cursor, or Windsurf to connect to the Drift MCP server. The server starts automatically via the stdio transport.
Scan your project to populate the analysis database
In your AI assistant, call the drift_scan tool (or ask Claude to scan the project). This populates the SQLite database at .drift/drift.db with patterns, conventions, and structural information.
Drift Examples
Client configuration
Add this to your claude_desktop_config.json, replacing the paths with your actual clone and project locations:
{
"mcpServers": {
"drift": {
"command": "node",
"args": [
"/absolute/path/to/drift/drift v2/packages/drift-mcp/dist/index.js",
"--project-root",
"/absolute/path/to/your/project"
],
"env": {
"DRIFT_LOG_LEVEL": "info"
}
}
}
}Prompts to try
Once connected and the project is scanned, use Drift's codebase intelligence with Claude:
- "Scan this project and show me the current status"
- "What architectural patterns and conventions does this codebase follow?"
- "Detect any OWASP security violations in this project"
- "Show me the call graph for the authentication module"
- "Remember that we decided to use repository pattern for all database access"
- "What decisions have we made about this codebase across previous sessions?"Troubleshooting Drift
Server fails to start with 'Cannot find module' or path errors
Ensure you built the drift-mcp package before configuring the server. Run 'npm run build --workspace=packages/drift-mcp' inside the 'drift v2' directory. Verify that the dist/index.js file exists at the path specified in your MCP config.
drift_scan completes but drift_status shows no patterns detected
Verify the --project-root argument points to a directory containing actual source code files. Check DRIFT_DB_PATH to confirm the SQLite database is being written to .drift/drift.db inside the project root. Adjust the DRIFT_LOG_LEVEL to 'debug' to see detailed scan output.
Frequently Asked Questions about Drift
What is Drift?
Drift is a Model Context Protocol (MCP) server that codebase intelligence for ai. detects patterns & conventions + remembers decisions across sessions. mcp server for any ide. offline cli. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Drift?
Follow the installation instructions on the Drift GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Drift?
Drift works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Drift free to use?
Yes, Drift is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Drift Alternatives — Similar Developer Tools Servers
Looking for alternatives to Drift? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Drift in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Drift?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.