Croway opened a new pull request, #25309: URL: https://github.com/apache/camel/pull/25309
# CAMEL-24311: camel.server.mcp-* configuration properties and camel-main autowiring Sub-tasks of [CAMEL-24308](https://issues.apache.org/jira/browse/CAMEL-24308): implements [CAMEL-24311](https://issues.apache.org/jira/browse/CAMEL-24311) and completes the docs of [CAMEL-24314](https://issues.apache.org/jira/browse/CAMEL-24314). > **Stacked on #25306** (which is stacked on #25301) — review only the `CAMEL-24311` commit. Will rebase as the underlying PRs merge. ## What this adds The MCP server now delivers the parent issue's headline UX on Camel Main / JBang — **no code and no route for the server itself**, like Jolokia or Prometheus: ```properties camel.server.enabled = true camel.server.mcp-enabled = true camel.server.mcp-tags = crm,notify camel.server.mcp-server-name = my-integration-app ``` - **`HttpServerConfigurationProperties`**: `mcpEnabled` (false), `mcpTags`, `mcpToolTimeout` (20s), `mcpPath` (`/mcp`), `mcpServerName` — with fluent withers; configurer, `camel-main-configuration-metadata.json` and `main.adoc` regenerated. - **`McpServerFactory` SPI in camel-main**, mirroring `MainHttpServerFactory`: `BaseMainSupport` resolves it (registry bean → bootstrap FactoryFinder key `mcp-server`, jar hint `camel-mcp-server`) when `mcp-enabled=true` and adds the bridge **after** the HTTP server service, so the Vert.x engine finds the running router. With `camel.server.enabled=false` the bridge is still set up so startup fails fast with the engine's actionable message instead of silently doing nothing. - **`DefaultMcpServerFactory`** (`@JdkService`) in `camel-mcp-server` maps the options onto `McpServerConfiguration`. It lives in the engine module deliberately: that module is main/JBang-only, so `camel-main` never reaches the Quarkus/Spring Boot classpath through `camel-mcp-server-api` (precedent: `camel-platform-http-main` implementing `MainHttpServerFactory`). - **Docs (CAMEL-24314)**: the component page now leads with the properties quick start (the interim "tracked by CAMEL-24311" note is gone); the options table names the `camel.server.mcp-*` properties per the bridge/engine ownership split. - **Catalog harvest** for the new modules (others.properties, `others/mcp-server.json`, docs copies) — generated here because the packaging-plugin change from #25306 needs a rebuilt plugin; can be split into #25306 if its CI requires it. Property ownership on native-engine runtimes is unchanged (per CAMEL-24311): `quarkus.mcp.server.*` / `spring.ai.mcp.server.*` win for serving concerns; bridge options are honored everywhere. ## Testing `McpServerMainPropertiesTest`: - boots `org.apache.camel.main.Main` from initial properties only, then verifies with the official MCP SDK client: advertised server name, tag-filtered `tools/list` (untagged pool excluded), successful `tools/call`. - verifies `mcp-enabled=true` without the HTTP server fails fast with the actionable message. Full module suite green (16 unit tests + 13 IT scenarios across the stack). --- _This PR was written by Claude Code on behalf of Federico Mariani (@Croway)._ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
