# AgentCostGuard MCP Server & Circuit-Breaker Proxy

> AgentCostGuard MCP Server & Circuit-Breaker Proxy is an open-source MCP server for agent tooling. Zero-dependency MCP proxy and server that caps runaway agent tool loops and API spend. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Website:** https://htmlpreview.github.io/?https://github.com/rwachtendorff/agent-cost-guard/blob/main/docs/index.html
- **Repository:** https://github.com/rwachtendorff/agent-cost-guard
- **MCP Registry name:** io.github.rwachtendorff/agent-cost-guard
- **Categories:** [agent tooling](https://ai-powered.com/categories/agent-tooling)
- **Listing updated:** 2026-11-30

## About

AgentCostGuard sits between an AI agent and its tools to catch runaway behaviour before it becomes a large API bill. It detects identical repeated tool calls and A-B-A-B style oscillations, then halts the session once configured USD or token limits are reached.

It can run as a stdio proxy that wraps an existing MCP server without changing that server's code, or as a native MCP server exposing cost estimation, prompt-injection scanning, MCP config auditing and JSONL trace summarising. Config discovery covers Claude, Cursor, Windsurf and VS Code setups.

The package is written in Python on the standard library only, and keeps all processing local. It suits developers running autonomous agents or MCP tool chains who want hard budget and loop limits in place.

## Features

- **Tool loop detection:** Hashes canonical tool arguments to stop an agent repeating the same failing call.
- **Oscillation blocking:** Spots ping-pong patterns between two tools within a sliding window.
- **Hard spend caps:** Enforces USD and token budgets per session across several model providers.
- **MCP stdio proxy:** Wraps any stdio MCP server so the guard applies without editing the server.
- **Prompt-injection scanning:** Checks untrusted text for common injection and secret-exfiltration patterns.
- **Config audit and wrapping:** Discovers existing MCP configs and can wrap them with the guard.
- **JSONL traces and HTML reports:** Logs each turn and renders a standalone audit report.

## Good for

- Stop an agent from retrying a failing tool call dozens of times
- Put a spending ceiling on an autonomous research run
- Protect existing Claude Desktop or Cursor MCP servers with a loop breaker
- Scan scraped web content for prompt-injection before an agent acts on it
- Audit local MCP configuration files for risky setups

## Install

### Claude Desktop (Claude Desktop → Settings → Extensions)

```text
https://github.com/rwachtendorff/agent-cost-guard/releases/download/v0.2.0/agent-cost-guard-mcp-0.2.0.mcpb
```

Download the bundle and open it with Claude Desktop, or drag it onto Settings → Extensions and click Install. This server is only published as a Claude Desktop bundle.

## Tools

From the tool list in its README, going by the names, 1 of 4 tools reads data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `estimate_llm_cost`: Estimates LLM cost for a request.
- `scan_prompt_injection`: Scans text for prompt-injection patterns.
- `audit_mcp_config`: Audits MCP configuration files.
- `summarize_jsonl_trace` (name suggests: reads): Summarises a JSONL trace log.

## FAQ

### How do I install AgentCostGuard MCP Server & Circuit-Breaker Proxy?

It can be installed with pip from the project's GitHub repository, and a .mcpb extension package is provided for Claude Desktop.

### Does AgentCostGuard MCP Server & Circuit-Breaker Proxy send data externally?

The project states it has zero telemetry and runs entirely locally.

### What does the core library cost?

The core library is MIT-licensed and free; a separate paid Pro pack of policy presets and middleware is offered.

### Which MCP tools does the native server expose?

It exposes estimate_llm_cost, scan_prompt_injection, audit_mcp_config and summarize_jsonl_trace.

### What are the best alternatives to AgentCostGuard MCP Server & Circuit-Breaker Proxy?

The closest alternatives to AgentCostGuard MCP Server & Circuit-Breaker Proxy are agentguard — policy proxy for agent tool calls, Agentguard47, Agent Guard, Figuard MCP and Agentic Platform.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [agentguard — policy proxy for agent tool calls](https://ai-powered.com/mcp/agentguard-policy-proxy-for-agent-tool-calls): agentguard — policy proxy for agent tool calls is a freemium MCP server for agent tooling.
- [Agentguard47](https://ai-powered.com/mcp/agentguard47): Agentguard47 is an open-source MCP server for developer tools.
- [Agent Guard](https://ai-powered.com/mcp/agent-guard-2): Agent Guard is an open-source MCP server for agent tooling.
- [Figuard MCP](https://ai-powered.com/mcp/figuard-mcp): Figuard MCP is an open-source MCP server for agent tooling.
- [Agentic Platform](https://ai-powered.com/mcp/agentic-platform): Agentic Platform is a freemium MCP server for agent tooling.
- [AgentRouter](https://ai-powered.com/mcp/agentrouter): AgentRouter is a paid MCP server for agent tooling.
- [Agent Guardian — MCP Contract Auditor](https://ai-powered.com/mcp/agent-guardian-mcp-contract-auditor): Agent Guardian — MCP Contract Auditor is an MCP server for legal and government.
- [Acp MCP Server](https://ai-powered.com/mcp/acp-mcp-server): Acp MCP Server is a freemium MCP server for agent tooling.

---
Source: https://ai-powered.com/mcp/agentcostguard-mcp-server-and-circuit-breaker-proxy
