Skip to content

fix(sep-2243): scope Mcp-Method to requests only; add Base64 Mcp-Name checks#350

Open
pja-ant wants to merge 1 commit into
mainfrom
sep-2243-standard-headers-2891
Open

fix(sep-2243): scope Mcp-Method to requests only; add Base64 Mcp-Name checks#350
pja-ant wants to merge 1 commit into
mainfrom
sep-2243-standard-headers-2891

Conversation

@pja-ant

@pja-ant pja-ant commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Aligns the SEP-2243 standard-header checks with the spec change in modelcontextprotocol/modelcontextprotocol#2891.

Summary

  • Mcp-Method scope (correctness fix): the spec now requires Mcp-Method on requests only; header rules for notification POSTs are explicitly undefined. HttpStandardHeadersScenario no longer emits a check row for notification POSTs and drops notifications/initialized from the expected-method list.
  • New client check sep-2243-client-base64-mcp-name: the mock server advertises a tool named tööl_unicode (non-ASCII). When the client under test calls it, the scenario asserts Mcp-Name is wrapped as =?base64?{b64(utf8(name))}?=. Emits SKIPPED if the client never calls the tool.
  • New server check sep-2243-server-decode-base64-mcp-name: HttpHeaderValidationScenario sends a tools/call whose Mcp-Name header is the Base64-sentinel encoding of the body's params.name and asserts the server accepts it (no 400, no JSON-RPC error).
  • Adds both new check IDs to src/seps/sep-2243.yaml with the MUST sentences from the #2891 spec diff.

New check IDs

  • sep-2243-client-base64-mcp-name
  • sep-2243-server-decode-base64-mcp-name

Testing

  • npx tsc --noEmit clean
  • npm test — 296 passed (including 3 new negative tests in http-standard-headers.test.ts)
  • npm run lint clean

https://claude.ai/code/session_01Gbqx5LodtAghT5fRYFxeja

… checks

Aligns the SEP-2243 standard-header checks with the spec change in
modelcontextprotocol/modelcontextprotocol#2891:

- Mcp-Method is now required on requests only (header rules for
  notification POSTs are explicitly undefined). The client scenario no
  longer emits a check row for notification POSTs and drops
  notifications/initialized from the expected-method list.
- New client check sep-2243-client-base64-mcp-name: the mock server now
  advertises a tool with a non-ASCII name and asserts the client wraps
  Mcp-Name as =?base64?{b64(utf8(name))}?= when calling it.
- New server check sep-2243-server-decode-base64-mcp-name: sends a
  tools/call with a Base64-sentinel-encoded Mcp-Name that decodes to
  params.name and asserts the server accepts it.
- Adds both new check IDs to src/seps/sep-2243.yaml with the MUST
  sentences from the spec diff.

Claude-Session: https://claude.ai/code/session_01Gbqx5LodtAghT5fRYFxeja
@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 5d786c1

@pja-ant pja-ant marked this pull request as ready for review June 18, 2026 15:21
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.

1 participant