AI API Cost Firewall & Rate Limiter (Token Guard)
Pricing
$1.00 / 1,000 api request routeds
AI API Cost Firewall & Rate Limiter (Token Guard)
Protect OpenAI, Anthropic, and Groq API budgets from runaway loops and token spend spikes. Sliding-window rate limiter and automatic circuit breaker.
Pricing
$1.00 / 1,000 api request routeds
Rating
0.0
(0)
Developer
Neon Innovation Lab
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 hours ago
Last modified
Categories
Share
MCP Rate Limiter & Circuit Breaker | AI Agent Token & Cost Firewall
Autonomous AI agents can be relentless. When an LLM model gets trapped in an infinite retry loop, hallucinates tool parameters, or triggers recursive subagents, it can hammer expensive third-party APIs (Stripe, Twilio, OpenAI, Snowflake) with thousands of calls per minuteโracking up catastrophic bills and crashing mission-critical databases.
MCP Rate Limiter & Circuit Breaker operates as an inline protective firewall between your agent runtime (Claude Desktop, Cursor, LangGraph, CrewAI) and your Model Context Protocol (MCP) servers. It enforces sliding-window request throttling, token cost budgets, and automatic circuit breaking with zero code changes required on your downstream tools.
๐ก๏ธ Core Protection Features
- Sliding-Window Rate Limiting: Enforces strict burst and sustained request thresholds per minute or hour.
- Automated Circuit Breaker Pattern:
- CLOSED (Normal Operation): Requests pass through with sub-millisecond overhead.
- OPEN (Tripped): If error rates exceed threshold (e.g. 5 consecutive 5xx errors or rate limit breached), the gateway trips open, immediately returning a structured backoff message to the LLM without touching your backend.
- HALF-OPEN (Recovery): Automatically probes the downstream service after a configurable cooldown period before restoring full traffic.
- Runaway Loop Detection: Detects duplicate tool arguments called in rapid succession and halts execution before credit card depletion occurs.
- Context-Window Overflow Protection: Prevents 100KB+ database responses from filling the LLM context and triggering massive inference billing spikes.
๐ Global Enterprise & Regional Compliance (GEO Targeting)
๐บ๐ธ North America (Silicon Valley, New York, Seattle, Austin)
- FinOps & Cloud Cost Governance: Protects AI engineering budgets from unmonitored agent experiments and runaway loop billing spikes.
- SLA & API Quota Protection: Prevents internal developer agents from consuming shared external API quotas (e.g., Salesforce, Google Workspace, GitHub Enterprise).
๐ช๐บ Europe & ๐ฌ๐ง United Kingdom (London, Berlin, Paris, Amsterdam)
- System Stability & Reliability (EU AI Act Article 15): Meets mandatory technical resilience standards requiring automated failsafes against cascading software failures.
- Fair Resource Allocation: Ensures shared European multi-tenant microservices remain responsive under high concurrent agent usage.
๐ Asia-Pacific & ๐ฎ๐ณ India (Singapore, Tokyo, Sydney, Bengaluru, Hyderabad)
- High-Concurrency Agent Clusters: Regulates throughput for large offshore QA and developer teams running parallel agentic IDEs.
- Bandwidth & Compute Optimization: Smooths traffic spikes hitting latency-sensitive regional infrastructure.
๐ Quick Setup & Integration
1. Claude Desktop (claude_desktop_config.json)
Connect Claude to your rate-limited proxy endpoint:
{"mcpServers": {"neon-rate-limited-mcp": {"command": "npx","args": ["-y","@modelcontextprotocol/server-sse","https://<YOUR_APIFY_CONTAINER_URL>/sse"]}}}
2. Cursor IDE Integration
In Cursor Settings -> Features -> MCP Servers:
- Click + Add New MCP Server.
- Name:
Rate-Limited MCP Proxy. - Type:
sse. - URL:
https://<YOUR_APIFY_CONTAINER_URL>/sse.
โ๏ธ Input Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
targetMcpUrl | String | Required | The target downstream MCP server SSE URL to protect. |
rateLimitRequests | Integer | 60 | Maximum allowed tool call requests within the sliding window. |
rateLimitWindowSeconds | Integer | 60 | Duration of the rate limit window in seconds (default: 1 minute). |
๐ Live Enterprise Console & Zero-Trust Gateways
For automated PII Data Loss Prevention (DLP), threat firewalls, and W3C OpenTelemetry tracing, visit: https://neoninnovationlab.com/tools/mcp-gateway-hub