Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When a client connects, a stateful session is established between the client and server. To support features like elicitation, the server needs to look up client metadata using session state for each incoming message. However, there is currently no mechanism to inform the server when a client disconnects. This results in stale sessions accumulating on the server side, causing unnecessary memory and resource bloat.
In addition to this, Every time Cursor is opened, it creates a new MCP session. Additionally, toggling a server’s disable/enable state in the UI also creates a new session each time. However, none of the previously created sessions are ever terminated — they accumulate on the server side indefinitely, leading to unbounded session growth and stale state.
Steps to Reproduce
- Connect to MCP Server - Streamable HTTP
- Check if “DELETE” request is triggered in MCP Server while exiting Cursor
Expected Behavior
Cursor should support both a UI-level option to disable/disconnect individual MCP servers and a mechanism to gracefully terminate active MCP sessions when the client exits.
Additionally, the MCP SDK and protocol already expose session termination APIs — Cursor can leverage these directly to implement proper cleanup behaviour.
Similar issue is VSCode ref: VS Code does not terminate active MCP sessions on exit · Issue #318939 · microsoft/vscode · GitHub
Operating System
MacOS
Version Information
Version: 3.5.38 (Universal)
VSCode Version: 1.105.1
Commit: 009bb5a3600dd98fe1c1f25798f767f686e14750
Date: 2026-05-26T21:32:06.537Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0
Additional Information
There is currently no way for a user to manually disconnect from an MCP server through the Cursor IDE. Neither the mcp.json configuration file nor the MCP Server UI panel exposes a disconnect or stop option, leaving users with no control over individual session lifecycle management.
Does this stop you from using Cursor
No - Cursor works, but with this issue