Loop Engineering MCP Server
Stop typing prompts. Start designing systems that prompt.
Automate repetitive coding tasks with AI agents. Set up once, run forever.
Power your agent
Install from the publisher. Not a PlugMCP endpoint.
Host a copy with our keys and logs.
No packaged release in the registry yet. Follow the repository README.
Remote URL or a command on your machine? How the two installs differ
Run on PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
LaunchFrom the publisher
Stop typing prompts. Start designing systems that prompt.
Automate repetitive coding tasks with AI agents. Set up once, run forever.
MCP server for self-verifying AI agent loops: schedules, independent checker gates, stop rules, worktree isolation & durable state. Built for Cursor/Kiro/Claude via MCP. Inspired by the loop-engineering work of @addyosmani, @anthropics, and Codez (@0xCodez).
An MCP server that brings loop engineering to your AI coding workflow. Instead of manually prompting your AI agent for every task, you design loops that prompt the agent for you. Each loop implements the canonical loop-engineering control system:
Think of it as: GitHub Actions + AI Agents + an Intelligent, Self-Verifying Control Loop
You: "Check CI failures" [5 minutes]
AI: [reports failures]
You: "What caused the auth test failure?" [3 minutes]
AI: [investigates]
You: "Fix it" [10 minutes]
AI: [writes fix]
You: "Open a PR" [2 minutes]
AI: [creates PR]
Total: 20 minutes × 4 times/day = 80 minutes/day
[You set up once: "Create a CI triage loop, run every 6 hours"]
Loop automatically:
✅ Detects failures
✅ Classifies (flake vs bug vs env issue)
✅ Drafts fixes for deterministic bugs
✅ Runs tests
✅ Opens PRs
✅ Escalates complex issues
✅ Records lessons learned
Total: 0 minutes/day (runs while you sleep)
Real Impact:
Pick one of the following. Both work with the MCP config templates in Setup below.
Install uv, then run the server from PyPI — no separate pip install needed:
uvx loop-mcp
Use the uv MCP template (command: uvx) in Step 1.
pip install loop-mcp
Verify it is on your PATH:
loop-mcp
Use the pip MCP template (command: loop-mcp) in Step 1.
Clone and install:
# Clone repository
git clone https://github.com/yourusername/loop-engineering
cd loop-engineering
# Install Python package
cd python
pip install -e ".[dev]"
Create or edit .cursor/mcp.json in your project.
uv (Option 1 — uvx fetches loop-mcp from PyPI automatically):
{
"mcpServers": {
"loop-engineering": {
"command": "uvx",
"args": ["loop-mcp"]
}
}
}
pip (Option 2 — after pip install loop-mcp):
{
"mcpServers": {
"loop-engineering": {
"command": "loop-mcp"
}
}
}
Create or edit .kiro/settings/mcp.json — same templates as Cursor above (uv or pip).
Mac: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: Edit %APPDATA%\Claude\claude_desktop_config.json
Use the same uv or pip template as Cursor above.
Local development? Use:
{
"command": "python",
"args": ["-m", "loop_engineering_mcp"]
}
Open your AI agent and say:
Create a CI triage loop that runs every 6 hours
The AI will set up everything automatically.
You: "Create a CI triage loop"
AI: ✅ Loop 'ci-triage' created!
Schedule: Every 6 hours
Verification: npm test
Goal: All CI failures classified
Files created:
- .loop/loops.json (configuration)
- .loop/skills/ci-triage.md (instructions)
- .loop/state/ci-triage.json (state tracking)
You: "Start it"
AI: ✅ Loop started and will run automatically
You: "What loops are running?"
AI: 📊 Active loops:
ci-triage
- Last run: 2 hours ago
- PRs today: 3 (2 merged)
- Acceptance rate: 67%
- Token cost today: $4.20
You: "Show me ci-triage state"
AI: 📊 State for ci-triage:
Last 5 runs:
- 2h ago: Classified 3 failures, opened 2 PRs
- 8h ago: All tests passing, no action needed
- 14h ago: Fixed flaky auth test, escalated DB issue
Lessons learned:
- Auth tests need AUTH_SECRET env var
- E2E tests require Stripe webhook config
Once installed, your AI agent gets these tools:
Your AI agent uses these automatically when you ask for loop-related tasks.
run_loop_now ──► brief (goal, working dir, stop rule)
│
▼
agent makes the smallest change
│
▼
complete_loop_run ──► maker self-check ──► independent checker gate
│ │
│ ┌───────────┴───────────┐
│ goal met? not yet
│ │ │
▼ ▼ ▼
open PR & stop open PR & stop attempts left? ── yes ─► iterate (same run_id)
│
no / repeated failure
▼
escalate to human
# Navigate to python package
cd python
# Install in development mode
pip install -e ".[dev]"
# Run MCP server
loop
# Run background worker (optional - for scheduled execution)
loop-worker
# Run tests
pytest
# Run tests with coverage
pytest --cov
"Do you have loop-engineering tools?"
"Create a test loop"
"List all loops"
loop-engineering/
├── python/ # Python MCP server
│ ├── src/
│ │ └── loop_engineering_mcp/
│ │ ├── server.py # MCP server
│ │ ├── loop_manager.py # Loop CRUD
│ │ ├── skill_manager.py # Skill templates
│ │ ├── state_manager.py # State tracking
│ │ ├── loop_executor.py # Control loop: isolation, checker gate, stop rules
│ │ ├── scheduler.py # Cron scheduler (the heartbeat)
│ │ ├── suitability.py # 4-condition loop suitability test
│ │ ├── verification_runner.py # Maker/checker gate runner
│ │ ├── github_client.py # GitHub integration
│ │ └── worker.py # Background worker
│ └── tests/
│
├── shared/ # Shared skill templates
│ └── skills/
│ ├── ci-triage.md
│ ├── dependency-updates.md
│ └── lint-fixes.md
│
└── references/ # Documentation
├── README.md # Full loop engineering guide
├── FRAMEWORK.md # Complete implementation guide
└── QUICKSTART.md # 5-minute setup
Loop engineering (Addy Osmani / Codez / O'Reilly, 2026) defines a loop as a small control system with six parts. This server maps to all six:
Plus the safety rules that separate a real loop from a cron job: an iterate-until-goal cycle, stop rules (max attempts + no-progress detection), budget caps, and a 4-condition suitability test before you build at all.
Automatically classifies CI failures and drafts fixes:
Keeps packages up-to-date safely:
Maintains code quality automatically:
"0 */6 * * *" # Every 6 hours
"0 9 * * 1" # Mondays at 9am
"0 0 * * *" # Daily at midnight
"*/30 * * * *" # Every 30 minutes
A loop has two gates. The maker self-check (verification_command) is the fast
check the agent runs after its changes. The independent checker
(goal_check_command) is a separate, objective command that decides whether the
goal is actually met — so the agent that wrote the code is not the one grading it.
A PR is opened only when both pass.
{
"verification_command": "npm test",
"goal_check_command": "npm run test:integration && npm run lint"
}
{
"max_attempts": 3, // escalate to a human after 3 failed attempts
"max_runs_per_day": 24, // daily run cap (heartbeat budget)
"cost_budget": 5.00, // cumulative USD token-cost ceiling (0 = unlimited)
"isolation": "worktree" // "worktree" (isolated, parallel-safe) or "branch"
}
The loop also performs no-progress detection: if the same failure occurs twice in a row it escalates immediately rather than burning tokens on a dead end.
# Optional: GitHub integration
export GITHUB_TOKEN="ghp_..."
# Optional: Custom workspace
export LOOP_WORKSPACE="/path/to/project"
# Check if installed
loop-mcp --version
# Unix/Mac
chmod -R u+w .loop/
# Windows
icacls .loop /grant Users:F /T
Q: Do I need an API key?
A: No! Your AI agent (Cursor/Kiro/Claude) already has its own API key. This MCP server just provides tools.
Q: Does it work offline?
A: The MCP server works offline, but loop execution needs internet (to call AI APIs, create PRs, etc.)
Q: What about security?
A: Loops never auto-merge to main. Human review required. Verification gates prevent bad code.
Q: Can I use my own AI model?
A: Yes! Works with any AI agent that supports MCP (Cursor, Kiro, Claude Desktop, etc.)
Q: How much does it cost?
A: The MCP server is free. You only pay for AI API usage (same as manual prompting, but more efficient).
Build the loop. Stay the engineer. 🚀
⭐ If this saves you time, give us a star on GitHub!
Made with ❤️ by the Loop Engineering community
MCP server for self-verifying AI agent loops: schedules, independent checker gates, stop rules, worktree isolation & durable state. Built for Cursor/Kiro/Claude via MCP. Inspired by the loop-engineeri
Overview
MCP server for self-verifying AI agent loops: schedules, independent checker gates, stop rules, worktree isolation & durable state. Built for Cursor/Kiro/Claude via MCP. Inspired by the loop-engineering work of @addyosmani, @anthropics, and Codez (@0xCodez).
Tools
No tool list yet. Remote servers get one after the first health check.
FAQ
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
No required environment variable is listed on this record.
Loop Engineering runs locally over stdio.
Last checked 2026-10-28. MCP server for self-verifying AI agent loops: schedules, independent checker gates, stop rules, worktree isolation & durable state. Built for Cursor/Kiro/Claude via MCP. Inspired by the loop-engineering work of @addyosmani, @anthropics, and Codez (@0xCodez).