driftdetect-mcp
v0.9.48
Published
MCP server that gives AI agents (Claude, Cursor, Copilot) deep understanding of your codebase patterns, conventions, and architecture. Query patterns, security boundaries, call graphs in real-time.
Maintainers
Readme
Drift MCP Server
MCP (Model Context Protocol) server that gives AI agents deep understanding of your codebase patterns, conventions, and architecture.
Installation
Recommended: Global install with pinned version
npm install -g [email protected]Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"drift": {
"command": "driftdetect-mcp"
}
}
}Cursor / Windsurf / Kiro
Add to your MCP config:
{
"mcpServers": {
"drift": {
"command": "driftdetect-mcp"
}
}
}Alternative: npx with pinned version
{
"mcpServers": {
"drift": {
"command": "npx",
"args": ["-y", "[email protected]"]
}
}
}Prerequisites
Scan your project first:
cd /path/to/your/project
npx driftdetect init
npx driftdetect scanSecurity & Privacy
- Reads: Source files in your project directory
- Writes:
.drift/directory only - Network: No outbound calls (all analysis is local)
- Telemetry: Anonymous usage stats, opt-out with
drift telemetry disable
Available Tools
45+ MCP tools organized in 7 layers:
| Layer | Key Tools | Purpose |
|-------|-----------|---------|
| Orchestration | drift_context | Start here - curated context for any task |
| Discovery | drift_status, drift_capabilities | Quick overview |
| Surgical | drift_signature, drift_callers, drift_type | Precise queries |
| Exploration | drift_patterns_list, drift_security_summary | Browse patterns |
| Detail | drift_pattern_get, drift_code_examples | Deep dives |
| Analysis | drift_test_topology, drift_coupling | Code health |
| Generation | drift_validate_change, drift_suggest_changes | AI assistance |
Example Usage
You: "Add a user preferences endpoint"
AI calls drift_context({ intent: "add_feature", focus: "user preferences" })
Drift returns:
- Your API patterns (decorators, prefixes, response format)
- Similar endpoints as examples
- Required middleware
- Files to modify
- Security considerationsDocumentation
License
Apache 2.0 - See LICENSE
