← Back to directory
M

MartinLoop MCP Server

Community
An independent control layer that gives AI coding agents budgets, brakes, and receipts
GitHub source repository ↗
★ 42 Stars Category · Dev Tools Popular
79FMRS · B

MartinLoop MCP Server has a clear thesis: autonomous AI coding agents need an independent governance layer with budget caps, verifier gates, policy checks, failure classification, and signed receipts. Documentation is thorough, with reproducible demos and benchmark lanes, and it supports many hosts and adapters. Best suited to teams scaling governed agent execution; individual developers with small projects may find the ceremony heavy. Pay attention to cost-provenance labels and receipt integrity requirements.

Reliability
12/20
Security and permissions
18/20
Maintenance
16/20
Documentation
18/20
Setup experience
15/20
Read the FMRS scoring method →

MartinLoop MCP Server is the Model Context Protocol entry point for MartinLoop, an independent control layer for autonomous AI coding agents. It gives every run an explicit contract: objective, verifier plan, budget, allowed/denied paths, and stop conditions. It enforces hard budget caps (USD/tokens/iterations), verifier gates (e.g. npm test), policy checks against unsafe commands and risky paths, a 13-class runtime failure taxonomy, HMAC-signed run records, and rollback evidence. Runs become inspectable proof receipts that can be shared. The MCP integration gives hosts one write-capable execution entrypoint plus planning, inspection, and review helpers, over stdio. The standalone MCP package is version 0.6.0, licensed Apache-2.0.

Setup

Run npx -y @martinloop/mcp to start the MCP server, or add it via host commands such as claude mcp add --transport stdio --scope user martin-loop -- npx -y @martinloop/mcp or codex mcp add martin-loop -- npx -y @martinloop/mcp. You can also generate config from the root CLI with npx martin-loop mcp print-config --host <codex|claude|gemini|cursor|vscode|copilot|continue|generic> or use npx martin-loop mcp install --host <host> (supports dry-run, verify-install, rollback, and uninstall). Requires Node.js 20+.

claude_desktop_config.json
{
  "command": "npx",
  "args": [
    "-y",
    "@martinloop/mcp"
  ]
}

Fit and risk

Best for

  • Engineering teams scaling AI coding agents while controlling spend
  • Platform teams that need auditable, rollback-aware agent execution records
  • Organizations using multiple agents (Claude, Codex, Gemini) under one governed flow

Not for

  • Developers who just want a simple code-completion helper without run governance
  • Teams unwilling to accept local JSONL run records with HMAC signing
  • Environments without a supported adapter (Claude/Codex/Gemini CLIs, direct provider, or verifier-only)

Required permissions

  • Read/write access to the configured repo root (writable scope restrictable via --allow-path/--deny-path)
  • Ability to invoke the chosen agent CLI (Claude/Codex/Gemini, etc.) and its underlying model account
  • Local disk writes for run records, receipts, and share outputs (share/run-receipt., etc.)
  • Execution of user-configured verifier commands (e.g. npm test)

Risks and side effects

  • Verifier commands are executed; poorly chosen verifier commands carry security risk despite preflight policy checks
  • Cost and token figures may be estimates (labeled with provenance) and should not be treated as settled accounting
  • Receipt integrity must be verified before use as trustworthy evidence; missing rollback evidence is flagged as EVIDENCE_BOUNDARY
  • Policy defaults come from martin.config.yaml and can be overridden by CLI flags; misconfiguration can loosen safety boundaries

Troubleshooting

  1. Run `martin-loop doctor` first to check the environment
  2. Use `martin-loop preflight <objective> --verify "npm test"` to validate the task and environment before executing
  3. Check integrity verdicts (verified/tamper_detected/unsigned) with `martin-loop runs verify --latest` or `dossier --latest`
  4. For MCP install issues use `mcp verify-install`, `mcp rollback`, `mcp uninstall`, or preview changes with `mcp install --dry-run`
  5. Avoid bare `npx martin-loop` (may resolve a stale local cache); use `martin-loop@latest` or pin a version

Use cases

Set hard budget caps and stop conditions for autonomously running AI coding agents
Require a real verification command (e.g. npm test) before work counts as complete
Produce signed run receipts and shareable audit evidence
Preserve rollback evidence so failed attempts do not silently leave unsafe changes
Integrate budget gating into CI via GitHub Actions

Supported clients

Claude CodeFull support
Codex CLIFull support
Gemini CLIFull support
CursorFull support
VS CodeFull support
GitHub CopilotFull support
ContinueFull support