# Martin Loop

Martin Loop puts budgets, stop conditions, verification, and recovery around coding-agent jobs. Use it when a run needs a clear handoff and stored evidence.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 394
- Author: Keesan12
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Keesan12/martin-loop
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/martin-loop

## What it does

Martin Loop manages the work around a coding agent. You define an objective, success check, budget, edit scope, and iteration cap; the system then moves through preflight, control, verification, recovery, proof, and analysis. The agent still writes the code. Martin Loop keeps the run bounded and records its outcome.

Configured verifier commands provide fresh evidence tied to the active run and workspace. Inspect the latest result with `martin dossier --latest`, then validate stored integrity with `martin runs verify --latest`. The result can be `VERIFIED`, `STOPPED`, or `NEEDS REVIEW`. Martin Loop does not replace Git, CI, code review, security scanners, or the coding agent.

The project requires Node >=20. Optional hosted dashboard sync uses `MARTIN_API_TOKEN` and `MARTIN_TELEMETRY_ENDPOINT`; governed work remains local-first.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add martin-loop -- npx -y @martinloop/mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add martin-loop -- npx -y @martinloop/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "martin-loop": {
            "command": "npx",
            "args": [
                "-y",
                "@martinloop/mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "martin-loop": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@martinloop/mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add martin-loop npx -y @martinloop/mcp
```

## When to use it
- define an objective, verifier, budget, and iteration cap
- limit the agent’s edit scope and spend
- stop retries when run conditions are reached
- check a result with independent verifier commands
- preserve recovery evidence for a later handoff

## Example prompts
- Run this coding task with a fixed budget, edit scope, and iteration cap.
- Use the configured verifier commands and prepare the final handoff status.
- Show the latest dossier and verify the integrity of the stored run.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
