Skip to content

Forward Mcp-Name header in the McpTransportContext for extension validation #1317

Description

@Kehrlann

Tasks may want to validate HTTP headers. For example, SEP-2663 Tasks mandates, in Streamable HTTP routing headers:

When tasks/get, tasks/update, or tasks/cancel is sent over the Streamable HTTP transport, the client MUST set the Mcp-Name header (defined by SEP-2243) to the value of params.taskId

In that case, the taskId is in the request params, which would likely be interpreted at the Feature level, similar to x-mcp-header in #1199.

Passing headers to features can be accomplished with a context extractor at the transport-level, but that defeats the server / transport separation. Mcp-Method is validated in the transport already for every method, so we do not need to pass it down, but we should extract, decode and pass the Mcp-Name header if present.

Activity

  1. added this to the 2.2.0-M3 milestone on Nov 6, 2026
  2. added
    P2Moderate issues affecting some users, edge cases, potentially valuable feature
    on Nov 6, 2026
  3. media-ctrl commented on Nov 8, 2026

    @media-ctrl
  4. neerajbhatt commented on Nov 8, 2026

    @neerajbhatt
    Contributor

    Hi @Kehrlann , I’ll start working on #1317. I previously contributed to the servlet header handling in #982. I’ll look at how the modern server HTTP transport handles Mcp-Name, add the context propagation and focused tests, and link the PR here when it’s ready.

  5. Kehrlann commented on Nov 9, 2026

    @Kehrlann
    ContributorAuthor

    Hey @neerajbhatt please go ahead.

  6. added 3 commits that reference this issue on Nov 13, 2026
    c04c159
    36f3bd4
    5a2314e
  7. added a commit that references this issue on Nov 15, 2026
    2217953
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Moderate issues affecting some users, edge cases, potentially valuable featurearea/serverarea/transportmodernv3 covering the 2026-07-28 spec

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions