Croway opened a new pull request, #30445: URL: https://github.com/apache/camel/pull/30445
[CAMEL-27246](https://issues.apache.org/jira/browse/CAMEL-27246) ## Description `mcpServer.<name>.transportType` of `spring-ai-chat` supported `stdio` and `sse`. The HTTP+SSE transport was replaced by Streamable HTTP in the MCP specification 2025-03-26, and its client, `HttpClientSseClientTransport`, is deprecated in MCP Java SDK 2.2.0. camel-mcp-server serves Streamable HTTP, and camel-openai already supports `streamableHttp`. - New `streamableHttp` transport, named as in camel-openai, with `HttpClientStreamableHttpTransport` and the same `url` and `oauthProfile` properties as `sse`. - The `url` is the URL of the MCP endpoint, path and query included. The SDK resolves its endpoint (`/mcp`) against the URL it is given, which replaces the path of that URL, so the URL is split into its base and its endpoint: `http://host:8080/api/mcp` goes to `/api/mcp`, and a URL without a path goes to `/mcp`. A relative URL fails with a clear message. camel-openai passes the URL as is, so it ignores the path; that is CAMEL-27248. - `sse` keeps working. The documentation marks it deprecated, and an INFO line at start points to `streamableHttp`. - Documentation: a "Streamable HTTP Transport" section with Java, XML and YAML examples; the multi-server and OAuth examples use `streamableHttp`. No upgrade guide entry: existing routes do not change. ## Tests `SpringAiChatMcpStreamableHttpTest` (5 tests) connects over Streamable HTTP to a real MCP server: the SDK's stateless server with an `echo` tool, on the JDK HTTP server, under `/api/mcp`. A route calls the tool through the chat producer with an OAuth profile, and the test checks the answer, that `initialize`, `tools/list` and `tools/call` reach the server, that every request goes to `/api/mcp`, and the `Authorization: Bearer` header. The other tests cover the default `/mcp` path, the query string, and the errors for a missing or relative URL and an unknown transport. `mvn verify -DskipITs` in `camel-spring-ai-chat`, with `camel-ai-observability-api` and `camel-ai-observability` in the same reactor: 48 tests pass. _Claude Code on behalf of Croway_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
