Skip to content

fix: MCP request context does not expose per-request _meta for progress notifications #8062

Description

@lloydrichards

Problem

MCP handlers need the metadata from the current request to read values such as progressToken. The server client context currently exposes initialization data, but not the current request's _meta.

The external tools-call-with-progress conformance scenario exposes this gap.

Observed behavior

A tool handler cannot obtain the active call's progress token through McpRequestContext, so it cannot associate notifications/progress messages with the request being processed.

Expected behavior

The invocation context should expose the decoded metadata belonging to the current request. A tool should be able to read the supplied progress token and emit correctly correlated progress notifications.

Regression coverage

Add an adapter test that initializes a client, calls a tool with a distinct _meta.progressToken, and asserts that the handler sees that call-level token rather than initialization metadata or undefined.

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