Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Hi Cursor support team,
I’m running into a persistent issue when using my custom MCP server with third-party AI models in Cursor.
-
The issue happens whenever I pick a specific model (like Gemini, ChatGPT, or Claude). In that case, Cursor shows this error:
The model returned an error. Try disabling MCP servers, or switch models.
-
But when the model is set to “Auto”, my MCP server works fine.
Steps to Reproduce
-
Enable the MCP server “facturation-pro” in Cursor.
-
Select a specific third-party AI model (e.g. Gemini, ChatGPT, Claude) in the chat.
-
Submit any prompt in the chat.
Expected Behavior
Expected behavior would be:
-
The message “The model returned an error. Try disabling MCP servers, or switch models.” should not appear.
-
When I call the MCP (asking for an invoice or a quote), it should work — but that’s secondary, since as soon as the MCP is enabled and its tools are detected, no message can be sent to ChatGPT, Claude, or Gemini anyway.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.5.11 (Universal)
VSCode Version: 1.99.3
Commit: 2f2737de9aa376933d975ae30290447c910fdf40
Date: 2025-09-05T03:48:32.332Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 25.0.0
For AI issues: which model did you use?
Any model fail, except auto
For AI issues: add Request ID with privacy disabled
Request ID: 831dfb76-5beb-451b-a100-450cdd217caa
Additional Information
My MCP server is a Node.js implementation using stdio transport. I went deep into debugging to make sure it fully respects JSON-RPC 2.0 and doesn’t pollute stdout with non-JSON content.
-
JSON-RPC 2.0 compliance: All responses are valid JSON-RPC 2.0, including proper error structures with the original request id. Notifications (notifications/) don’t receive responses, as required.
-
Logging: All debug/error logs (from my server and dependencies) go to stderr. stdout is strictly reserved for JSON-RPC messages. Non-JSON outputs (including emojis) have been removed.
-
Environment (.env): Verified that environment vars (MCP_DEBUG) load correctly via dotenv and are respected by conditional loggers.
-
Server behavior: The server initializes fine, lists tools (tools/list works with no visible errors), and looks ready to go — but the error pops up specifically when I try using third-party models.
Here’s my MCP repo in case you want to check the implementation:
I’d really appreciate it if you could look into this. Happy to provide more details or run extra tests if needed.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor