[BUG] Claude Code is submitting MCP requests as strings when using an SSE server
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When connecting claude code the my MCP server via SSE, it submits the requests for endpoint that has a nested structure as stringified JSON.
2025-11-10T15:41:34.505916Z WARN rmcp::service: response error, id: 10, error: ErrorData { code: ErrorCode(-32602), message: "failed to deserialize parameters: invalid type: string \"{\\\"schedulePatternType\\\": {\\\"weekly\\\": {\\\"mon\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"tues\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"weds\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"thurs\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"fri\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}}}}\", expected struct SchedulePattern", data: None }
I notice this for other types as well... where sometimes a field is optional and it will pass in the string "null" (instead of the null value).
This issue does NOT happen on Claude Desktop for the same MCP server.
The issue does happen for stdio server as well, and for a workaround, we have a bridge that is intercepting the requests and converting them into proper JSON objects.
What Should Happen?
JSON RPC requests should be submitted as proper JSON objects
Error Messages/Logs
2025-11-10T15:41:34.505916Z WARN rmcp::service: response error, id: 10, error: ErrorData { code: ErrorCode(-32602), message: "failed to deserialize parameters: invalid type: string \"{\\\"schedulePatternType\\\": {\\\"weekly\\\": {\\\"mon\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"tues\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"weds\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"thurs\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}, \\\"fri\\\": {\\\"shift\\\": {\\\"shiftType\\\": {\\\"regular\\\": {\\\"isRegular\\\": true}}, \\\"shiftTemplate\\\": {\\\"startTime\\\": {\\\"time\\\": \\\"09:00:00\\\"}, \\\"duration\\\": {\\\"seconds\\\": 28800}, \\\"breakTemplates\\\": []}}, \\\"venueId\\\": \\\"019a6e6c-db70-7308-bb4d-eaaad7e049c4\\\", \\\"roleId\\\": \\\"019a6e6c-dbd3-7c61-b32e-df0bc823d243\\\"}}}}\", expected struct SchedulePattern", data: None }
Steps to Reproduce
Have an MCP endpoint that has a nested endpoint and ask claude code to use the specified tool
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.0.36
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗