dev-loop-mcp
dev-loop-mcp
AI 기반 TDD 개발 루프를 실행하는 MCP(Model Context Protocol) 서버입니다. 간단한 설정 파일을 통해 모든 프로젝트에서 작동하도록 개발 루프 상태 머신을 일반화합니다.
기능
두 가지 루프 유형을 사용할 수 있습니다. 둘 다 동일한 TDD 파이프라인을 공유하며, 작업이 생성되는 방식만 다릅니다:
flowchart LR
subgraph start_loop["start_loop (feature)"]
direction LR
A("description<br/>or tasks") --> B["DECOMPOSE<br/>AI breaks into tasks"]
B --> C[/"tasks"/]
end
subgraph start_debug_loop["start_debug_loop (bug)"]
direction LR
D("symptom<br/>+ context files") --> E["DIAGNOSE<br/>AI ranks hypotheses"]
E --> F[/"tasks"/]
end
C --> Pipeline["TDD pipeline"]
F --> Pipeline
subgraph Pipeline["Shared TDD pipeline"]
direction LR
I[INIT] --> T[TDD_LOOP<br/>per task]
T --> Bu[BUILD]
Bu --> De[DEPLOY<br/>optional]
De --> It[INTEG_TEST<br/>optional]
It -->|pass| Qr[QUALITY_REVIEW]
It -->|fail| If[INTEG_FIX<br/>up to 5×]
If --> Qr
Qr --> Ct[CLEAN_TREE<br/>CHECK]
Ct --> Pr[PUSH_AND_PR]
Pr --> Done(["✓ DONE<br/>PR opened"])
end전체 상태 머신
flowchart TD
start_loop --> INIT
start_debug_loop -->|"DIAGNOSE:<br/>ranked hypotheses → tasks"| INIT
INIT -->|"pre-loaded tasks"| TDD_LOOP
INIT -->|"description only"| DECOMPOSE
DECOMPOSE -->|"AI → Task[]"| TDD_LOOP
TDD_LOOP -->|"task done, more remain"| TDD_LOOP
TDD_LOOP -->|"all tasks done"| BUILD
TDD_LOOP -->|"task failed"| FAILED
BUILD -->|pass| DEPLOY
BUILD -->|fail| FAILED
DEPLOY -->|"pass / skipped"| INTEG_TEST
DEPLOY -->|fail| FAILED
INTEG_TEST -->|"pass / skipped"| QUALITY_REVIEW
INTEG_TEST -->|fail| INTEG_FIX
INTEG_FIX -->|fixed| QUALITY_REVIEW
INTEG_FIX -->|"still failing<br/>(retry, max 5)"| INTEG_FIX
INTEG_FIX -->|"5 attempts exhausted"| FAILED
QUALITY_REVIEW --> CLEAN_TREE_CHECK
CLEAN_TREE_CHECK --> PUSH_AND_PR
PUSH_AND_PR --> DONE
DONE(["✓ DONE"])
FAILED(["✗ FAILED"])
style DONE fill:#22c55e,color:#fff
style FAILED fill:#ef4444,color:#fff
style start_loop fill:#6366f1,color:#fff
style start_debug_loop fill:#f59e0b,color:#fff작업별 TDD 주기
TDD_LOOP의 각 작업은 이 내부 주기를 실행합니다(최대 5회의 코딩 반복):
flowchart LR
A["Write scenarios<br/>scenarios/scenarios-*.md"] --> B["Write failing tests<br/>*.test.ts"]
B --> C{"Tests<br/>fail?"}
C -->|"no — tester error"| Z["✗ task failed"]
C -->|yes| D["Implement"]
D --> E{"Tests<br/>pass?"}
E -->|yes| F["✓ commit & next task"]
E -->|"no (retry)"| D단계 참조:
INIT: git 브랜치를 생성합니다.
DECOMPOSE: AI가 설명을
Task[]로 변환합니다.DIAGNOSE: (디버그 루프 전용) AI가 증상 및 컨텍스트 파일을 읽고 순위가 매겨진 근본 원인 가설을
Task[]로 생성합니다.TDD_LOOP: 작업별: 시나리오 → 실패 테스트 → 구현(작업당 최대 5회의 코딩 반복)
BUILD:
buildCommand를 실행합니다.DEPLOY:
deployCommand를 실행합니다(설정되지 않은 경우 건너뜀).INTEG_TEST:
integTestCommand를 실행합니다(설정되지 않은 경우 건너뜀).INTEG_FIX: AI가 통합 테스트 실패를 진단하고 수정합니다(최대 5회 시도).
QUALITY_REVIEW: AI가 전체 브랜치 diff를 검토하고 품질 수정 사항을 적용합니다.
CLEAN_TREE_CHECK: 커밋되지 않은 모든 파일을 자동 커밋합니다.
PUSH_AND_PR: 브랜치를 푸시하고 GitHub PR을 엽니다.
Related MCP server: Maestro
설치
npm install -g dev-loop-mcp또는 npx를 사용하세요:
npx dev-loop-mcp설정
프로젝트 루트에 dev-loop.config.json을 생성하세요:
{
"buildCommand": "npm run build",
"testCommand": "npm test",
"deployCommand": "npm run deploy",
"integTestCommand": "npm run test:integ",
"branchPrefix": "claude/",
"model": "claude-sonnet-4-6"
}모든 필드는 선택 사항입니다. 기본값:
buildCommand:"npm run build"testCommand:"npm test"deployCommand: 없음 (DEPLOY 단계 건너뜀)integTestCommand: 없음 (INTEG_TEST 단계 건너뜀)branchPrefix:"claude/"model:"claude-sonnet-4-6"
환경 변수
변수 | 필수 | 설명 |
| 예 | Anthropic API 키 |
| 아니요 | 프로젝트 루트 디렉토리 (기본값: |
MCP 설정
MCP 클라이언트 설정에 추가하세요(예: Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"dev-loop": {
"command": "dev-loop-mcp",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"DEV_LOOP_ROOT": "/path/to/your/project"
}
}
}
}사용 가능한 도구
start_debug_loop
증상 설명으로부터 디버그 루프를 시작합니다. AI는 근본 원인을 순위가 매겨진 TDD 작업으로 진단한 다음, 가설별로 표준 TDD 파이프라인을 실행하고 전체 진단 보고서와 함께 PR을 엽니다.
{
"symptom": "read_website returns failure on most real URLs",
"context_files": ["src/tools/read-website.ts", "src/http/client.ts"]
}매개변수:
symptom(필수) — 관찰된 버그나 실패에 대한 자연어 설명context_files(선택 사항) — 진단 중 AI가 읽어야 할 소스 파일의 상대 경로
DIAGNOSE 단계는 표준 TDD 파이프라인(위의 상태 머신 참조) 이전에 실행됩니다. PR 본문에는 증상, 식별된 근본 원인, 수정된 내용이 포함됩니다.
브랜치 이름은 <branchPrefix>debug/<symptom-slug>로 지정됩니다.
start_loop
새로운 개발 루프를 시작합니다.
{
"description": "Add email validation to the user registration flow",
"branch": "claude/email-validation"
}또는 미리 분해된 작업과 함께 사용:
{
"tasks": [
{
"id": 1,
"title": "Add email validator function",
"scope": "src/utils/email.ts",
"acceptance": "validateEmail returns true for valid emails and false for invalid ones"
}
],
"branch": "claude/email-validation"
}resume_loop
중단된 루프를 재개합니다:
{}loop_status
현재 루프 상태를 확인합니다:
{}라이브러리로 사용하기
import { runLoop, loadConfig, RealShellAdapter, AnthropicDevWorker } from "dev-loop-mcp";
import Anthropic from "@anthropic-ai/sdk";
const config = await loadConfig("/path/to/project");
const client = new Anthropic();
const shell = new RealShellAdapter();
const aiWorker = new AnthropicDevWorker(client, config.model, shell);
const finalState = await runLoop(initialState, {
shell,
aiWorker,
stateFilePath: "/path/to/project/.loop-state.json",
repoRoot: "/path/to/project",
config,
});Available Tools
4 toolsadvance_loopA
Report the outcome of the last instruction and get the next one. Call this after completing each phase step. The loop persists state between calls.
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | The outcome event. One of: BranchCreated, TasksDecomposed, TaskDone, TaskFailed, BuildPassed, BuildFailed, DeployPassed, DeployFailed, IntegPassed, IntegFailed, IntegFixPassed, IntegFixFailed, QualityDone, TreeClean, PrCreated. | |
| tasks | No | For TasksDecomposed: the decomposed or diagnosed task list. | |
| failureReason | No | For TaskFailed: why the task could not be completed. | |
| stderr | No | For BuildFailed or DeployFailed: the error output. | |
| failures | No | For IntegFailed: array of {testFile, testName, description}. | |
| prUrl | No | For PrCreated: the URL of the opened pull request. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the loop persists state between calls, which is useful context. However, it doesn't describe error handling, rate limits, authentication needs, or what happens if called out of sequence. For a stateful tool with no annotations, more behavioral details would be helpful.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (two sentences) and front-loaded with the core purpose. Every word earns its place, with no redundant information. The structure moves from primary function to usage guidance efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (stateful loop advancement with multiple event types) and 100% schema coverage but no output schema or annotations, the description is mostly complete. It explains the core workflow and when to use it, though it could benefit from mentioning what the tool returns (the 'next instruction') more explicitly since there's no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly with their purposes and event-specific usage. The description doesn't add any parameter-specific information beyond what's in the schema, making the baseline score of 3 appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('Report the outcome', 'get the next one') and distinguishes it from siblings by specifying it's for after completing each phase step in a loop. It explicitly mentions the loop persists state, which differentiates it from start_loop or loop_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Call this after completing each phase step.' This tells the agent precisely when to use this tool versus alternatives like start_loop (for initiation) or loop_status (for checking status without advancing).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
loop_statusB
Get the current status of the loop: phase, branch, task list, failure reason, or PR URL.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It indicates this is a read operation ('Get'), but doesn't specify whether it requires authentication, has rate limits, returns real-time or cached data, or handles errors. The description adds minimal behavioral context beyond the basic action, missing key details for safe and effective use.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action ('Get the current status of the loop') and lists the retrieved data points without unnecessary words. Every element serves a purpose, making it highly concise and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It covers what data is retrieved, but without annotations or an output schema, it doesn't explain the return format (e.g., structure of the status object) or behavioral aspects like error handling. For a status-checking tool, this leaves some contextual needs unmet.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately adds no parameter information, focusing instead on the tool's purpose and output semantics. This aligns with the baseline expectation for tools without parameters, as the schema fully covers the input structure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with the verb 'Get' and specifies the resource 'current status of the loop', including what information is retrieved (phase, branch, task list, failure reason, PR URL). It distinguishes itself from sibling tools like 'advance_loop', 'start_debug_loop', and 'start_loop' by focusing on status retrieval rather than initiation or progression, though it doesn't explicitly name these alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by listing the specific data points retrieved (e.g., phase, failure reason), suggesting it's for monitoring or checking loop progress. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., when to check status vs. start or advance a loop) or any prerequisites, leaving usage context inferred rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
start_debug_loopC
Start a debug loop from a symptom description. Returns an instruction telling you to diagnose root causes as ranked TDD tasks, then proceeds through the standard TDD pipeline. The PR body will include a diagnosis writeup.
| Name | Required | Description | Default |
|---|---|---|---|
| symptom | Yes | Natural-language description of the observed bug or failure. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions the tool returns an instruction for TDD tasks and that the PR body includes a diagnosis writeup, giving some insight into outputs and workflow. However, it lacks critical details like whether this is a read-only or mutating operation, error handling, or any side effects, which are essential for a tool that starts processes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with two sentences that front-load the core action and follow with output details. Each sentence adds value: the first defines the tool's purpose, and the second explains the return behavior and PR inclusion. There's no wasted text, though it could be slightly more structured for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (starting a debug process with no annotations or output schema), the description is incomplete. It covers the basic action and some output hints but misses key behavioral aspects like mutation status, error cases, or interaction with sibling tools. Without annotations or an output schema, more detail is needed to fully inform the agent about this process-initiating tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'symptom' parameter fully documented as a natural-language bug description. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. This meets the baseline score of 3, as the schema does the heavy lifting without extra value from the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Start a debug loop from a symptom description.' It specifies the verb ('Start'), resource ('debug loop'), and input trigger ('symptom description'). However, it doesn't explicitly differentiate from sibling tools like 'start_loop' or 'advance_loop', which reduces clarity about when to choose this specific debug variant.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal guidance on when to use this tool. It mentions the tool initiates a debug loop from a symptom, but offers no explicit when/when-not criteria or alternatives. While it implies usage for bug diagnosis, it doesn't compare to sibling tools like 'start_loop' or specify prerequisites, leaving the agent with little contextual direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
start_loopA
Start a new TDD development loop. Returns an instruction telling you what to do first. Keep calling advance_loop after each step until the loop reaches DONE or FAILED. Phases: INIT → DECOMPOSE → TDD_LOOP → BUILD → DEPLOY → INTEG_TEST → INTEG_FIX → QUALITY_REVIEW → CLEAN_TREE_CHECK → PUSH_AND_PR.
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Natural language description of the work to be done. | |
| tasks | No | Pre-decomposed task list. If provided, skips DECOMPOSE. | |
| branch | No | Git branch name. Generated from description if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the tool's purpose and procedural flow (phases, interaction with advance_loop), but lacks details about potential side effects, error conditions, authentication needs, or what 'DONE or FAILED' states entail. It provides basic behavioral context but misses important operational details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences: the first states the purpose and return value, the second provides crucial procedural guidance and lists all phases. Every element serves a clear purpose with zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (managing a multi-phase development loop) and the absence of both annotations and output schema, the description provides adequate procedural context but lacks details about return values, error handling, and operational constraints. It's complete enough to understand the basic workflow but leaves important implementation questions unanswered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Start a new TDD development loop') and the resource (the loop itself), with a specific verb. However, it doesn't explicitly distinguish this from its sibling 'start_debug_loop' beyond the name difference, leaving some ambiguity about when to choose one over the other.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: it tells the agent to 'Keep calling advance_loop after each step until the loop reaches DONE or FAILED' and lists all the phases of the loop. This gives clear procedural context for when and how to use this tool in relation to its sibling 'advance_loop'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
advance_loop - First observed
loop_status - First observed
start_debug_loop - First observed
start_loop
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: advance_loop progresses the loop, loop_status checks current state, start_debug_loop initiates debugging, and start_loop initiates standard development. The descriptions make it impossible to confuse their functions.
All tools follow a consistent verb_noun pattern with snake_case throughout: advance_loop, loop_status, start_debug_loop, and start_loop. The naming is predictable and readable across the set.
Four tools is well-scoped for a development loop server, covering initiation (start_loop, start_debug_loop), progression (advance_loop), and status checking (loop_status). Each tool earns its place without bloat or gaps.
The tool set provides complete lifecycle coverage for TDD development loops: starting loops (standard and debug), advancing through phases, and checking status. No obvious gaps exist for the stated purpose, enabling agents to manage loops end-to-end.
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Devopness MCP server for DevOps happiness! Empower AI Agents to deploy apps and infra, to any cloud.
- JamOAuthdev.jam.mcp
The Jam MCP server provides AI tools with instant bug context without manual prompting, enabling a streamlined workflow from bug identification to ticket creation and pull request generation without switching between tools.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server that integrates DevFlow with AI code assistants to enforce structured development workflows including planning, task tracking, and code review gates.6566 npm1MIT
- FlicenseNot gradedqualityDmaintenanceAn autonomous MCP server for AI-assisted development with zero-API approach, auto-correction, inverted TDD, and native pipelines.-
- AlicenseAqualityAmaintenanceAn MCP server that brings senior-QA discipline to AI coding assistants, enabling test planning, TDD, mutation testing, and code review.486Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn MCP server that adds engineering discipline to AI-assisted development, enforcing evidence-gated TDD, security review, backup strategy, and deployment generation to turn AI-generated code into production-ready software.8 npm12MIT