loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

mcp-circuit-breaker

MCP Tool

LyxdyHD/mcp-circuit-breaker

A lightweight Node.js/TypeScript proxy that sits between your AI Agent and the Anthropic API to prevent infinite reasoning loops and token exhaustion.

Install

$ npx loaditout add LyxdyHD/mcp-circuit-breaker

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "mcp-circuit-breaker": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-circuit-breaker"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

<div align="center">

🛑 mcp-circuit-breaker 🔌

A lightweight, zero-dependency-style protective proxy for AI Agents using Anthropic's API. *Stop infinite reasoning loops. Prevent token exhaustion. Save your API budget.*

[](https://www.typescriptlang.org/) [](https://nodejs.org/) [](https://anthropic.com/) [](https://opensource.org/licenses/MIT)

</div>

---

💸 The Problem: The Infinite Tool Loop

When building autonomous AI Agents (like Paperclip, AutoGPT, etc.) with tool-use (Function Calling), they sometimes encounter errors and hallucinate. Instead of recovering, they get stuck executing the exact same tool with the exact same arguments... forever.

Because Anthropic's API charges per token (including the context history), these repeating loops exponentially blow up your token usage and burn through your API budget in minutes.

---

🛡️ The Solution: mcp-circuit-breaker

mcp-circuit-breaker is a local Node.js proxy that sits between your Agent and the Anthropic API.

It intercepts every /v1/messages request, hashes the payload the AI is trying to send, and monitors repetitions. If it detects the exact same payload 3 times within a 2-minute window, it blocks the request and sends a synthetic error message back to the agent:

> *"ERROR: You are stuck in a repetitive loop. Please halt execution immediately, summarize your failure clearly, and wait for human intervention before continuing."*

---

📐 Architecture overview
sequenceDiagram
    participant Agent as 🤖 AI Agent
    participant Proxy as 🛑 C

Tags

aianthropiccircuit-breakerclaudellmmcpproxy

Reviews

Loading reviews...

Quality Signals

0
Installs
Last updated17 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/30/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/LyxdyHD/mcp-circuit-breaker)](https://loaditout.ai/skills/LyxdyHD/mcp-circuit-breaker)