Skip to content

fix(server): accept metadata on stateful initialize - #507

Open
lucarlig wants to merge 1 commit into
modelcontextprotocol:mainfrom
lucarlig:user/luca/fix-stateful-initialize-meta
Open

lucarlig wants to merge 1 commit into
modelcontextprotocol:mainfrom
lucarlig:user/luca/fix-stateful-initialize-meta

Conversation

@lucarlig

Copy link
Copy Markdown
Contributor

Summary

  • classify initialize by its negotiated session-era protocol version before stateless metadata validation
  • allow optional RequestParams._meta on stateful initialization
  • add an integration regression test for the request shape emitted by MCP Python SDK 2.x

Closes #506.

Validation

  • npm run check
  • npm test (623 tests)
  • npm run build

Route initialize requests by their negotiated session-era protocol version even when optional request metadata is present. Add an integration regression test for the Python SDK 2.x request shape.\n\nCloses modelcontextprotocol#506.

Signed-off-by: lucarlig <luca.carlig@ibm.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@507

commit: bd34464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Everything-server rejects valid _meta on stateful initialize

1 participant