Martin Loop
Lets your AI agent run coding jobs with limits, checks and a clear outcome, so you can watch them less.
313 stars on GitHubby Martin LoopLicense Apache-2.0Updated 19 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add martin-loop -- npx -y @martinloop/mcp
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Run this task with npm test as the verifier and a 2 dollar budget.
Show me how much my Claude Code retries cost.
What it is
MartinLoop wraps a coding agent's job with a budget, an iteration limit, a verifier command, recovery information and a final result. The coding agent still writes the code. MartinLoop decides whether the run is VERIFIED, STOPPED or NEEDS REVIEW.
What it can do
martin run: run a governed job with an objective, verifier, budget and iteration capmartin audit: measure spend on fix-and-retry loops from Claude Code historymartin dossier: inspect the latest run resultmartin runs verify: validate stored run integritymartin doctorandmartin preflight: check readiness before spending- Swarm mode demo with many agents
When to use
- βΊWhen you want to give an agent a bigger job without watching every step
- βΊWhen you want a hard spend limit and a stop condition for an agent
- βΊWhen you want proof that checks passed before you accept the work
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
runaway-guardControls the costs of using AI APIs by setting clear limits. It ensures the agent doesn't spend more than planned on its tasks.unbounded-consumptionHelps your agent find AI endpoints and agent loops that have no spending or size limits, so a single user cannot run up costs or block the service.loop-libraryHelps your agent find, audit, adapt or design repeatable AI loops with clear triggers, checks, stop rules and handoffs.Frequently asked questions
Is it free?
The readme shows a license badge and npm install commands. It lists no price.
Does it write the code?
No. Your coding agent writes the code; MartinLoop sets limits, verifies and records the outcome.
Does VERIFIED mean the code has no bugs?
No. The readme says it proves only the checks you configured.
Does the audit send my data out?
The readme says session contents stay local. Use --offline to disable even the public pricing lookup.
How do I start?
Run npx -y martin-loop@latest start, or install globally with npm install -g martin-loop.
Which model does it use?
If you pass --model it passes it through. Otherwise the host runtime chooses its default.
If it does not work
- βΊIf several agent runtimes are detected, pick one with martin-loop enable --engine codex (or claude, gemini).
- βΊRun martin-loop doctor and preflight before a governed run.
- βΊCheck the MCP setup guide, or run martin mcp print-config to generate host config.
5 new skills a week. 1 minute to read.