SSE Connection to Local starter-webmvc-server Fails with Cursor: Body Timeout Error

Describe the Bug

I’m building my MCP server using Spring AI WebMvc (starter-webmvc-server). When I run it locally and attempt to connect via SSE using Cursor, everything starts fine, but after a short while, the connection fails with the following error:

2025-06-26 15:49:08.648 [error] user-my-weather-server: Client error for command SSE error: TypeError: terminated: Body Timeout Error

Steps to Reproduce

  1. Clone the official Spring AI MCP server example using WebMvc:
    git clone GitHub - spring-projects/spring-ai-examples
    cd spring-ai-examples/model-context-protocol/weather/starter-webmvc-server

  2. Start the MCP server locally:

  3. In Cursor, go to Settings → Tools & Integrations → Add, and use the following JSON configuration:

"my-weather-server": {
    "type": "sse",
    "url": "http://127.0.0.1:{{port}}/sse"
}

  1. The cursor successfully connects and retrieves the available tools.

  2. After a short period, the connection fails with the following error:
    Cursor: SSE error: TypeError: terminated: Body Timeout Error

Expected Behavior

The tool connection should remain stable and active. Tools should be continuously available without the connection timing out.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.6
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:16:57.571Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.4.0