davsclaus commented on code in PR #25203:
URL: https://github.com/apache/camel/pull/25203#discussion_r3718183836
##########
dsl/camel-jbang/camel-jbang-core/pom.xml:
##########
@@ -61,6 +61,10 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-kamelet-main</artifactId>
</dependency>
+ <dependency>
Review Comment:
This should not be a compile dependency. Other optional features
(`camel-opentelemetry2`, `camel-jfr`, etc.) are downloaded on demand via
`dependencies.add("camel:...")` in `Run.java` — you already do this correctly
for MCP. Having it as compile scope means every `camel run foo.yaml` pulls in
the MCP server, Vert.x MCP transport, and MCP Java SDK even when `--mcp` is not
used.
Remove this compile dependency and make the MCP classes pluggable — loaded
at runtime only when `camel-mcp-server` is on the classpath (downloaded on
demand when `--mcp` is passed).
##########
dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/mcp/ToolMcpSchemasTest.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands.mcp;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+class ToolMcpSchemasTest {
+
+ @Test
+ void buildsRequiredParametersSchema() {
+ String schema = ToolMcpSchemas.inputSchemaJson(
+
org.apache.camel.dsl.jbang.core.commands.ai.ToolDescriptor.tool("demo", "Demo
tool")
+ .param("name", "string", "A name", true)
Review Comment:
Per project import style conventions: `ToolDescriptor` is already imported
at line 20 — use the simple name here instead of the FQCN.
```suggestion
ToolDescriptor.tool("demo", "Demo tool")
```
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc:
##########
@@ -80,6 +80,12 @@ and spec stay together. `--openapi-ui` also sets override
properties for `camel.
and `camel.rest.apiContextPath=/q/openapi.json`, which take precedence over
values in `application.properties`
or other property sources (same as other CLI `--` server flags that use
override properties).
+`camel run`, `camel dev`, and `camel debug` accept `--mcp` to expose JBang
dev/diagnostics tools over MCP
+streamable HTTP on the management server (`/mcp` by default). The feature is
gated as developer-only
+(`insecure:dev`) via `camel.jbang.mcp` and `camel.management.mcpEnabled`. It
uses `VertxMcpServerEngine`
+from `camel-mcp-server` on the management HTTP router — distinct from business
`ai-tool` MCP exposed on the
+main server via `camel.server.mcpEnabled`.
+
The `camel cmd route-diagram` and `camel cmd route-topology` now accept one or
more Camel route source files
(instead of only the name/pid of a running integration), so diagrams and
inter-route topology can be
Review Comment:
The upgrade guide is for migration content only (changed defaults, removed
options, breaking changes). This entry describes a new feature — it belongs in
the command documentation pages where `--mcp` is already documented. Please
remove this section from the upgrade guide.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]