Skip to main content
Glama

dev-loop-mcp

An MCP (Model Context Protocol) server that runs an AI-driven TDD development loop. It generalizes the dev-loop state machine to work with any project via a simple config file.

What it does

The dev-loop drives your project through these phases automatically:

INIT → DECOMPOSE → TDD_LOOP → BUILD → DEPLOY → INTEG_TEST → INTEG_FIX → QUALITY_REVIEW → CLEAN_TREE_CHECK → PUSH_AND_PR → DONE
  • INIT: Creates a git branch

  • DECOMPOSE: AI breaks your description into testable tasks

  • TDD_LOOP: AI writes scenarios, failing tests, then implementation (per task)

  • BUILD: Runs your build command

  • DEPLOY: Runs your deploy command (skipped if not configured)

  • INTEG_TEST: Runs your integration tests (skipped if not configured)

  • INTEG_FIX: AI fixes integration test failures (up to 5 attempts)

  • QUALITY_REVIEW: AI reviews and cleans up the diff

  • CLEAN_TREE_CHECK: Commits any stray files

  • PUSH_AND_PR: Pushes branch and opens a GitHub PR

Installation

npm install -g dev-loop-mcp

Or use via npx:

npx dev-loop-mcp

Configuration

Create dev-loop.config.json in your project root:

{
  "buildCommand": "npm run build",
  "testCommand": "npm test",
  "deployCommand": "npm run deploy",
  "integTestCommand": "npm run test:integ",
  "branchPrefix": "claude/",
  "model": "claude-sonnet-4-6"
}

All fields are optional. Defaults:

  • buildCommand: "npm run build"

  • testCommand: "npm test"

  • deployCommand: absent (DEPLOY phase skipped)

  • integTestCommand: absent (INTEG_TEST phase skipped)

  • branchPrefix: "claude/"

  • model: "claude-sonnet-4-6"

Environment variables

Variable

Required

Description

ANTHROPIC_API_KEY

Yes

Your Anthropic API key

DEV_LOOP_ROOT

No

Project root directory (defaults to cwd)

MCP setup

Add to your MCP client configuration (e.g., 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"
      }
    }
  }
}

Available tools

start_loop

Start a new development loop.

{
  "description": "Add email validation to the user registration flow",
  "branch": "claude/email-validation"
}

Or with pre-decomposed tasks:

{
  "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

Resume an interrupted loop:

{}

loop_status

Check the current loop status:

{}

Using as a library

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,
});
-
security - not tested
F
license - not found
-
quality - not tested

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