Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When cursor detects a change to mcp.json (i.e. when we edit it), it auto-reconnects, but it incorrectly calls its own auto-reconnect code 3 times in parallel, all at the same time, then errors out. Toggling off/on works OK.
Steps to Reproduce
Toggle-off-toggle-on:-
Good, works:
2025-11-07 12:16:06.847 [info] Handling CreateClient action
2025-11-07 12:16:06.847 [info] Creating streamableHttp transport
2025-11-07 12:16:06.847 [info] Connecting to streamableHttp server
2025-11-07 12:16:06.863 [info] No stored tokens found
2025-11-07 12:16:06.916 [info] No stored tokens found
2025-11-07 12:16:06.942 [info] Successfully connected to streamableHttp server
2025-11-07 12:16:06.942 [info] Storing streamableHttp client
2025-11-07 12:16:06.942 [info] CreateClient completed, server stored: true
2025-11-07 12:16:06.948 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:16:06.948 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:16:06.948 [info] No stored tokens found
2025-11-07 12:16:06.975 [info] No stored tokens found
2025-11-07 12:16:07.007 [info] No stored tokens found
2025-11-07 12:16:07.034 [info] Found 17 tools, 0 prompts, and 0 resources
“touch” or edit the mcp.json config file:-
Bad - IDE says “Error - Show Output”, and the below:-
2025-11-07 12:17:42.198 [info] Handling CreateClient action
2025-11-07 12:17:42.198 [info] CreateClient completed, server stored: true
2025-11-07 12:17:42.211 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.212 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.213 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.214 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.214 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.214 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.214 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.214 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.217 [info] No stored tokens found
2025-11-07 12:17:42.231 [info] No stored tokens found
2025-11-07 12:17:42.244 [info] No stored tokens found
2025-11-07 12:17:42.257 [info] No stored tokens found
2025-11-07 12:17:42.270 [info] Handling CreateClient action
2025-11-07 12:17:42.270 [info] CreateClient completed, server stored: true
2025-11-07 12:17:42.286 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.286 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.295 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.295 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.295 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.295 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.295 [info] Handling ListOfferings action, server stored: true
2025-11-07 12:17:42.295 [info] Connected to streamableHttp server, fetching offerings
2025-11-07 12:17:42.302 [info] No stored tokens found
2025-11-07 12:17:42.314 [info] No stored tokens found
2025-11-07 12:17:42.326 [info] No stored tokens found
2025-11-07 12:17:42.339 [info] No stored tokens found
2025-11-07 12:17:42.352 [info] No stored tokens found
2025-11-07 12:17:42.362 [info] No stored tokens found
2025-11-07 12:17:42.373 [error] Client error for command fetch failed
2025-11-07 12:17:42.373 [error] Error listing prompts: fetch failed
2025-11-07 12:17:42.374 [info] No stored tokens found
2025-11-07 12:17:42.381 [info] No stored tokens found
2025-11-07 12:17:42.390 [info] No stored tokens found
2025-11-07 12:17:42.401 [error] Client error for command fetch failed
2025-11-07 12:17:42.401 [error] Error listing prompts: fetch failed
2025-11-07 12:17:42.402 [error] Client error for command fetch failed
2025-11-07 12:17:42.402 [error] Error listing prompts: fetch failed
2025-11-07 12:17:42.402 [error] Client error for command fetch failed
2025-11-07 12:17:42.402 [error] Error listing resources: fetch failed
2025-11-07 12:17:42.402 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.404 [info] No stored tokens found
2025-11-07 12:17:42.418 [info] No stored tokens found
2025-11-07 12:17:42.434 [error] Client error for command fetch failed
2025-11-07 12:17:42.434 [error] Error listing resources: fetch failed
2025-11-07 12:17:42.434 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.435 [error] Client error for command fetch failed
2025-11-07 12:17:42.435 [error] Error listing resources: fetch failed
2025-11-07 12:17:42.435 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.717 [info] No stored tokens found
2025-11-07 12:17:42.730 [info] No stored tokens found
2025-11-07 12:17:42.741 [info] No stored tokens found
2025-11-07 12:17:42.753 [info] No stored tokens found
2025-11-07 12:17:42.764 [info] No stored tokens found
2025-11-07 12:17:42.810 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.815 [info] No stored tokens found
2025-11-07 12:17:42.838 [info] No stored tokens found
2025-11-07 12:17:42.851 [info] No stored tokens found
2025-11-07 12:17:42.863 [info] No stored tokens found
2025-11-07 12:17:42.887 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.907 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.914 [info] Found 17 tools, 0 prompts, and 0 resources
2025-11-07 12:17:42.918 [info] Found 17 tools, 0 prompts, and 0 resources
Expected Behavior
reconnect should work same as on/off
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.0.60 (system setup)
VSCode Version: 1.99.3
Commit: c6d93c13f57509f77eb65783b28e75a857b74c00
Date: 2025-11-05T00:50:54.645Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.17763
Additional Information
This will be an easy fix - you need a mutex or timer to not reconnect, if you already reconnected recently. The cause is that sometimes the file-system event telling you that a file has changed, can “fire” many times at once, even for the 1 change - triggering your reconnect logic over-and-over, at the same time.
Before version 2.x, it did not matter that multiple connections were established.
Since 2.x, it now says “Error - Show Output”
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor