Simon Hartl created CAMEL-27145:
-----------------------------------

             Summary:  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


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