modelcontextprotocol / modelcontextprotocol/conformance

Everything-server rejects valid _meta on stateful initialize

Open
#506 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
127
Forks
101
Avg merge
6d 1h
Merged PRs (30d)
7

Description

Problem

The TypeScript everything-server misclassifies a stateful initialize request as stateless whenever params._meta is present. It rejects a valid 2025-11-25 request with HTTP 400 and -32020 Missing MCP-Protocol-Version header.

InitializeRequestParams extends RequestParams in the 2025-11-25 schema, so _meta is allowed on initialize. MCP Python SDK 2.x currently emits _meta: {} there, which makes the conformance fixture unusable as an upstream server for that client.

Reproduction

Start the fixture:

npx tsx examples/servers/typescript/everything-server.ts

Then send:

curl -i -X POST http://127.0.0.1:3000/mcp \
  -H 'Accept: application/json, text/event-stream' \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"probe","version":"1"},"_meta":{}}}'

Observed:

{"jsonrpc":"2.0","id":1,"error":{"code":-32020,"message":"Missing MCP-Protocol-Version header"}}

The same request succeeds when _meta is omitted.

Suggested fix

Route initialize through the stateful transport when params.protocolVersion names a session-era protocol, independently of whether optional request metadata is present. Add an integration regression test that sends _meta: {} to the everything-server and asserts a successful initialize response.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/servers/typescript/everything-server.ts and reproduce the request using the provided npx and curl commands. Trace how initialize requests with params._meta are classified, then add the integration regression test described in the issue; done means the _meta: {} request returns a successful initialize response instead of HTTP 400.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.