Skip to content

http-custom-header-server-validation: no case sends an empty x-mcp-header value #519

Description

@po-et

The http-custom-header-server-validation scenario never sends an empty string for the annotated parameter, so a server that treats an empty Mcp-Param-* header as missing still passes. The client half is already covered: http-custom-headers sends empty_val: '' and expects the header to arrive present and empty.

The Go SDK server had exactly this bug (modelcontextprotocol/go-sdk#1288). I tried adding one more accept case to the existing scenario, with body "" and an empty header. go-sdk's current main fails it (10/11), and the fix in go-sdk#1289 passes 11/11. Happy to open the PR if you want this.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions