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을 엽니다.
설치
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,
});This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/soynog/dev-loop-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server