Claus Ibsen created CAMEL-27404:
-----------------------------------
Summary: 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
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)