Skip to content

SEP-2243: ServerRejectsMissingMethodHeader contradicts TypeScript SDK behavior #323

@caomengxuan666

Description

@caomengxuan666

Description

The http-header-validation scenario's ServerRejectsMissingMethodHeader test sends a POST request without Mcp-Method header and expects the server to reject it with HTTP 400 + JSON-RPC error code -32001.

However, all other conformance scenarios (tools-list, tools-call-*, resources-*, prompts-*, etc.) use connectToServer() which creates a TypeScript SDK StreamableHTTPClientTransport — and this client does not send Mcp-Method headers.

This means:

  • If a server implements SEP-2243 correctly (rejects missing Mcp-Method), all SDK-backed scenarios fail (32+ failures)
  • If a server makes Mcp-Method optional (to be compatible with the TypeScript SDK), the ServerRejectsMissingMethodHeader test fails

The conformance suite is self-contradictory: it tests a MUST requirement that the reference client implementation doesn't satisfy.

Expected behavior

Either:

  1. The TypeScript SDK should send Mcp-Method (and Mcp-Name) headers per SEP-2243, OR
  2. The ServerRejectsMissingMethodHeader test should be downgraded from FAILURE to WARNING, since the reference client itself doesn't comply

Current C++ SDK result

With Mcp-Method optional (matching TypeScript SDK behavior): 108 passed, 1 failed
With Mcp-Method required (matching SEP-2243 spec): 64 passed, 32 failed

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions