Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
MCP specification in transports section 2.5 regarding session management it is clearly stated that if server returns 404 Session not found client MUST reinitialise the session, however cursor client does not do that. So, if for example stateless server gets redeployed client usually silently stop using MCP or if forced jsut complains about an error without trying to reinitialise it.
Restarting agent helps
Steps to Reproduce
Deploy and MCP server that does not persist sessions outside in process memory
Use it in the chat
Stop and redeploy server with fresh session list
Ask in the same chat cursor to use MCP
Expected Behavior
When server gets redeployed I expect client retrying and reinitialising session again.
Operating System
MacOS
Version Information
2026.05.16-0338208
For AI issues: which model did you use?
Composer 2 Fast
Additional Information
We use official python sdk for MCP server development. It also could be related to ambiguity in the return codes Clarify JSON-RPC error code for 'session not found' responses · Issue #1821 · modelcontextprotocol/python-sdk · GitHub
Does this stop you from using Cursor
No - Cursor works, but with this issue