Currently, the Java MCP SDK requires servers to output valid JSON-RPC messages for initialization and connection. However, some legacy MCP servers (e.g., java-class-analyzer-mcp) output plain text like "running on stdio" instead of JSON during startup.
The Java SDK fails to connect to these servers, throwing TimeoutException or EPIPE errors, whereas the JavaScript SDK can successfully connect to the same servers.