Croway opened a new pull request, #25404:
URL: https://github.com/apache/camel/pull/25404

   JIRA: [CAMEL-24369](https://issues.apache.org/jira/browse/CAMEL-24369)
   
   Two fixes found by running the same ai-tool + mcp-server application on 
Camel Main, Spring Boot and Quarkus (companion PRs in apache/camel-spring-boot 
and apache/camel-quarkus):
   
   ### camel-mcp-server: jackson-annotations alignment
   
   An application importing only `camel-bom` fails at MCP engine startup with 
`NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonSerializeAs`: the 
MCP Java SDK (`mcp-core`, still latest 2.0.0) declares 
`jackson-annotations:2.20`, which nearest-wins resolution picks over the 2.22 
required by `jackson-databind:2.22.1`. A direct dependency on the aligned 
`jackson-annotations` makes consumers resolve a consistent version with or 
without the jackson-bom.
   
   ### camel-openai: defer initialization of MCP servers unreachable at 
endpoint startup
   
   `openai:chat-completion?mcpServer.x.url=<own /mcp>` (an application 
consuming its own MCP endpoint — the pattern shown in the mcp-server docs) 
initializes its MCP client eagerly on route warm-up. On Quarkus the HTTP server 
only accepts connections after the application has started, so the route — and 
the whole application — failed to start; on Spring Boot the client started with 
0 tools; on Camel Main it worked. Now an MCP server that is unreachable during 
`doStart` is recorded with a WARN and initialized lazily on first use, reusing 
the existing reconnect path and per-server locks. Invalid configuration (e.g. 
missing `transportType`) still fails fast. This aligns behavior across runtimes 
and matches the in-process registration model of annotated tools (quarkiverse 
`@Tool`, Spring AI `@McpTool`), which cannot hit this ordering problem.
   
   Includes a new unit test (`OpenAIEndpointMcpDeferredInitTest`, 4 scenarios), 
the `openai-mcp.adoc` error-table update, and a fix for the stale ai-tool "See 
Also" section (langchain4j-agent and spring-ai-chat discover ai-tool routes 
today, not "in a future release").
   
   Verified end-to-end: 27/27 MCP conformance scenario checks on all three 
runtimes with local Ollama.
   
   ---
   _Claude Code on behalf of Croway (Federico Mariani)_
   
   🤖 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]

Reply via email to