[ 
https://issues.apache.org/jira/browse/CAMEL-27145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18146742#comment-18146742
 ] 

Federico Mariani commented on CAMEL-27145:
------------------------------------------

Pull requests:

* Camel Main / JBang: 
[apache/camel#30343|https://github.com/apache/camel/pull/30343]. The {{/mcp}} 
endpoint serves, by default ({{camel.server.mcp-protocol-era=dual}}), both the 
protocol versions that open with {{initialize}} (with a session, as before) and 
MCP protocol version 2026-07-28 (no session), chosen per request from the body; 
{{legacy}} and {{modern}} restrict it. {{camel.server.mcp-stateless=true}} also 
serves the clients that open with {{initialize}} without a session, as the 
streamable HTTP transport allows since 2025-03-26. MCP Java SDK 2.2.0; serving 
2026-07-28 is a preview.
* Camel Spring Boot: 
[apache/camel-spring-boot#2112|https://github.com/apache/camel-spring-boot/pull/2112].
 The starter now works with Spring AI's 
{{spring.ai.mcp.server.protocol=STATELESS}} (it registered nothing before). 
2026-07-28 waits for Spring AI 2.1.0: CAMEL-27174.
* Camel Quarkus: 
[apache/camel-quarkus#9523|https://github.com/apache/camel-quarkus/pull/9523]. 
quarkus-mcp-server already serves 2026-07-28 next to the older versions; test 
and docs only.

Checked on Kubernetes with 3 replicas behind a Service without session 
affinity: a client of 2026-07-28 succeeds on every pod and across a rolling 
restart; with {{camel.server.mcp-stateless=true}} a client that opens with 
{{initialize}} does too, without re-initializing.

_Claude Code on behalf of Croway_

>  Support stateless Streamable HTTP using MCP Java SDK
> -----------------------------------------------------
>
>                 Key: CAMEL-27145
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27145
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mcp-server
>    Affects Versions: 4.23.0
>            Reporter: Simon Hartl
>            Assignee: Federico Mariani
>            Priority: Minor
>
> h2. Description
> Currently, {{camel-mcp-server}} (Camel Main / JBang) uses a session-based 
> Vert.x Streamable HTTP transport without a stateless option.
> This causes issues when restarting Camel applications, as existing MCP 
> sessions become invalid. Some MCP clients do not automatically recover and 
> require manual reconnection.
> Stateless operation would also simplify Kubernetes deployments by removing 
> the need for session affinity.
> h2. Proposed Enhancement
> Add optional stateless MCP support using the modern server API introduced in 
> {*}MCP Java SDK 2.2.0{*}.
> Suggested configuration:
> {{camel.server.mcp-stateless=true}}
> The enhancement should:
>  * Integrate the modern MCP Java SDK API with Camel's Vert.x HTTP transport.
>  * Support stateless tool discovery and execution.
>  * Preserve existing stateful behavior for backward compatibility.
> h2. Additional Context
> In a Zulip discussion, the Camel team confirmed that stateless mode is 
> currently unavailable and that supporting the new SDK API would require an 
> SDK upgrade and HTTP transport integration.
> The team suggested opening a Jira issue to track this enhancement. 
> Implementation details remain open for discussion.
> h2. References
>  * [MCP Java SDK – Modern Server API (PR 
> #1170)|https://github.com/modelcontextprotocol/java-sdk/pull/1170]
>  * [Camel MCP Server 
> Documentation|https://camel.apache.org/components/4.22.x/others/mcp-server.html]
>  * [MCP Specification 
> 2026-07-28|https://modelcontextprotocol.io/specification/2026-07-28]



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to