Conformance
Validates this implementation against the official https://github.com/modelcontextprotocol/conformance[Model
Context Protocol conformance suite], both the stateless 2026-07-28 protocol and the legacy 2025-11-25 one.
The conformance module boots a runnable server - http://localhost:8080/mcp
- exposing a representative set of features the suite drives by name:
-
tools: plain text, erroring, content blocks (image, audio, embedded resource, several at once), one reporting
notifications/progress, one exercising the implicit JSON-Schema 2020-12 input conversion (json_schema_2020_12_tool), one receiving its message through anMcp-Param-*header (test_x_mcp_header), and the MRTR ones returninginput_required(elicitation, sampling, roots, tampered and multi-roundrequestState); -
a prompt (
test_simple_prompt,test_prompt_with_arguments, ...), resources and resource templates, argument completion, and a long-running tool (long/running) returning anio.modelcontextprotocol/taskshandle the suite polls withtasks/get/tasks/update/tasks/cancel.
Beyond the spec methods it also exposes SEP-2575 diagnostic tools the suite drives by name:
| Tool | What it checks |
|---|---|
|
|
requires the |
|
|
echoes whether the client declared the |
|
|
a plain tool which sends no logging records. |
|
|
pushes |
|
|
pushes |
On the stateless protocol the stream subscriptions/listen acknowledges its commitment with a notifications/subscriptions/acknowledged notification, and server/discover carries the server identity both top-level and in _meta.io.modelcontextprotocol/serverInfo.
Run the server
mvn package -pl conformance exec:exec
The conformance server is the one the suite is validated against: it exposes every tool the checks drive by name. The demo module (mvn package -pl demo exec:exec) is a smaller, human-friendly example of the same server stack - same route, both eras - but without the suite's diagnostic tools, so it is not a target for the suite.
The server listens on http://localhost:8080/mcp
, serving both eras on the same route: a client sending the stateless per-request _meta.io.modelcontextprotocol/protocolVersion - served statelessly - and a client doing an initialize handshake.
Run the suite
Start the server in one terminal, then in another:
npx @modelcontextprotocol/conformance server \
--url http://localhost:8080/mcp \
--spec-version 2026-07-28 \
--suite all \
--verbose
|
NOTE
|
as of 2026-08-09 the latest MCP release (the stateless |
The conformance runner is a stateless client, so it probes the server with server/discover and drives every method with the negotiated version. --spec-version selects the protocol revision the runner talks:
| --spec-version | What is validated |
|---|---|
|
|
the stateless protocol: required |
|
|
the legacy handshake and session-backed protocol. |
|
TIP
|
pass |
What to look at on a failure
Most of the new feature surface is driven here, so a failure usually points at a specific area:
-
_meta/version: a failingserver/discover,tools/*orprompts/*check on the stateless path means the2026-07-28envelope diverges - required namespaced_meta(see Transport ) - while a failing legacyinitialize/session check means the2025-11-25handshake path diverges (see Configuration ). -
dns-rebinding-protection: the server must accept a legacyinitializeeven when the runner adds anMcp-Methodheader to a legacy request - the explicitMCP-Protocol-Versionheader (a legacy version) must win over theMcp-Methodheuristic, andHost/Originloopback validation must answer403for a non-loopback host (see Transport ). -
tools-call-with-progress: the suite sends the progress token as the bare_meta.progressTokenkey (the MCP way), not theio.modelcontextprotocol/progressTokenone - a server that only reads the namespaced key echoesprogressToken: "null"and the check reports No progress notifications received. -
tools-call-with-logging,tools-call-sampling,tools-call-elicitation,elicitation-sep1034-defaults,elicitation-sep1330-enums: these drive tools by name (test_tool_with_logging,test_sampling,test_elicitation, ...). A-32602 Unknown tool '...'means the conformance server does not expose them; sampling/elicitation must also work server to client over the session SSE stream. -
json-schema-2020-12: the input schemas must survivetools/listwith the 2020-12 vocabulary ($defs,$ref,enum,const,if/then/else,additionalProperties) intact - seeDescriptorService. -
the conformance module pins
fusion.mcp.requestStateSecretso the MRTRrequestStateintegrity checks run as they would in production.