Skip to content

'Accept' Content-Types don't support wildcards #290

@RileyNorton

Description

@RileyNorton

Describe the bug
When making calls to the Streamable HTTP Transport JSON RPC endpoint, wildcards aren't supported as valid content types.

To Reproduce
Steps to reproduce the behavior:

  1. Call StreamableHTTP Transport MCP Server with Accept: */* (e.g. using Postman default).
  2. MCP Server responds with 401 status and the following body: Accept must contain both 'application/json' and 'text/event-stream'.

Expected behavior
I would expect the */*, text/*, and application/* values for the Accept header to imply the respective application/json and text/event-stream values. See the Mozilla docs on this header's syntax here.

Additional context
I'd love to make a short PR adding this to the switch statement at mcp/streamable.go:100. It would be my first open source contribution. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedGood candidate for contribution. Comment first to say you're working on it.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions