{
  "markdown": "# DevFlow MCP Server\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nMCP server for integrating [DevFlow](https://dev-flow.tech) with AI code assistants. Enables structured development workflows with enforced planning, task tracking, and code review gates.\n\n## What is DevFlow?\n\nDevFlow brings structure to AI-assisted development. Instead of letting AI agents write code without oversight, DevFlow enforces a workflow:\n\n```\nidea -> planning -> approval -> ready -> in_progress -> review -> done\n```\n\nEvery feature or bugfix goes through planning, gets approved, is tracked with tasks, and must pass review before completion. The MCP server connects your AI coding assistant to DevFlow, making this workflow seamless.\n\n## Installation\n\n### As a Claude Code Plugin (recommended)\n\nDevFlow is listed in the official Claude Code community marketplace. Install in one line:\n\n```bash\n/plugin marketplace add anthropics/claude-plugins-community\n/plugin install devflow\n```\n\nThis installs everything in one shot: MCP server (auto-registered via `mcpServers` in the plugin manifest), enforcement hooks, state-specific skills, and slash commands (`/devflow-start`, `/devflow-status`, `/devflow-next`, `/devflow-tasks`, `/devflow-create`, `/devflow-list`, `/devflow-review`). No separate MCP setup step needed.\n\n> **Since 4.23.0:** the MCP server no longer modifies your `CLAUDE.md`. The plugin's skills, hooks, and MCP tool responses cover the rules that the old `<!-- DEVFLOW-RULES-START -->` block used to inject. If you have an existing block from a pre-4.23 install and want it cleaned up, run `npx @dev-flow-tech/mcp-server uninstall --client claude` once.\n\n> **Since 4.26.0 (DF-339):** Two new auto-review skills fire when transitioning state. `devflow-plan-critic` reminds at `planning → approval` to deep-review the plan against 7 dimensions. `devflow-code-critic` does the same at `in_progress → review` for the implementation. Both support iterative loop (max 3), trivial-flow-skip, and auto-approve-gate based on `project_configs.allow_agent_self_approval`.\n\n> **Since 4.30.0 (DF-374/DF-377):** The DevFlow backend is the primary gate for state-transitions (unified `flowGate` service with conditions like `plan-required`, `tasks-required`, `agent-summary`, `testing-instructions`, `knowledge-gaps-resolved`, `pr-state-consistent`, `adr-compliance-clean`). The plugin's strictness checks are now informational warnings — the backend's `409 gate.failures[]` response is the source of truth. This makes Multi-Client setups (Claude Code, Codex, Cursor, Gemini) consistent — the gate behavior is the same regardless of which client connects.\n\nUpdates: `/plugin update devflow`.\n\n### Manual Setup (fallback)\n\nIf you'd rather skip the plugin and wire the MCP server directly:\n\n#### Claude Code\n\n```bash\nnpx github:KlausFreiberufler/devflow-mcp setup\n```\n\n#### Cursor\n\n```bash\nnpx github:KlausFreiberufler/devflow-mcp setup --client cursor\n```\n\n#### Gemini CLI\n\n```bash\nnpx github:KlausFreiberufler/devflow-mcp setup --client gemini\n```\n\n#### Windsurf\n\n```bash\nnpx github:KlausFreiberufler/devflow-mcp setup --client windsurf\n```\n\n**Restart your AI client after setup.**\n\n### Server-Split (since DF-334)\n\nFor clients with per-server tool-caps (e.g. Cursor 40-tool/server cap), DevFlow ships **three** entry-points:\n\n| Bin | Domain | Tool-Count |\n|---|---|---|\n| `devflow-mcp` | combined (default, BC) | ~65 |\n| `devflow-mcp-flows` | workflow (flow_*, task_*, agent_session_*, devflow_*, release_*) | ≤40 |\n| `devflow-mcp-wiki` | knowledge (adr_*, wiki_*, doc_page_*, knowledge_*, planning_context) | ≤40 |\n\nCursor (or any cap'd client) registers BOTH split-bins to get full tool-coverage:\n\n```json\n{\n  \"mcpServers\": {\n    \"devflow-flows\": { \"command\": \"npx\", \"args\": [\"-y\", \"@dev-flow-tech/mcp-server\", \"devflow-mcp-flows\"] },\n    \"devflow-wiki\":  { \"command\": \"npx\", \"args\": [\"-y\", \"@dev-flow-tech/mcp-server\", \"devflow-mcp-wiki\"]  }\n  }\n}\n```\n\nClaude Code uses the combined `devflow-mcp` bin (no cap, simpler config).\n\n## Getting Started\n\n1. Run `devflow_status()` to check the connection\n2. The browser opens for authentication on first use\n3. Link your project — a `.devflow.json` file is created in your project directory\n4. Start working: `flow_list()` to see available flows, or `flow_create()` to create one\n5. Initialize your session: `devflow_init({ flowId: \"...\" })`\n\n## Compatible Clients\n\n| Client | MCP Support | Status |\n|--------|-------------|--------|\n| [Claude Code](https://claude.ai/code) | Native | Fully supported |\n| [Cursor](https://cursor.sh) | MCP | Supported |\n| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | MCP | Supported |\n| [Windsurf](https://codeium.com/windsurf) | MCP | Supported |\n\n## Flow States\n\n| State | Description |\n|-------|-------------|\n| `idea` | New idea, no plan yet |\n| `planning` | Agent creates implementation plan |\n| `approval` | User approves the plan (wait state) |\n| `ready` | Plan approved, ready for implementation |\n| `in_progress` | Implementation in progress |\n| `review` | User reviews the implementation (wait state) |\n| `done` | Completed |\n\n### Required Fields for State Transitions\n\n| Transition | Required Fields |\n|------------|----------------|\n| -> `approval` | `implementationPlan` |\n| -> `review` | `agentSummary`, `testingInstructions` |\n\n## Available MCP Tools\n\n### Session & Flows\n\n| Tool | Description |\n|------|-------------|\n| `devflow_init` | **Required before all other tools.** Starts a flow session |\n| `devflow_status` | Show connection status, link/unlink projects |\n| `flow_list` | List flows (filtered by project) |\n| `flow_get` | Get flow details including plan and audit trail |\n| `flow_create` | Create a new flow |\n| `flow_update` | Update state, plan, agent messages |\n| `flow_get_feedback` | Get user feedback on plan or code |\n\n### Tasks\n\n| Tool | Description |\n|------|-------------|\n| `task_list` | List tasks of a flow |\n| `task_create` | Create a new task |\n| `task_update` | Update task or mark as completed |\n\n### Agent Sessions\n\n| Tool | Description |\n|------|-------------|\n| `agent_session_create` | Create agent session (tracking) |\n| `agent_session_log` | Log progress to a session |\n| `agent_session_complete` | Complete an agent session |\n| `agent_session_list` | List sessions of a flow |\n\n### Documentation & Search\n\n| Tool | Description |\n|------|-------------|\n| `doc_page_list` | List documentation pages |\n| `doc_page_get` | Get a documentation page |\n| `doc_page_create` | Create a documentation page |\n| `doc_page_update` | Update a documentation page |\n| `project_guidelines_get` | Get project guidelines |\n| `search` | Search flows, tasks, and projects |\n\n### Releases\n\n| Tool | Description |\n|------|-------------|\n| `release_list` | List releases |\n| `release_get` | Get release details |\n| `release_create` | Create a new release |\n| `release_update` | Update release status/details |\n\n### Knowledge — Wiki & ADRs (v4.5.0)\n\n| Tool | Description |\n|------|-------------|\n| `wiki_search` | Full-text search over flows, doc-pages, reviews, releases |\n| `wiki_get_page` | Resolve a slug / title / display-id to a concrete asset + backlinks |\n| `wiki_list_by_type` | List assets of a specific document-type (adr, pattern, runbook, …) |\n| `wiki_backlinks` | Reverse lookup: all assets that link to X |\n| `wiki_graph_neighbors` | Graph (nodes + edges) of the project or a subset |\n| `wiki_get_flow_context` | A flow's outgoing + incoming wiki links |\n| `wiki_get_project_context` | Project knowledge graph summary |\n| `adr_list` | List ADRs (optional status filter) |\n| `adr_get` | ADR detail with supersedes chain |\n| `adr_accept` | Accept an ADR from a flow-attachment |\n| `adr_update_status` | Move ADR through proposed → accepted → deprecated / superseded |\n\n### Knowledge Drafts (v4.6.0)\n\n| Tool | Description |\n|------|-------------|\n| `knowledge_backfill_request` | Get done-flows + existing ADRs + instructions — you classify and call `knowledge_draft_create` for each draft |\n| `knowledge_draft_create` | Create a draft (dedup-aware: same (project, type, title) merges `sourceFlowIds`) |\n| `knowledge_draft_list` | List drafts (optional status filter) |\n| `knowledge_draft_accept` | Accept a draft (creates the ADR / doc-page) |\n| `knowledge_draft_reject` | Reject a draft with optional reviewer note |\n\n### Knowledge Harvest / Check (v4.7.0)\n\n| Tool | Description |\n|------|-------------|\n| `knowledge_harvest` | Per-flow harvest — returns a single done-flow + context + instructions for draft proposal |\n| `knowledge_check_flow` | Flow analysis — drift (against existing ADRs) + missing-knowledge suggestions |\n\n### Code Drift (v4.9.0)\n\n| Tool | Description |\n|------|-------------|\n| `knowledge_check_drift` | Returns ADR content + its `affects_paths` + instructions. You use your own Glob/Read/Grep to compare claims vs code and report drift |\n\n## MCP Resources (v4.8.0)\n\nURI-addressable project assets for reading via `ReadResource`.\n\n| URI | Description |\n|-----|-------------|\n| `devflow://project/{id}/adr/{number}` | ADR content as markdown |\n| `devflow://project/{id}/flow/{displayId}` | Flow with plan + agent summary |\n| `devflow://project/{id}/graph` | Project knowledge-graph summary |\n| `devflow://project/{id}/search?q=...` | FTS search formatted as markdown |\n\n## MCP Prompts (v4.8.0)\n\nGuided one-shot workflows — each auto-assembles relevant project context.\n\n| Prompt | Args | Purpose |\n|--------|------|---------|\n| `ask_project` | `query` | Answer a free-form question; loads ADRs + recent done-flows as context |\n| `plan_with_project_knowledge` | `flowId` | Pre-build a planning prompt with relevant ADRs + related flows |\n| `review_with_drift_check` | `flowId` | Auto-run knowledge-check-prepare and produce a review prompt |\n\n## Pipeline Integration\n\nProjects with pipeline configuration get extended features:\n\n### Pipeline Model\n\nEach pipeline step has four dimensions:\n\n| Field | Description | Values |\n|-------|-------------|--------|\n| `actor` | Who works on this step? | `human`, `agent`, `both`, `auto`, `skip` |\n| `transitionPolicy` | Who can complete the step? | `human_only`, `agent_only`, `human_or_agent`, `auto` |\n| `kind` | Semantic step type | `work`, `review`, `handoff`, `terminal` |\n| `skippable` | Can the step be skipped? | `true`, `false` |\n\n### Gate Handling\n\nGates are controlled via `transitionPolicy`:\n- `human_only` — Agent is blocked (403), human must act in the UI\n- `agent_only` — Only agents can proceed\n- `human_or_agent` — Both can complete the step\n- `auto` — System transition, no actor needed\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `DEVFLOW_URL` | Backend URL | `https://api.app.dev-flow.tech` |\n| `DEVFLOW_TOKEN` | Auth token (skips browser auth) | - |\n| `DEVFLOW_PROJECT_ID` | Project scoping | from `.devflow.json` |\n\n### Manual Configuration\n\nAdd to your client's MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"devflow\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/devflow-mcp/dist/index.js\"],\n      \"env\": {\n        \"DEVFLOW_URL\": \"https://api.app.dev-flow.tech\"\n      }\n    }\n  }\n}\n```\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup and development workflow.\n\n## License\n\n[MIT](LICENSE) - DevFlow (dev-flow.tech)\n",
  "bytes": 11356,
  "sha": "d1da6b3d86d942406c41ebdb730d3c14589c4dd53e486d3d8a95be13e9e3bc48",
  "repo_slug": "klausfreiberufler/devflow-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_klausfreiberufler_devflow_mcp_devflow_71663128/readme"
}