This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new db505278197e chore: camel-launcher - the MCP plugin is embedded like 
the other plugins (#30127)
db505278197e is described below

commit db505278197e0ef255f93949dc9d72eb6f311fa5
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Nov 15 23:06:14 2026 +0100

    chore: camel-launcher - the MCP plugin is embedded like the other plugins 
(#30127)
    
    …gins
    
    The jar of camel-jbang-plugin-mcp was in the launcher, but the plugin
    was not in its list of embedded plugins. So camel mcp installed it on
    first use ("Installed plugin: mcp", an entry in
    ~/.camel-jbang-plugins.json), and camel --help listed mcp under the
    plugins that are not installed. Now the launcher adds its command as
    it does for the other plugins.
    
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../java/org/apache/camel/dsl/jbang/launcher/CamelLauncherMain.java  | 3 +++
 .../java/org/apache/camel/dsl/jbang/launcher/CamelLauncherTest.java  | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-launcher/src/main/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherMain.java
 
b/dsl/camel-jbang/camel-launcher/src/main/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherMain.java
index 0fa63e81069d..a9a125e046ed 100644
--- 
a/dsl/camel-jbang/camel-launcher/src/main/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherMain.java
+++ 
b/dsl/camel-jbang/camel-launcher/src/main/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherMain.java
@@ -27,6 +27,7 @@ import java.util.function.Supplier;
 import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
 import org.apache.camel.dsl.jbang.core.commands.generate.GeneratePlugin;
 import org.apache.camel.dsl.jbang.core.commands.kubernetes.KubernetesPlugin;
+import org.apache.camel.dsl.jbang.core.commands.mcp.McpPlugin;
 import org.apache.camel.dsl.jbang.core.commands.test.TestPlugin;
 import org.apache.camel.dsl.jbang.core.commands.tui.TuiPlugin;
 import org.apache.camel.dsl.jbang.core.commands.validate.ValidatePlugin;
@@ -48,6 +49,8 @@ public class CamelLauncherMain extends CamelJBangMain {
     private static final List<EmbeddedPlugin> PLUGINS = List.of(
             new EmbeddedPlugin(GeneratePlugin::new, Set.of("generate")),
             new EmbeddedPlugin(KubernetesPlugin::new, Set.of("kubernetes", 
"k8s")),
+            // its jar was in the launcher, but camel mcp installed the plugin 
on first use, in the plugin configuration
+            new EmbeddedPlugin(McpPlugin::new, Set.of("mcp")),
             new EmbeddedPlugin(SelfUpdatePlugin::new, Set.of("self-update")),
             new EmbeddedPlugin(TuiPlugin::new, Set.of("tui")),
             new EmbeddedPlugin(ValidatePlugin::new, Set.of("validate")),
diff --git 
a/dsl/camel-jbang/camel-launcher/src/test/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherTest.java
 
b/dsl/camel-jbang/camel-launcher/src/test/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherTest.java
index 6579f183beb7..b071f45afc4e 100644
--- 
a/dsl/camel-jbang/camel-launcher/src/test/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherTest.java
+++ 
b/dsl/camel-jbang/camel-launcher/src/test/java/org/apache/camel/dsl/jbang/launcher/CamelLauncherTest.java
@@ -100,12 +100,15 @@ public class CamelLauncherTest {
         // creating all the commands of the CLI and the plugins costs more 
than half a second
         assertEquals(Set.of("generate"), commandsOf("generate"));
         assertEquals(Set.of("kubernetes", "k8s"), commandsOf("k8s", "--help"));
+        // embedded like the others, so camel mcp does not install it in the 
plugin configuration on first use
+        assertEquals(Set.of("mcp"), commandsOf("mcp", "--help"));
         assertEquals(Set.of("version"), commandsOf("version"));
     }
 
     @Test
     public void theHelpCreatesTheCommandsOfAllEmbeddedPlugins() {
-        assertTrue(commandsOf("--help").containsAll(Set.of("version", 
"generate", "kubernetes", "self-update", "tui")));
+        assertTrue(commandsOf("--help")
+                .containsAll(Set.of("version", "generate", "kubernetes", 
"mcp", "self-update", "tui", "validate", "test")));
     }
 
     private static Set<String> commandsOf(String... args) {

Reply via email to