Croway opened a new pull request, #1871: URL: https://github.com/apache/camel-spring-boot/pull/1871
# CAMEL-24331: camel-mcp-server-starter — Spring AI engine for the MCP server bridge JIRA: [CAMEL-24331](https://issues.apache.org/jira/browse/CAMEL-24331), the Spring Boot runtime of [CAMEL-24308](https://issues.apache.org/jira/browse/CAMEL-24308) (camel-mcp-server). > **Depends on apache/camel#25306** (`camel-mcp-server-api`): CI cannot pass until that merges and 4.22.0-SNAPSHOT publishes. Developed and verified locally against the installed snapshots. ## What this adds A hand-crafted `camel-mcp-server-starter` exposing `ai-tool` routes as MCP tools on Spring Boot, served through the **Spring AI 2.x MCP server** (`spring-ai-starter-mcp-server-webmvc`, `spring.ai.mcp.server.protocol=STREAMABLE`): - Depends on **`camel-mcp-server-api`** (the runtime-agnostic bridge + `McpServerEngine` SPI) — deliberately *not* `camel-mcp-server`, which is the Vert.x engine for Camel Main/JBang. Spring AI 2.0.0 pins the same MCP Java SDK (2.0.0) that camel manages, so no version skew. - `SpringAiMcpServerEngine`: `toolAdded`/`toolRemoved` map onto the auto-configured `McpSyncServer` bean's `addTool`/`removeTool`; `tools/list_changed` is emitted by the SDK. `consumesServingConfiguration()` stays false — serving (path, protocol, identity, auth) is owned by `spring.ai.mcp.server.*`, per the precedence rule recorded on CAMEL-24311. - `CamelMcpServerAutoConfiguration` (`camel.mcp-server.*`): `enabled` (default true — adding the starter is the opt-in), `tags` (unset ⇒ nothing exposed, preserving the security default), `tool-timeout` (20s). Backs off cleanly without an `McpSyncServer` bean and honors `@ConditionalOnMissingBean` overrides. The bridge lifecycle is owned by Camel (`camelContext.addService`). - Spring AI 2.0.0 is pinned in the starter pom (`spring-ai-mcp-version`) — the inherited `${spring-ai-version}` is 1.1.7 and the MCP server support needs 2.x (Spring Boot 4.1 baseline, matching this repo). - Docs: generated starter page with hand-written intro/usage sections (tool semantics vs serving ownership, Camel Main/Quarkus pointers). ## Known limitation No springboot-catalog `others/` entry is generated: the tooling derives the wrapped artifact from the starter name (`camel-mcp-server`), which is intentionally not a dependency here. Can be added if the tooling learns an override, or accepted as-is like other API-only modules. ## Testing - `CamelMcpServerAutoConfigurationTest` — auto-config conditions (default on, `enabled=false`, back-off without `McpSyncServer`). - `SpringBootMcpServerTest` — the CAMEL-24313 engine conformance scenarios over WebMVC streamable HTTP with the official MCP SDK client: tag-filtered tools/list (untagged pool excluded), call success, missing required argument, execution error sanitized to a generic message, timeout, tools list following route stop/start. (The camel-mcp-server-api conformance kit manages its own CamelContext and cannot boot inside Spring Boot — the scenarios are mirrored 1:1 instead; noted on CAMEL-24313.) All 9 tests green. --- _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]
