Skip to content

The stdio transport appears to be hanging #569

@garpinc

Description

@garpinc

Bug description
I am trying to test a client side stream talking to a server side stream. The data is getting to the server and responses are being sent back from server and received by client for the initialize. Subsequent calls however seem to just hang. They get to server but the handle methods are never called.

Environment
I'm on mcp-0.11.3. jdk 17

Steps to reproduce
I have attached a test case.
McpTest2.java

Expected behavior
I expect the test case to succeed.

Minimal Complete Reproducible example
the Junit test reproduces the issue.

I have attached a test case but instead of returning it hangs.
I would have expected it to return the results of the tools call which would have helloworld but it didn't. Please assist.

The output was:
MCP: CLIENT SENDING TO SERVER: { "jsonrpc": "2.0", "id": "1", "method":"initialize", "params": { "protocolVersion": "mcp/1.0", "capabilities": { "tools": true } } }
MCP: SERVER OUTPUT: {"jsonrpc":"2.0","method":"notifications/tools/list_changed"}
MCP: SERVER OUTPUT: {"jsonrpc":"2.0","id":"1","result":{"protocolVersion":"2024-11-05","capabilities":{"logging":{},"tools":{"listChanged":true}},"serverInfo":{"name":"osgi-mcp","version":"1.0"},"instructions":"[the instructions].\n"}}
MCP: CLIENT SENDING TO SERVER: { "jsonrpc": "2.0", "id": "2", "method":"tools/call", "params": { "name": "general_test1", "arguments": {} } }

And then the test case just hung and never received anymore output from the server.

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