Skip to content

Streamable HTTP server accepts unsafe integer in x-mcp-header field when mirrored header is absent #2689

Description

@ev253

The current Streamable HTTP specification says x-mcp-header integer values must be within the JavaScript safe-integer range.

In an exact-byte server probe, a tools/call with an annotated integer argument of 9007199254740992 and no matching Mcp-Param-* header returns success and invokes the handler. The server cannot produce a canonical primitive header representation and skips parity validation instead of rejecting the request.

Expected behavior: reject before handler invocation.

We can provide a minimized reproduction and exact package/version matrix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions