-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Labels
waiting for userWaiting for user feedback or more detailsWaiting for user feedback or more details
Description
Bug description
With the 0.11.0 and 0.11.1 SDKs I can no longer reliable work with HTTP + SSE servers like for example the sample "https://mcp.deepwiki.com/sse" server.
Environment
Java 17, MCP 0.11.1 SDK.
Steps to reproduce
Run this code with the 0.10.0 SDK, the consecutive tool calls will all work.
With the 0.11.0 and 0.11.1 SDK's only the first tool call works, the subsequent ones do not.
public static void main(String[] args) throws InterruptedException {
HttpClientSseClientTransport transport = HttpClientSseClientTransport.builder(
"https://mcp.deepwiki.com/sse").customizeClient(
new Consumer<HttpClient.Builder>() {
@Override
public void accept(Builder t) {
t.connectTimeout(Duration.ofMinutes(2));
}
}).build();
McpSyncClient client = McpClient.sync(transport).build();
client.initialize();
ListToolsResult tools = client.listTools();
List<Tool> tulz = tools.tools();
for (Tool tool : tulz) {
System.err.println("Tool " + tool.name());
}
for (int i = 0; i < 5; i++) {
System.err.println("Iteration ----- " + i);
Thread.sleep(5000);
Map<String, Object> params = new HashMap<>();
params.put("repoName", "dita-ot/dita-ot");
CallToolResult result = client.callTool(new CallToolRequest("read_wiki_structure", params));
System.err.println("Result " + i + " -> " + result.toString());
}
}
Expected behavior
All the 5 tool calls should successfully finish.
Minimal Complete Reproducible example
See steps to reproduce.
Metadata
Metadata
Assignees
Labels
waiting for userWaiting for user feedback or more detailsWaiting for user feedback or more details