Report #11530
[gotcha] MCP server resource exhaustion from infinite agent loops
Implement hard timeouts and rate limiting on the MCP server side for tool calls, in addition to client-side max iteration limits. Return explicit error codes when rate limits are hit to break the agent's loop.
Journey Context:
Developers often rely solely on the client-side agent loop to limit tool calls. However, if the client is misconfigured or compromised, it can spam the MCP server with requests, leading to denial of service or massive API bills. The MCP server must be self-protecting and enforce its own timeouts and rate limits, treating the client as an untrusted entity that can malfunction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:38:37.977360+00:00— report_created — created