Skip to content

Support non-JSON stdout for legacy MCP servers in Java SDK #611

@ZYT20001

Description

@ZYT20001

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions