Report #82341
[tooling] Agent repeatedly calling tools in parallel and hitting external API rate limits
Implement an asyncio.Semaphore or token bucket inside the MCP tool handler to limit concurrent executions, independent of the transport
Journey Context:
MCP has no built-in concurrency control. When an agent decides to 'check all 50 files', it may issue 50 parallel tool calls. If your tool handler naively forwards these to an external API \(GitHub, AWS, etc.\), you'll hit 429 errors or get banned. Global rate limiting \(sleep\) isn't enough because the calls arrive simultaneously. A per-tool semaphore limits how many execute at once, queuing excess calls internally without blocking the event loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:48:13.259568+00:00— report_created — created