[
https://issues.apache.org/jira/browse/CAMEL-27404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-27404.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/30619 (ac2095627d).
What was found while reproducing it: -D and --prop already worked when
camel.server.enabled=true was set too (camel-mcp-server and
camel-platform-http-main were downloaded on demand). What failed was
camel.server.mcp-enabled alone, from any source including
application.properties: it never turned the HTTP server on.
* Camel JBang now turns the HTTP server on for MCP over HTTP when
camel.server.enabled is not configured, resolved at runtime from every property
source (not for stdio, not on export).
* The CLI reads camel.server.mcp-enabled / mcp-transport from --prop, -D,
environment variables and the properties file, so --mcp-tags applies and MCP
over stdio logs to stderr.
_Claude Code on behalf of davsclaus_
> camel-jbang - camel.server.mcp-enabled works from every property source, as
> camel.server.enabled does
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27404
> URL: https://issues.apache.org/jira/browse/CAMEL-27404
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> {{camel.server.enabled}} is read by Camel Main at runtime through the
> properties component, so it works from {{application.properties}}, {{-D}},
> {{--prop}} or an environment variable, and {{camel-platform-http-main}} is
> downloaded on demand ({{MainHttpServerFactory}}).
> {{camel.server.mcp-enabled}} (the MCP server for {{ai-tool}} routes over
> HTTP) is decided by the CLI before startup, to add {{camel:mcp-server}} and
> {{camel:platform-http-main}}: {{RunPipeline.isAiToolMcpServerEnabled}} reads
> it only from the properties file. Set as a JVM system property or with
> {{--prop}}, it is ignored, and the start fails with:
> {noformat}
> The MCP server requires the Vert.x platform HTTP server
> {noformat}
> (Citrus, for example, passes properties as system properties.) There are CLI
> options {{--mcp-stdio}} and {{--mcp-tags}}, but none to turn on MCP over HTTP.
> Expected: {{camel.server.mcp-enabled}} (and {{camel.server.mcp-transport}},
> {{camel.server.mcp-tags}}) work from every property source, the same as
> {{camel.server.enabled}}: resolved at runtime, with {{camel-mcp-server}} (and
> the HTTP server) downloaded on demand, so the CLI does not have to decide it
> up front. If that is not possible, the CLI at least reads them from
> {{--prop}} and {{-D}} too.
> Found while adding the ai-tool-source Kamelet to the Kamelet catalog
> (apache/camel-kamelets#3364, 2026-11-22).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)