# Martin Loop MCP server

> Provides a governance layer for coding agents to run, verify, and recover software tasks with strict budget and iteration limits.

- Repository: https://github.com/Keesan12/martin-loop
- Page: https://hostedmcp.org/servers/keesan12/martin-loop
- Transport: stdio
- Stars: 286
- License: Apache-2.0
- Latest version: 0.9.0

## Install

### Claude Code

```sh
claude mcp add martin-loop -- npx -y @martinloop/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "martin-loop": {
      "command": "npx",
      "args": [
        "-y",
        "@martinloop/mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "martin-loop": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@martinloop/mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"martin-loop","type":"stdio","command":"npx","args":["-y","@martinloop/mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "martin-loop": {
      "command": "npx",
      "args": [
        "-y",
        "@martinloop/mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add martin-loop -- npx -y @martinloop/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.martin-loop]
command = "npx"
args = ["-y", "@martinloop/mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user martin-loop npx -- -y @martinloop/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "martin-loop": {
      "command": "npx",
      "args": [
        "-y",
        "@martinloop/mcp"
      ]
    }
  }
}
```

## FAQ

### How can I limit the cost of my coding agent runs?

You can set a hard spend ceiling using the --budget-usd flag during a run.

### Does MartinLoop replace the coding agent itself?

No, the coding agent still writes the code; MartinLoop provides the control path, limits, and verification around the work.

### Can I audit how much I am spending on agent retry loops?

Yes, you can run the audit command to see how much API-equivalent spend went into fix-and-retry loops.

### Is the verification process a guarantee that code is bug-free?

No, a configured verifier only proves the specific checks it is programmed to run.
