Can spring ai mcp add a configuration option that can ignore illegal format jsonrpc, because there is no guarantee that there are no interfering messages when connecting to spring ai mcp server using stdio
Comment From: sunyuhan1998
Indeed, but I think this change should be made in the Java SDK of MCP, rather than in Spring AI itself?
Specifically, I think the issue lies in the deserializeJsonRpcMessage
part of the following code:
https://github.com/modelcontextprotocol/java-sdk/blob/b5a1e3b8f4d95a54c398ba587b360ea0767d0bac/mcp/src/main/java/io/modelcontextprotocol/client/transport/StdioClientTransport.java#L256-L270
I think @tzolov is aware of this issue, but I'm not quite sure about the reason why an option to ignore invalid JSON-RPC messages hasn't been provided.
Comment From: sunyuhan1998
Related issue: #3598