There is 1 update.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-007bf211-00e8-41fc-9b46-c38479009a28 LLMAI-227 Closed

MCP transport error responses expose Java stack traces to the client

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-334dfc1b-47b5-45d8-9a14-17d3b95978f5 Changes by Paul Pantiru on 04/Nov/26 14:34
 
Description: The MCP SDK's stateless servlet transport serializes its McpError exception object through the JSON mapper when it rejects a request at the transport level (unsupported Content-Type, missing Accept header, malformed JSON-RPC body, handler failure).

With a default Jackson mapper the response body is a serialized exception of about 20 KB, including the full stack trace with SDK and XWiki class names and line numbers, instead of a JSON-RPC error object. 


Present since the SDK was first integrated, not a 2.1.0 regression.

[Upstream PR|http://github.com/modelcontextprotocol/java-sdk/issues/577] for this issue already existed.