Croway opened a new pull request, #2112:
URL: https://github.com/apache/camel-spring-boot/pull/2112

   [CAMEL-27145](https://issues.apache.org/jira/browse/CAMEL-27145): the MCP 
server starter now serves the Camel `ai-tool`, `ai-resource` and `ai-prompt` 
routes when Spring AI runs its stateless MCP server.
   
   ## Problem
   
   With `spring.ai.mcp.server.protocol=STATELESS`, Spring AI auto-configures an 
`McpStatelessSyncServer` instead of an `McpSyncServer`. 
`CamelMcpServerAutoConfiguration` was 
`@ConditionalOnBean(McpSyncServer.class)`, so the starter silently registered 
nothing.
   
   ## Change
   
   - `SpringAiMcpServerEngine` publishes into either Spring AI server through a 
small internal adapter. Handlers receive the MCP transport context, so the 
caller identity reaches the route as before.
   - `CamelMcpServerAutoConfiguration` activates on either server bean 
(`AnyNestedCondition`), and runs after Spring AI's stateless auto-configuration 
too.
   - `CamelMcpServerStatelessTransportAutoConfiguration`: the counterpart of 
`CamelMcpServerTransportAutoConfiguration` for `STATELESS`. It installs Camel's 
Origin validation and caller-context extraction on Spring AI's 
`WebMvcStatelessServerTransport`; an application-provided transport takes 
precedence.
   - The "transport not active" warning now accepts `STREAMABLE` or `STATELESS`.
   - Docs: "Serving without sessions" in the starter usage page (regenerated 
docs page included).
   
   Without a session, every request is served on its own: restarts and several 
instances without session affinity no longer end the client's session. Such 
clients receive no notifications (they see changed lists at their next list 
request), and a `GET` on the endpoint is answered with 405 by Spring AI.
   
   MCP protocol version 2026-07-28 needs Spring AI 2.1.0 
(`spring.ai.mcp.server.protocol=MODERN`): CAMEL-27174.
   
   ## Tests
   
   `SpringBootMcpServerStatelessTest`: the MCP SDK client lists and calls 
tools, the Spring Security caller reaches the route, `initialize` returns no 
`Mcp-Session-Id`, `GET` is answered 405, and Origin is validated. The starter's 
55 tests are green locally.
   
   Related: apache/camel#30343 (Camel Main / JBang side of CAMEL-27145).
   
   _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]

Reply via email to