Your AI senior dev teammate β orchestrate intelligent multi-step development workflows with persistent memory, safety, and stack intelligence.
DevFlow MCP is an open-source Model Context Protocol server that transforms AI coding agents (Claude, Cursor, VS Code Copilot) into a proactive senior dev teammate.
Instead of one-shot code generation, DevFlow gives your AI agent:
- π§ Persistent project memory β decisions, tech debt, architecture notes survive across sessions
- β‘ Multi-step workflow orchestration β safely chain schema β migration β API β tests β docs
- π‘οΈ Safety-first execution β sandboxed commands, approval gates, audit logs, rollback support
- π Stack intelligence β pre-built templates for Next.js TypeScript, FastAPI/Python, Express
- π¬ Dry-run mode β preview any workflow before committing to real changes
- πΏ Git-aware β auto-generates commit messages, branch management, diff review
# Install globally
npm install -g devflow-mcp
# Or use npx
npx devflow-mcpgit clone https://github.com/your-org/devflow-mcp
cd devflow-mcp
npm install
npm run build
npm startPrerequisites: Node.js 18+, and Python/build tools for
better-sqlite3native compilation. On macOS:xcode-select --install. On Ubuntu:sudo apt-get install python3 make g++. On Windows:npm install --global windows-build-tools.
# Build from source
git clone https://github.com/your-org/devflow-mcp
cd devflow-mcp
docker-compose upNote: A pre-built Docker image will be published to GitHub Container Registry once CI/CD is set up. Until then, build from source using the steps above.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"devflow": {
"command": "npx",
"args": ["devflow-mcp"],
"env": {
"DEVFLOW_PROJECT_NAME": "my-app",
"DEVFLOW_STACK": "nextjs-ts"
}
}
}
}Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"devflow": {
"command": "node",
"args": ["./node_modules/.bin/devflow-mcp"],
"env": {
"DEVFLOW_STACK": "nextjs-ts"
}
}
}
}{
"mcp.servers": {
"devflow": {
"command": "npx devflow-mcp",
"transport": "stdio"
}
}
}You: Initialize DevFlow for my Next.js app called "shopify-clone"
AI: [calls initializeProject] β
DevFlow initialized! Stack: nextjs-ts auto-detected...
You: Implement user authentication using the nextjs-ts template
AI: [calls startWorkflow with template: {stack: "nextjs-ts", feature: "auth"}]
β³ Workflow created with 5 steps. First step: Install next-auth...
You: Execute the first step
AI: [calls executeStep] β
Step completed: npm install next-auth...
π Next step requires approval: Write auth.ts config
You: Looks good, approve it
AI: [calls approveStep] β
Approved. Running next step...
You: Remember that we decided to use Zustand over Redux for state management because the app is small
AI: [calls addMemory, type: "decision"] ποΈ Memory stored!
You: What state management approach did we decide on?
AI: [calls queryMemory] Found: "Decided to use Zustand over Redux..."
You: Show me what would happen if we set up the FastAPI auth endpoint, but don't actually do it
AI: [calls startWorkflow with dryRun: true] π¬ [DRY RUN] Workflow preview...
You: Run the full CI pipeline locally before I push
AI: [calls ciSimulate] β
TypeScript check passed | β
Tests passed | β
Build passed
| Tool | Description |
|---|---|
initializeProject |
Set up DevFlow for a project |
getProjectContext |
View current project state |
indexRepo |
Index codebase for smart search |
addMemory |
Store knowledge (decisions, debt, bugs) |
queryMemory |
Full-text search memories |
listMemories |
Browse stored knowledge |
deleteMemory |
Remove stale memories |
startWorkflow |
Create multi-step workflow |
executeStep |
Run next workflow step |
approveStep |
Approve a pending step |
skipStep |
Skip a workflow step |
getWorkflowStatus |
Check workflow progress |
listWorkflows |
View all workflows |
listTemplates |
Browse stack templates |
previewTemplate |
Preview template steps |
gitStatus |
Git working tree status |
gitDiff |
Show file diffs |
gitCommit |
Commit with AI message |
gitLog |
Recent commit history |
gitBranch |
Create & checkout branches |
runCommand |
Safe sandboxed execution |
runTests |
Run test suite (auto-detected) |
readFile |
Safe file reading |
writeFile |
Safe file writing |
updateConfig |
Update DevFlow settings |
ciSimulate |
Local CI/CD simulation |
getAuditLog |
View action history |
Full-stack Next.js 14 App Router with Tailwind CSS and shadcn/ui.
Features: auth api-routes ui-component page middleware
Production FastAPI with Pydantic v2, SQLAlchemy 2.0, Alembic migrations.
Features: auth endpoint model migration test
Type-safe Express API with Prisma ORM and Zod validation.
Features: route middleware model
Create .devflow/config.json or use environment variables:
{
"projectName": "my-app",
"stack": "nextjs-ts",
"rootDir": "/path/to/project",
"packageManager": "pnpm",
"approvalRequired": true,
"sandboxEnabled": true,
"blockedPaths": ["node_modules", ".git", "dist"],
"logLevel": "info"
}Environment variables:
| Variable | Default | Description |
|---|---|---|
DEVFLOW_PROJECT_NAME |
my-project |
Project name |
DEVFLOW_STACK |
generic |
Stack type |
DEVFLOW_ROOT_DIR |
cwd |
Project root path |
LOG_LEVEL |
info |
Logging level |
DEVFLOW_DEBUG |
0 |
Verbose debug mode |
devflow-mcp/
βββ src/
β βββ index.ts # MCP server entry + tool registration
β βββ config.ts # Config loading & validation
β βββ db.ts # SQLite + schema migrations
β βββ logger.ts # Pino structured logging
β βββ audit.ts # Audit trail
β βββ memory/
β β βββ index.ts # FTS5-powered RAG memory
β βββ workflows/
β β βββ orchestrator.ts # Multi-step workflow engine
β βββ templates/
β β βββ index.ts # Stack-specific step templates
β βββ git/
β β βββ index.ts # Git integration via simple-git
β βββ safety/
β β βββ sandbox.ts # Command allowlist + path validation
β βββ tools/
β βββ project.ts # initializeProject, getProjectContext, indexRepo
β βββ memory.ts # addMemory, queryMemory, listMemories
β βββ workflows.ts # startWorkflow, executeStep, approveStep
β βββ git.ts # gitStatus, gitDiff, gitCommit, runCommand, runTests
β βββ safety.ts # readFile, writeFile, ciSimulate, getAuditLog
β βββ templates.ts # listTemplates, previewTemplate
βββ .devflow/ # Auto-created per project
β βββ config.json # Project config
β βββ devflow.db # SQLite: memory, workflows, audit
β βββ logs/ # Log files
βββ docker-compose.yml
βββ Dockerfile
βββ README.md
Key Design Decisions:
- SQLite with FTS5 for zero-dependency RAG β works offline, no vector DB setup needed
- Step-based workflows with explicit approval gates prevent runaway AI actions
- Command allowlist + path validation prevents sandbox escapes
- Audit log tracks every action for accountability and rollback
- Transport: stdio (primary) β simple, compatible with all MCP clients
We love contributions! DevFlow is MIT-licensed and community-driven.
- Fork the repo
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes with tests
- Run CI:
npm run typecheck && npm test - Submit a PR with a clear description
Areas we'd love help with:
- Additional stack templates (Remix, SvelteKit, Django, Rails...)
- Web dashboard UI
- ChromaDB/LanceDB vector DB integration
- VS Code extension
- Docker-in-Docker sandboxing
- Rollback/undo functionality
See CONTRIBUTING.md for details.
MIT Β© Pedro Shakoor
Built with β€οΈ for developers who want AI that ships, not just suggests.