
Agent Loop Detector
Built to catch when AI agents get stuck in repetitive loops during task execution. This runs as a Cloudflare Worker and exposes both REST and MCP interfaces over streamable HTTP, so you can integrate loop detection into your agent workflows without spinning up your own infrastructure. Reach for this when you're building autonomous agents that might spiral into the same actions repeatedly and you want an external service to flag the pattern. The MCP interface means Claude can directly call it during conversations to check if it's repeating itself across tool calls or reasoning steps.
- tools
- 3
- transport
- HTTP
- last updated
- May 16, 2026
Install
From registry metadata$ npx add-mcp https://api.lazy-mac.com/agent-loop-detector/mcp --name agent-loop-detectorRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http agent-loop-detector https://api.lazy-mac.com/agent-loop-detector/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 3 toolsVerified live against the running server on Nov 6, 2026.
analyze_traceFull diagnostic: loop detection, cost breakdown, stuck-state classification, and fix recommendations for an AI agent trace.2 params
Full diagnostic: loop detection, cost breakdown, stuck-state classification, and fix recommendations for an AI agent trace.
pricingobjecttrace*arraydetect_loopsDetect exact-call repeats, periodic tool-call cycles, and ping-pong patterns in an agent trace.1 params
Detect exact-call repeats, periodic tool-call cycles, and ping-pong patterns in an agent trace.
trace*arraybreakdown_costCalculate per-model token usage and USD cost from an agent trace. Supports custom pricing overrides.2 params
Calculate per-model token usage and USD cost from an agent trace. Supports custom pricing overrides.
pricingobjecttrace*arraySponsors
Readme
agent-loop-detector-api
Cloudflare Workers MCP server: agent-loop-detector. REST + MCP (JSON-RPC 2.0). Live: api.lazy-mac.com/agent-loop-detector
Details
- Repository
- github.com/lazymac2x/agent-loop-detector-api
- Categories
- AI & LLM Tools, Cloud & Infrastructure
- Transport
- HTTP
- Registry
- MCP registry, active
- Tools verified
- Nov 6, 2026
More from lazymac2x
- Agent Memory
- Agent Trace Auditor
- Agent Workflow Engine
- Ai Agent Scratchpad
- Ai Budget Planner
- Ai Changelog Writer
- Ai Cost Optimizer
- Ai Eval
- Ai Guardrails
- Ai Model Router
- Ai Prompt Optimizer
- Ai Provider Status
- Ai Rate Limit Tracker
- Ai Token Counter
- Api Changelog Tracker
- Api Composition Gateway
- Api Contract Validator
- Api Diff Monitor
- Api Flow Analyzer
- Api Payload Auditor
- Api Perf Analyzer
- Api Request Deduplicator
- Api Response Cost Analyzer
- Api Schema Drift Detector