modelcontextprotocol / modelcontextprotocol/conformance
Add SEP-2575 conformance tests
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 127
- Forks
- 101
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
Add conformance tests for SEP-2575 to validate the stateless-MCP behavior. This includes conformance tests for both MCP server and client.
Server
- Per-request _meta
- Rejects request with missing _meta → -32602 Invalid params.
- Rejects request with _meta missing io.modelcontextprotocol/protocolVersion.
- Rejects request with _meta missing io.modelcontextprotocol/clientInfo.
- Rejects request with _meta missing io.modelcontextprotocol/clientCapabilities.
- server/discover
- Responds to server/discover
- Response includes required fields: supportedVersions (non-empty), capabilities, serverInfo
- capabilities matches what the server honors on real RPC calls
- Version negotiation
- For a _meta.protocolVersion the server does not support, returns UnsupportedProtocolVersionError (not Invalid params and not silent rejection).
- UnsupportedProtocolVersionError carries non-empty data.supportedVersions matching the set advertised by server/discover (no drift).
- server/discover's supportedVersions matches the set the server actually accepts on real RPC calls (no drift).
- Returns the error even when the unsupported version is on the server/discover request itself (and still advertises supportedVersions so the client can recover).
- [HTTP] UnsupportedProtocolVersionError → HTTP 400 Bad Request.
- [HTTP] Rejects request when MCP-Protocol-Version header is absent or does not match _meta.protocolVersion (HTTP 400).
- Errors
- MissingRequiredClientCapabilityError (-32003) carries data.requiredCapabilities listing missing keys.
- All error responses carry the request's JSON-RPC id.
- Removed RPCs
- ping → -32601.
- logging/setLevel → -32601.
- resources/subscribe → -32601.
- resources/unsubscribe → -32601.
- HTTP transport
- Unknown method → HTTP 404 Not Found + JSON-RPC -32601.
- MissingRequiredClientCapabilityError → HTTP 400 Bad Request.
Client
- Per-request _meta
- Populates _meta on every request with all three required fields.
- Accurately reports clientCapabilities per request (does not claim unsupported features).
- server/discover
- Should be able to call
- Version negotiation
- Does version negotiation correctly
- Includes io.modelcontextprotocol/protocolVersion in _meta on every request.
- Sends a consistent protocolVersion once chosen (does not flip between versions request-to-request).
- [HTTP] Sends MCP-Protocol-Version header on every request, equal to _meta.protocolVersion.
- Cancellation
- [HTTP] Cancels by closing the stream (request).
- [STDIO] Cancels by sending notifications/cancelled with the request id.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing server and client conformance-test entry points in the TypeScript repository, then review the SEP-2575 requirements for per-request _meta, server/discover, version negotiation, errors, removed RPCs, HTTP, and cancellation. Done means coverage exists for the listed server and client behavior across HTTP and STDIO, including the specified JSON-RPC and HTTP errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100