Bug description
HttpClientStreamableHttpTransport does not support redirect (status code 301) - exception is thrown.
Use-case: docker image 'mcp/atlassian' handles requests to '/mcp' with 301/redirect to '/mcp/'.
Environment
Java 17 + io.modelcontextprotocol.sdk:mcp:0.17.0
Steps to reproduce
Run MCP server based on 'mcp/atlassian' docker image and try to access it using McpClient with '/mcp' endpoint configured.
Expected behavior
McpSyncClient successfully handles 301/redirect instead of throwing exception.
Minimal Complete Reproducible example
var builder = HttpClientStreamableHttpTransport.builder(baseUrl)
.endpoint("/mcp")
.build();
var client = McpClient.sync(builder).build();
client.initialize(); // exception is thrown