) to a body-less 202 Accepted and that fixes the tool call (and only parse the response if its not nil.. for some reason it seems to be nil for "notification_cancelled" method call)
127.0.0.1 - - [21/Aug/2025:05:27:41 +0000] "POST / HTTP/1.1" 200 - 0.0007
[MCP] Request: notifications/initialized (id: )
[MCP] Request body: {
"method": "notifications/initialized",
"jsonrpc": "2.0"
}
127.0.0.1 - - [21/Aug/2025:05:27:41 +0000] "POST / HTTP/1.1" 202 - 0.0002
127.0.0.1 - - [21/Aug/2025:05:27:41 +0000] "GET / HTTP/1.1" 200 - 0.0002
[MCP] Request: tools/list (id: 1)
[MCP] Request body: {
"method": "tools/list",
"params": {},
"jsonrpc": "2.0",
"id": 1
}
[MCP] Response: empty (id: )
[MCP] Response body: {
"accepted": true
}
127.0.0.1 - - [21/Aug/2025:05:27:41 +0000] "POST / HTTP/1.1" 200 - 0.0003
Failed to load plugin tools: [ { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_literal", "expected": "2.0", "path": [ "jsonrpc" ], "message": "Invalid literal value, expected \"2.0\"" }, { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "method" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "accepted" ], "path": [], "message": "Unrecognized key(s) in object: 'accepted'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_literal", "expected": "2.0", "path": [ "jsonrpc" ], "message": "Invalid literal value, expected \"2.0\"" }, { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "method" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "accepted" ], "path": [], "message": "Unrecognized key(s) in object: 'accepted'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_literal", "expected": "2.0", "path": [ "jsonrpc" ], "message": "Invalid literal value, expected \"2.0\"" }, { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" }, { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "result" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "accepted" ], "path": [], "message": "Unrecognized key(s) in object: 'accepted'" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_literal", "expected": "2.0", "path": [ "jsonrpc" ], "message": "Invalid literal value, expected \"2.0\"" }, { "code": "invalid_union", "unionErrors": [ { "issues": [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" }, { "issues": [ { "code": "invalid_type", "expected": "number", "received": "undefined", "path": [ "id" ], "message": "Required" } ], "name": "ZodError" } ], "path": [ "id" ], "message": "Invalid input" }, { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [ "error" ], "message": "Required" }, { "code": "unrecognized_keys", "keys": [ "accepted" ], "path": [], "message": "Unrecognized key(s) in object: 'accepted'" } ], "name": "ZodError" } ], "path": [], "message": "Invalid input" } ]
When testing in LM Studio an MCP server built with the
StreamableHTTPTransportI get an error about the body of the response to tool calls"code": "unrecognized_keys", "keys": [ "accepted" ]"I tried modifying the response from
send_response_to_stream(ruby-sdk/lib/mcp/server/transports/streamable_http_transport.rb
Line 217 in f63f360
ie
Looking at the spec I see https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#sending-messages-to-the-server
If the server accepts the input, the server MUST return HTTP status code 202 Accepted with no body.... but Im not sure if thats the relavent section related tosend_response_to_streamLogs
MCP Responded with
then LM Studio reports this parse error: