fix(sep-2243): scope Mcp-Method to requests only; add Base64 Mcp-Name checks#350
Open
pja-ant wants to merge 1 commit into
Open
fix(sep-2243): scope Mcp-Method to requests only; add Base64 Mcp-Name checks#350pja-ant wants to merge 1 commit into
pja-ant wants to merge 1 commit into
Conversation
… 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
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aligns the SEP-2243 standard-header checks with the spec change in modelcontextprotocol/modelcontextprotocol#2891.
Summary
Mcp-Methodscope (correctness fix): the spec now requiresMcp-Methodon requests only; header rules for notification POSTs are explicitly undefined.HttpStandardHeadersScenariono longer emits a check row for notification POSTs and dropsnotifications/initializedfrom the expected-method list.sep-2243-client-base64-mcp-name: the mock server advertises a tool namedtööl_unicode(non-ASCII). When the client under test calls it, the scenario assertsMcp-Nameis wrapped as=?base64?{b64(utf8(name))}?=. Emits SKIPPED if the client never calls the tool.sep-2243-server-decode-base64-mcp-name:HttpHeaderValidationScenariosends atools/callwhoseMcp-Nameheader is the Base64-sentinel encoding of the body'sparams.nameand asserts the server accepts it (no 400, no JSON-RPC error).src/seps/sep-2243.yamlwith the MUST sentences from the #2891 spec diff.New check IDs
sep-2243-client-base64-mcp-namesep-2243-server-decode-base64-mcp-nameTesting
npx tsc --noEmitcleannpm test— 296 passed (including 3 new negative tests inhttp-standard-headers.test.ts)npm run lintcleanhttps://claude.ai/code/session_01Gbqx5LodtAghT5fRYFxeja