[ 
https://issues.apache.org/jira/browse/CAMEL-26469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Netherton reassigned CAMEL-26469:
---------------------------------------

    Assignee: James Netherton

> camel-mcp-server, camel-openai - Use the Jackson 3 JSON module of the MCP 
> Java SDK (mcp-json-jackson3)
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26469
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26469
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mcp-server, camel-openai
>            Reporter: Claus Ibsen
>            Assignee: James Netherton
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> The MCP Java SDK (2.1.0) ships its JSON support in two modules: 
> {{mcp-json-jackson2}} and {{mcp-json-jackson3}}. Camel uses the Jackson 2 
> one. As Camel moves to Jackson 3 (CAMEL-22857), the MCP modules can switch to 
> {{mcp-json-jackson3}}.
> *Modules that use mcp-json-jackson2 today*
> * {{camel-mcp-server}}: compile dependency. Also uses Jackson 2 directly in 
> {{McpServerIconsParser}} ({{com.fasterxml.jackson.databind.ObjectMapper}}).
> * {{camel-openai}}: compile dependency (the MCP client of the tool calls). 
> {{McpToolCallExecutor}} and other classes import Jackson 2 directly (14 
> imports in src/main).
> * {{camel-mcp-server-api}}: test scope.
> * {{camel-jbang-core}}: test scope.
> *Things to look at*
> * {{mcp-json-jackson3}} 2.1.0 provides both services the SDK looks up 
> ({{McpJsonMapperSupplier}} and {{JsonSchemaValidatorSupplier}}). It depends 
> on {{tools.jackson.core:jackson-databind}} 3.1.4 (Camel manages 3.2.4) and on 
> {{com.networknt:json-schema-validator}} *3.0.6*. Camel uses networknt *2.0.1* 
> ({{networknt-json-schema-validator-version}}, set explicitly in 
> camel-json-validator, camel-yaml-dsl, camel-yaml-dsl-validator and 
> camel-jbang-core). {{mcp-json-jackson2}} uses networknt 2.0.4. A classpath 
> with both, such as {{camel run}} with the YAML DSL and camel-mcp-server, gets 
> one networknt version for both users, and 2.x and 3.x are different major 
> versions.
> * Keep only one of the two SDK JSON modules on a classpath. The SDK takes the 
> first {{McpJsonMapperSupplier}} its service loader finds, so with both 
> present the Jackson version in use depends on the classpath order.
> * Vert.x 5 ({{camel-platform-http-vertx}}) still brings Jackson 2, so Jackson 
> 2 stays on the classpath of camel-mcp-server.
> * The pom comment in camel-mcp-server about {{jackson-annotations}} (mcp-core 
> declares an older one) applies to Jackson 3 as well: Jackson 3 uses the 
> Jackson 2 {{jackson-annotations}} artifact and needs 2.21 or later.
> *Not a fix for CAMEL-26298*: that startup failure of {{camel run 
> --mcp-stdio}} was a class loader problem (the service loader of the thread 
> context class loader); {{mcp-json-jackson3}} is found the same way.
> _Claude Code on behalf of davsclaus (Claus Ibsen)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to