Commit graph java-sdk/mcp-json-jackson2
Author SHA1 Message Date
Daniel Garnier-Moiroux
183935bf80 Fix Automatic-Module-Name without hypens
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-09-17 11:50:06 +02:00
Daniel Garnier-Moiroux
cceba3f695 Next development version
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 15:27:57 +02:00
Daniel Garnier-Moiroux
c7e1cfe90e Release version 2.0.1
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-08-19 15:25:35 +02:00
Dariusz Jędrzejczyk
d1ef187c9c Next development version
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-06-11 13:41:15 +02:00
Dariusz Jędrzejczyk
f56d038409 Release version 2.0.0
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-06-11 13:37:50 +02:00
Christian Tzolov
99faac65f7
Clarify tool validation error messages (#1023)
- DefaultJsonSchemaValidator now emits a neutral message;
- Call sites in ToolInputValidator and the server output handlers
  prepend their own context prefix,
- Integration test assertions strengthened accordingly.

Closes #986

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>

* address review comments

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>

* address review comments

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>

---------

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-06-11 09:45:28 +02:00
Joao Ferreira
c49a994463 Add missing Export-Package to mcp-json-jackson2 and mcp-json-jackson3
Use explicit package names instead of a wildcard glob to avoid
embedding mcp-core classes into the jackson module JARs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 11:02:08 +02:00
Dariusz Jędrzejczyk
c8ab3411b9
feat: Refine logging levels (#985)
The logging is sometimes too verbose and uses inappropriate level. With this
change there should be less disturbing logs and less duplication.

Notable changes:

* `LifeCycleInitializer#handleException` - duplicated log, already handled in
  transports that use the initializer.
* `McpClientSession#sendRequest` - an MCP protocol level error in JSON-RPC is
  not really a reason for ERROR level log. Using INFO with more details.
* `DefaultJsonSchemaValidator` - ERROR logs in `validate` are always logged by
  the users of this method. `validateSchema` surfaces as
  `IllegalArgumentException` and can be logged at higher levels by the user.

Also: remove DEBUG logs from mcp-test module.

Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-05-27 11:50:48 +02:00
Dariusz Jędrzejczyk
87e2c7d4de
feat: validate embedded JSON Schema documents against 2020-12 meta-schema (SEP-1613) (#949)
MCP embeds JSON Schema documents in three places — Tool.inputSchema,
Tool.outputSchema, and ElicitRequest.requestedSchema — and SEP-1613
mandates that these documents conform to JSON Schema 2020-12 by default.

Servers now reject malformed schemas at both build time (McpServer.build())
and runtime (McpAsyncServer/McpStatelessAsyncServer.addTool()), returning
an IllegalArgumentException that identifies the offending field and
references SEP-1613.  Elicitation requests whose requestedSchema violates
the meta-schema are rejected before being sent to the client.

Schemas that explicitly declare a different dialect via $schema are accepted
without meta-schema validation, since 2020-12 is the default, not the only
permitted dialect.

Refine meta-schema loading and deprecate orphan JsonSchemaValidator

Resolves #700

Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-05-07 14:14:53 +02:00
Christian Tzolov
cbb235fd32 Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-03-13 13:31:03 +01:00
Christian Tzolov
c4b585795e
fix: prepare POMs for Maven Central release readiness (#863)
- Fix malformed SCM developerConnection URL (slash → colon) across all modules
- Add mcp-json-jackson3 to mcp-bom dependency management
- Update license URL to HTTPS
- Fix POM's scm definitions

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>



Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>

---------

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-03-13 12:41:49 +01:00
Christian Tzolov
d689cddd8b Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-23 10:32:26 +01:00
Christian Tzolov
7e08a8e63f Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-20 22:04:21 +01:00
Christian Tzolov
479e52e6d5 Release version 1.0.0-RC3
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-20 22:03:40 +01:00
Christian Tzolov
acb7e4d2a0 Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-20 21:41:35 +01:00
Christian Tzolov
11b597cd77 Release version 1.0.0-RC2
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-20 21:37:56 +01:00
Dariusz Jędrzejczyk
4c1c3d8d5c
Remove deprecated APIs and modules for 1.0.0 release (#807)
- Remove mcp-json-jackson module (JacksonMcpJsonMapper, DefaultJsonSchemaValidator)
- Remove deprecated session interfaces (McpServerSession, McpClientSession methods)
- Remove deprecated server methods (loggingNotification, McpAsyncServerExchange constructor)
- Remove deprecated schema definitions and constructors (McpSchema, McpError, tool/content classes)
- Replace generic McpError with appropriate exception types (IllegalStateException, IllegalArgumentException)
- Update all tests to use current APIs

---------

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
2026-02-20 17:32:40 +01:00
Scott Lewis
159eb964cc Fix and simplification for osgi manifest.mf
contents generation.
2026-02-18 17:18:11 +01:00
Christian Tzolov
3ab829285d Bump version from 0.18.0-SNAPSHOT to 1.0.0-SNAPSHOT
Update project version across all POM files, documentation, and CI
workflow to prepare for the 1.0.x release

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-18 12:45:20 +01:00
Sébastien Deleuze
e60a0743a5
Refine McpJsonDefaults method names (#789)
As a follow-up of #779, this commit refines McpJsonDefaults
method names by shortening them to not repeat the qualifiers
already expressed at type level.
2026-02-13 16:54:01 +01:00
Scott Lewis
c3b9ab09ea Move mcp-json into mcp-core, add OSGi support
Co-authored-by: Luca Chang <131398524+LucaButBoring@users.noreply.github.com>
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-12 09:13:38 +01:00
Filip Hrisafov
2456a0e433
Add Support for Jackson 3 (#742)
This change adds Jackson 3 support and aligns package naming in the existing Jackson 2 module.

Specific changes:
* Deprecated classes for removal in `io.modelcontextprotocol.json.jackson`/`io.modelcontextprotocol.json.schema.jackson`
* Copied the above to `io.modelcontextprotocol.json.jackson2`/`io.modelcontextprotocol.json.schema.jackson2` in non-deprecated form.
* Added tests for the default McpJsonMapper and JsonSchemaValidator
2026-01-26 11:43:35 +01:00
Christian Tzolov
082444e18f Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-12-04 15:57:27 +01:00
Christian Tzolov
e3079270d5 Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-11-12 16:13:08 +01:00
Uladzislau Arlouski
ed85f7ee3e
Bump json-schema-validator from 1.5.7 to 2.0.0 (#660) 2025-11-12 14:21:09 +01:00
Christian Tzolov
6e9af40bcb Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-10-30 19:02:32 +01:00
Christian Tzolov
2ee58533d0
fix: allow additional properties by default per JSON Schema spec (#617)
- Remove automatic additionalProperties: false injection (JSON Schema spec compliance)
- Support String input for structuredContent in validate() method
- Move tests to mcp-json-jackson2 module with proper dependencies
- Replace wildcard imports with explicit imports

Complies with JSON Schema Test Suite:
15e4505/tests/draft2020-12/additionalProperties.json\#L112

Fixes #584

BREAKING CHANGE: Additional properties now allowed by default when not explicitly specified.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-10-14 09:30:59 +02:00
Christian Tzolov
c734b2a5c1 Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-10-02 00:03:36 +01:00
Christian Tzolov
a0afdcd493 Next development version
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-09-18 19:28:56 +02:00
Graeme Rocher
80d0ad82a6 feat: Introduce McpJsonMapper interface to decouple from Jackson (#543)
This pull request creates two modules, `mcp-json` and `mcp-json-jackson`. It removes the `com.fasterxml.jackson.core:jackson-databind` and `com.networknt:json-schema-validator` dependencies from the `mcp` module. The `mcp` module now only depends on `com.fasterxml.jackson.core:jackson-annotations`.

To use Jackson, you have to add `mcp-jackson` to your dependencies in addition to `mcp`. I added the dependency `mcp-jackson` to both `mcp-spring-mvc` and `mcp-spring-webflux` to avoid a breaking change in those modules.

It provides two [SPI](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) `JsonSchemaValidatorSupplier` and `JacksonJsonSchemaValidatorSupplier` to allow easy replacement for consumers who don't want to use Jackson.

This pull request also ensures no `McpJsonMapper` is instantiated if one is provided via a builder method. Only if the builders don't receive a `McpJsonMapper` mapper, one is instantiated in the `build` method of the builder.
The logic behind this is to allow frameworks to provide a `McpJsonMapper` mapper singleton implementation and feed it to the builders without paying the price of instantiating `McpJsonMappers`, which will not be used. The goal is to be able to use the `ObjectMapper` singleton of an application also for the MCP code.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-09-15 15:51:06 +02:00