Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Long-running remote Streamable HTTP MCP tool calls fail after approximately 300 seconds.
Cursor MCP logs show:
TypeError: fetch failed
HeadersTimeoutError: Headers Timeout Error
code: UND_ERR_HEADERS_TIMEOUT
Two reproduced calls failed after 302,099 ms and 302,038 ms.
Cursor bundles Undici 7.25.0, whose default response headers timeout is 300,000 ms. The remote MCP server returns JSON only after the tool finishes, so valid calls longer than five minutes are terminated by Cursor.
Cancellation also does not immediately abort the underlying MCP fetch. The Agent turn was cancelled, but the request continued until the same headers timeout.
Steps to Reproduce
- Configure a remote Streamable HTTP MCP server in ~/.cursor/mcp.json.
- Invoke a tool that runs for longer than five minutes and does not return response headers before completion.
- Wait for the result.
- Observe that Cursor fails after approximately 302 seconds with UND_ERR_HEADERS_TIMEOUT.
- Start another call and cancel the Agent turn shortly afterward.
- Observe that the underlying MCP HTTP request continues until the same timeout.
Expected Behavior
- Long-running MCP calls should not fail because of an undocumented 300-second response headers timeout.
- The timeout should be configurable globally or per MCP server/tool.
- Cancelling an Agent turn should also abort the underlying MCP HTTP request immediately.
Operating System
MacOS
Version Information
Cursor 3.12.30
Commit: 63a2996a10d9e476b6c28e951dd7691d9c0cf480
Architecture: arm64
For AI issues: which model did you use?
GPT-5.6 Sol. This issue is model-independent and occurs in Cursor’s local MCP HTTP transport.
Additional Information
The MCP proxy recorded both requests as client_canceled after 302,018 ms and 302,058 ms. Its configured timeout was 1,800 seconds, while the backend timeout was 10,800 seconds. Neither server-side timeout fired.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor