Report #74045
[gotcha] How can a malicious MCP tool crash or freeze the host agent by consuming excessive memory or compute?
Enforce strict timeouts and size limits on MCP tool responses. Run untrusted MCP servers in isolated containers or subprocesses with resource limits.
Journey Context:
An MCP tool might return a massive string \(e.g., a giant file read\) or enter an infinite loop. Because the agent awaits the tool response synchronously, this blocks the agent's event loop or exhausts memory, causing a Denial of Service. Developers assume tools are well-behaved. You must treat MCP servers as untrusted third-party services, enforcing strict timeouts and truncating oversized responses to protect the host agent's stability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:52:56.705815+00:00— report_created — created