Skip to main content
ClaudeWave

Make AI coding agents safe to scale autonomously: assign work, cap spend, enforce policy, verify output, roll back failures, learn from loops, and prove ROI across every repo.

MCP ServersOfficial Registry39 stars3 forksTypeScriptApache-2.0Updated today
ClaudeWave Trust Score
87/100
Trusted
Passed
  • Open-source license (Apache-2.0)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
Last scanned: 6/11/2026
Install in Claude Code / Claude Desktop
Method: NPX · martin-loop
Claude Code CLI
claude mcp add martin-loop -- npx -y martin-loop
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "martin-loop": {
      "command": "npx",
      "args": ["-y", "martin-loop"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Use cases

MCP Servers overview

# MartinLoop
<div align="center">
  <img src="./docs/assets/martinloop-logo.png" alt="MartinLoop" width="260">

  **Autonomous AI needs an independent control layer.**

  **MartinLoop makes every agent action bounded, verified, reversible, priced, and provable.**

  Starting with software work across Claude, Codex, Gemini, Cursor, and internal agent systems.

  Built from thousands of agent runs where the problem was not intelligence -- it was uncontrolled execution.

  **Get started:** `npx -y martin-loop@latest start`  
  **Try the demo:** `npx -y martin-loop@latest demo`  
  **Connect the MCP:** `npx -y @martinloop/mcp`

  [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square&logo=apache)](./LICENSE)
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6?style=flat-square&logo=typescript&logoColor=white)](./tsconfig.base.json)
  [![Node](https://img.shields.io/badge/node-%3E%3D20-3c873a?style=flat-square&logo=nodedotjs&logoColor=white)](#quick-start)
  [![npm version](https://img.shields.io/npm/v/martin-loop?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/martin-loop)
  [![npm downloads](https://img.shields.io/npm/dm/martin-loop?style=flat-square&label=downloads)](https://www.npmjs.com/package/martin-loop)
  [![martin-loop MCP server](https://glama.ai/mcp/servers/Keesan12/martin-loop/badges/score.svg)](https://glama.ai/mcp/servers/Keesan12/martin-loop)

  <br>
  <a href="https://martinloop.com/" aria-label="MartinLoop program memberships">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://martinloop.com/programs/martinloop-program-memberships-dark.svg">
      <img src="https://martinloop.com/programs/martinloop-program-memberships-light.svg" alt="MartinLoop is a member of NVIDIA Inception, Microsoft for Startups, AWS Activate, and Google for Startups" width="760">
    </picture>
  </a>
</div>

## Why MartinLoop

AI coding agents are useful, but unbounded retry loops are expensive.

A task that looked like a small fix can become dozens of attempts, a blown token budget, and a diff nobody trusts. MartinLoop gives every run an explicit contract: objective, verifier, budget, scope, receipts, and a clear stop condition.

Use it when AI coding work needs to stay bounded, inspectable, and safe to review before it becomes expensive or destructive.

## Why Teams Adopt MartinLoop

- It turns agent behavior into inspectable run receipts you can actually review.
- It enforces hard stop conditions before runaway retries spend more money.
- It adds rollback-aware rules so failed attempts do not silently leave unsafe changes behind.
- It helps teams compare outcomes across agents under one governed flow.

Teams use MartinLoop when they need governed agent execution that can be reviewed and trusted.

## 2-Minute Install Path

```sh
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
```

## Quick Start

Try MartinLoop in a disposable demo workspace:

```sh
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
npx -y martin-loop@latest --version
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
npx -y martin-loop@latest dossier --latest
npx -y martin-loop@latest share --latest
```

Optional global install:

```sh
npm install -g martin-loop
martin-loop --version
```

If this flow is useful, open an issue with feedback so we can keep improving the public experience.

`start` prints the first-run guided path. `run` auto-checks `doctor`, `session-start`, and `preflight`, then executes when the environment is ready.

Inspect-first flow:

```sh
npx -y martin-loop@latest doctor
npx -y martin-loop@latest session-start
npx -y martin-loop@latest preflight "Summarize the demo workspace and prove tests still pass" --verify "npm test"
```

`share --latest` writes `run-receipt.json` and `run-receipt.md` into the selected run directory under `share/`. Proof-card images are opt-in with `--with-proof-card` or `--proof-card-format`.

Release notes for the current root package: [MartinLoop 0.4.5](./docs/release/OSS-0.4.5-RELEASE-NOTES.md).

## MartinLoop Arcade

Long governed runs can take a few minutes. MartinLoop Arcade keeps the terminal useful while you wait.

After 30 seconds, if the run is still going and you are in an interactive terminal, MartinLoop asks once:

```
Still working. Play MartinLoop Arcade while you wait? [y/N]
```

Pressing `y` launches a terminal Space Invaders game. The governed run continues in the background — receipts, budget tracking, and the final result are untouched. The game closes automatically when the run finishes and the terminal is fully restored.

The prompt never appears in CI, piped output, JSON mode, or non-interactive environments.

```sh
martin run "your task" --verify "npm test"          # prompts after 30 s if still running
martin run "your task" --verify "npm test" --arcade  # offer the game immediately
martin run "your task" --verify "npm test" --no-arcade  # disable the prompt
```

## Visual Proof

MartinLoop turns an AI coding run into an inspectable execution record: budget used, verifier result, changed files, rollback evidence, and final receipt.

<div align="center">
  <img src="./docs/assets/cli-animated.svg" alt="MartinLoop CLI showing a governed agent run" width="720">
</div>

Ungoverned agents can retry until cost and scope drift. MartinLoop adds budget caps, verifier gates, and audit evidence so the run has a clear stop condition.

<div align="center">
  <img src="./docs/assets/side-by-side.svg" alt="MartinLoop governed run compared with an unbounded retry loop" width="720" height="1080">
</div>

## Proof Receipts

Proof receipts are local share bundles for governed AI coding runs. They show the task, spend, budget, verifier result, receipt integrity, and any evidence boundary that should not be rounded into confidence.

This real governed run spent `$0.51` against a `$3.00` budget. The verifier passed and the receipt integrity was signed, but the proof stayed at `EVIDENCE_BOUNDARY` because rollback evidence was not recorded.

<div align="center">
  <img src="./docs/assets/proof-receipt-live-governed.png" alt="MartinLoop CLI proof receipt for a governed run with spend, budget, verifier, integrity, and evidence boundary" width="720">
</div>

Generate your own receipt after a governed run:

```sh
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test"
npx -y martin-loop@latest runs verify --latest
npx -y martin-loop@latest share --latest
```

Example receipt files: [Markdown](./docs/examples/proof-receipts/live-governed-run-receipt.md) and [JSON](./docs/examples/proof-receipts/live-governed-run-receipt.json).

## Run This Audit Yourself

Use this lane from a clean temp directory to verify the public CLI flow exactly as shipped:

```sh
npx -y martin-loop@0.4.3 --version
npx -y martin-loop@0.4.3 start
npx -y martin-loop@0.4.3 demo
cd martin-loop-demo
npm install
npx -y martin-loop@0.4.3 run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1 --json
npx -y martin-loop@0.4.3 dossier --latest --json
npx -y martin-loop@0.4.3 share --latest --json
```

For deterministic installs, pin the package line (`martin-loop@0.4.3`) or use `martin-loop@latest`. Plain `npx martin-loop` can resolve a stale local cache on some machines.

Default share bundle outputs:

- `share/run-receipt.json`
- `share/run-receipt.md`

Optional proof-card outputs:

- `share/proof-card-r<revision>-<hash>.svg`
- `share/proof-card-r<revision>-<hash>.png`

## See It In Action

The point is not that every governed run is always cheaper. The point is that every run becomes inspectable and enforceable: budget policy, verifier result, stop reason, and evidence are explicit.

For a deterministic public repro lane, use the benchmark workspace and compare governed execution to unbounded retry behavior:

- `npx martin-loop bench --suite under-3-challenge`
- `npx martin-loop bench --suite ralphy-engineering-50`

## Ralph-Style Loops

A Ralph-style loop is the failure mode where an AI coding agent keeps trying without knowing when continuing is unsafe, uneconomical, or unlikely to succeed.

MartinLoop keeps the useful part of the loop, then adds brakes:

- stop before budget overspend
- classify unsafe or invalid actions before execution
- write an audit record for every attempt
- preserve rollback and verifier evidence for review
- reduce runaway context growth with compact run summaries

## Failure Taxonomy (13 Runtime Classes)

Public governed runs use one canonical taxonomy: the 13 runtime `FailureClass` values from `@martin/contracts`.

See the canonical table: [Failure Taxonomy (13 Runtime Classes)](./docs/oss/FAILURE-TAXONOMY-13.md).

## What It Does

- Budget caps stop the next attempt before a configured USD, token, or iteration limit is exceeded.
- Verifier gates require a real check, such as `npm test`, before a run can count as complete.
- Policy checks block unsafe verifier commands, risky path changes, and secret-like task inputs before execution.
- Failure classification uses canonical runtime classes for triage and reporting. See [Failure Taxonomy (13 Runtime Classes)](./docs/oss/FAILURE-TAXONOMY-13.md).
- Run receipts capture stop reason, verifier evidence, budget posture, integrity state, and the next safe action.
- `martin share --latest` turns the latest governed run into a local share bundle with a redacted JSON receipt and Markdown recap. Proof-card images are generated only when explicitly requested.
- MCP integration gives hosts one write-capable execution entrypoint plus riche
agent-runtimeai-agent-runtimeai-coding-agentsai-control-planeai-governanceai-safetyaudit-trailbudget-enforcementclaude-codecodexcoding-agentscontrol-planegithub-actionsgoverned-runtimellmopsmcpmodel-context-protocolobservabilitypolicy-as-coderollback

What people ask about martin-loop

What is Keesan12/martin-loop?

+

Keesan12/martin-loop is mcp servers for the Claude AI ecosystem. Make AI coding agents safe to scale autonomously: assign work, cap spend, enforce policy, verify output, roll back failures, learn from loops, and prove ROI across every repo. It has 39 GitHub stars and was last updated today.

How do I install martin-loop?

+

You can install martin-loop by cloning the repository (https://github.com/Keesan12/martin-loop) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is Keesan12/martin-loop safe to use?

+

Our security agent has analyzed Keesan12/martin-loop and assigned a Trust Score of 87/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.

Who maintains Keesan12/martin-loop?

+

Keesan12/martin-loop is maintained by Keesan12. The last recorded GitHub activity is from today, with 2 open issues.

Are there alternatives to martin-loop?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy martin-loop to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: Keesan12/martin-loop
[![Featured on ClaudeWave](https://claudewave.com/api/badge/keesan12-martin-loop)](https://claudewave.com/repo/keesan12-martin-loop)
<a href="https://claudewave.com/repo/keesan12-martin-loop"><img src="https://claudewave.com/api/badge/keesan12-martin-loop" alt="Featured on ClaudeWave: Keesan12/martin-loop" width="320" height="64" /></a>

More MCP Servers

martin-loop alternatives