Commit graph java-sdk/conformance-tests
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
Christian Tzolov
2fd159a79a Prepare SDK Tier 2 assessment submission
- Add CHANGELOG.md with release lines and history
- Refresh ROADMAP.md: 2.x stable line, 3.0.x for 2026-07-28 spec (first
  milestones Sep 2026), Tier 2 commitment, 1.x/0.x security-patches-only
- Refresh VALIDATION_RESULTS.md: 2026-08-17 run on conformance suite
  0.2.0-alpha.11 (server 73/73, auth 193/193, client 3/4 w/ sse-retry baselined)
- Bump conformance CI action pins v0.1.11 -> v0.1.16
- Update docs with missing features

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-08-19 11:16:44 +02:00
Daniel Garnier-Moiroux
492c859eb8 Conformance: introduce @ConditionalOnScenario
- Useful for incoming auth scenarios in Conformance v2 / 2026-07-28 spec

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-24 12:24:20 +02:00
Daniel Garnier-Moiroux
b1a7d5fe88 Upgrade conformance suite to 0.1.16, Spring AI conformance to 2.0.0 GA
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-23 15:49:21 +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
Daniel Garnier-Moiroux
fe82ad508a
Add schemas for form-based elicitation (#1020)
* Add StringSchema, BooleanSchema and NumberSchema
* Add enum schemas for form-based elicitation matching SEP-1330

Closes #691

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-06-11 11:16:47 +02:00
Dariusz Jędrzejczyk
c6d365c418
Unify logging config (#984)
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-05-27 11:15:53 +02:00
Daniel Garnier-Moiroux
fc330a5885 conformance-tests: upgrade to MCP-security 0.1.11, implement CIMD
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-05-21 14:41:14 +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
Dariusz Jędrzejczyk
22a0efa577 feat!: enforce required MCP spec fields in McpSchema; lenient wire deserialization (#928)
Every wire-serialized record in McpSchema now validates spec-required
fields at construction time. Wire deserialization is intentionally
lenient: a missing required field is replaced with a documented default
and a WARN is logged, instead of failing the parse. A required-first
builder convention is introduced across the schema so it is no longer
possible to obtain a builder that is missing required state.

Required-field guards
---------------------
Every wire record's compact constructor asserts non-null (and non-empty
for String identifiers like name, uri, uriTemplate, version) on its
spec-required components. Passing null now throws
IllegalArgumentException at construction time instead of silently
producing invalid JSON via @JsonInclude(NON_ABSENT). This applies to
the JSON-RPC envelopes, lifecycle types, resource/prompt/tool requests
and results, sampling and elicitation, content records, root, complete,
logging and progress notifications, and the two CompleteReference
implementations. See MIGRATION-2.0.md for the full list.

Lenient wire deserialization
----------------------------
For each of those records (except JSONRPCResponse.JSONRPCError, which
still fails fast) a @JsonCreator static `fromJson` factory substitutes
a documented default for any absent required field — "" for strings,
[] for collections, {} for maps, 0 / 0.0 for numerics, INFO for
LoggingLevel, USER for SamplingMessage.role, ASSISTANT for
CreateMessageResult.role, CANCEL for ElicitResult.action, {values=[]}
for CompleteResult.completion — and logs a WARN naming the field and
the value used. Application code can still observe a malformed message
and react, but the SDK no longer halts the conversation.

Builder convention
------------------
Records that have a builder gain a required-first factory method
`builder(req1, req2, …)`; setters for required fields are removed from
the builder so it cannot be left in an invalid state. Existing no-arg
`builder()` factories and required-field setters are kept where source
compatibility demands it but are marked @Deprecated. New builders are
also added for several records that previously had none (ProgressNotification,
JSONRPCError, CompleteRequest, list/result types, content records, ...).

JSON-RPC envelope ergonomics
----------------------------
Previously every JSON-RPC envelope had to be constructed via the
canonical record constructor and the literal "2.0" string had to be
threaded through every call site, e.g.

    new JSONRPCRequest("2.0", "tools/call", id, params)
    new JSONRPCResponse("2.0", id, result, null)
    new JSONRPCResponse("2.0", id, null, new JSONRPCError(code, message, null))

Now:

    new JSONRPCRequest("tools/call", id, params)              // jsonrpc defaulted
    new JSONRPCNotification("notifications/initialized")       // params optional
    JSONRPCResponse.result(id, result)                        // factory
    JSONRPCResponse.error(id, new JSONRPCError(code, message)) // 2-arg error

JSONRPCResponse's compact constructor additionally enforces the
JSON-RPC invariant that exactly one of `result` / `error` is set —
previously the SDK could build envelopes that violated the protocol.

CompleteReference changes
-------------------------
- PromptReference.equals/hashCode now key on `name` only (previously
  derived from identifier()+type()). Two refs with the same name but
  different titles now compare equal — code using PromptReference as a
  map/set key should be audited.
- PromptReference's compact constructor pins `type` to "ref/prompt"
  and logs a WARN if the caller supplies a different non-null value.
  The legacy two-arg `PromptReference(String type, String name)`
  constructor remains @Deprecated.
- ResourceReference's record components are reduced from (type, uri)
  to (uri) — positional construction breaks. The legacy
  `ResourceReference(String type, String uri)` constructor stays
  @Deprecated and ignores `type`.
- CompleteReference.identifier() is @Deprecated and now returns null
  via a default method on the interface.

Tests / refactor
----------------
Conformance harness, integration tests, sample apps, and internal
callers were migrated to the new builder factories and convenience
constructors. No semantic changes to client/server runtime behaviour
beyond the McpSchema changes above.

Docs
----
- MIGRATION-2.0.md: required-field section now covers the broader
  record set and the lenient-deserialization behaviour; PromptReference
  WARN behaviour and ResourceReference component reduction are
  documented; the JSON-RPC envelope section is rewritten to compare the
  pre-2.0 surface with the new one.
- CONTRIBUTING.md: the "Evolving wire-serialized records" recipe is
  split into two cases — adding a new optional field (existing rules)
  and adding/maintaining a spec-required field (new rules covering
  Assert in compact constructor, @JsonCreator fromJson with defaults
  and WARN, required-first builder factory).

Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
2026-05-04 21:01:46 +02:00
Bilal Oumehdi
95203233c8
fix: Remove JsonSchema and use a Map for inputSchema to support json schemas dialect (#749)
* feat: remove JsonSchema an use a Map for inputSchema

- Fixes #886

Co-authored-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-04-10 11:32:22 +02:00
Daniel Garnier-Moiroux
22e7bd4b56 conformance: update to mcp-security 0.1.5, pass scope-step-up
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-04-02 10:55:43 +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
Dariusz Jędrzejczyk
7f68ea5bc0
Support resource subscriptions (#839)
Clients can now subscribe to specific resources and receive targeted
notifications when those resources change. Previously, calling
`notifyResourceUpdated` on the server would broadcast the notification
to every connected client regardless of interest — now only sessions
that have explicitly subscribed to a given resource URI receive the
update, making resource change propagation both correct and efficient.
The subscription lifecycle is fully handled: clients can subscribe and
unsubscribe at any time, and the server cleans up subscription state
when a session closes.

Supersedes #838.
Resolves #837, #776.

---------

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
2026-03-02 15:26:03 +01:00
Daniel Garnier-Moiroux
d4c4a2517f Fix instructions for running conformance tests
- The server-servlet app depends on mcp, which must be either installed
  or included in the compile artifact for `mvn exec:java` to pick it up.
- Change the build instructions to build from root, use a `-pl` flag to
  target the servlet app.
- Disable the exec plugin from the root pom.

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-03-02 11:56:39 +01:00
Daniel Garnier-Moiroux
81a18ed02e Client Auth Conformance Tests - change parent POM (#827)
- Small javaformat fixes
- Closes gh-827

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-03-02 11:33:09 +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
29dc2509ce Excplude the conformance projects from maven deploy
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2026-02-20 22:31:01 +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
Daniel Garnier-Moiroux
5b99cd600e
Conformance testing: add app to test auth suite (#806)
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-20 17:53:57 +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
Daniel Garnier-Moiroux
8549e36dfc Conformance testing: host validation
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-12 11:00:42 +01:00
Daniel Garnier-Moiroux
5ed6063a07 Update conformance tests with DNS rebinding protection
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-05 10:20:27 +01:00
Daniel Garnier-Moiroux
96c9bbe745 Add Origin header validation
- Fixes #695
- Does not implement Host header validation yet

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2026-02-05 10:20:27 +01:00
Dariusz Jędrzejczyk
4fe8f3efef
Add MCP conformance tests with client and server test suites (#767)
Implement conformance testing modules with comprehensive client/server test scenarios,
sync conversion for client/servlet code, CI integration, and documentation updates.

---------

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
2026-01-30 15:51:19 +01:00