Skip to content

Streamable HTTP transport hangs during initialization #406

@andrey-star

Description

@andrey-star

The client hangs during the first initialize message to a (public) Shopify MCP https://my-best-shoes.myshopify.com/api/mcp

I can successfully connect https://my-best-shoes.myshopify.com/api/mcp from npx @modelcontextprotocol/inspector.

Note that #396 describes that the client transport hangs during sendNotification for notifications/initialized. In this case, the client hangs even earlier - during initialize.

Steps to reproduce:

String url = "https://my-best-shoes.myshopify.com/api";
McpClientTransport transport = HttpClientStreamableHttpTransport.builder(url).endpoint("/mcp").build();

McpSyncClient client = McpClient.sync(transport)
    .requestTimeout(Duration.ofSeconds(20))
    .initializationTimeout(Duration.ofSeconds(20))
    .build();

try {
    client.initialize();

    McpSchema.ListToolsResult tools = client.listTools();
    logger.log(Level.INFO, "Available tools: {0}", tools.tools());

} catch (Exception e) {
    logger.log(Level.SEVERE, "Failed to initialize MCP client from DebugServlet", e);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions