Skip to content

[bug] Support streamable_http_client transport for MCP SDK v2 #2837

@punitmahes

Description

@punitmahes

Describe the bug
The MCP SDK has renamed streamablehttp_client to streamable_http_client in version 2 (mcp>=2.0). This change causes the OpenInference MCP instrumentation to silently fail to instrument Streamable HTTP connections, as the post-import hook is looking for the old module and attribute names.

To Reproduce
Steps to reproduce the behavior:

  1. Install an MCP SDK version 2.0 or greater (mcp>=2.0).
  2. Run an application using streamable_http_client for MCP connections with OpenInference MCP instrumentation enabled.
  3. Observe that Streamable HTTP interactions are not being traced or captured by the observability backend.

Expected behavior
The instrumentation should successfully locate and wrap the streamable_http_client transport provided by the newer MCP SDKs and successfully trace the streamable HTTP connections.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [Your OS, e.g., macOS]
  • Version: [Your Version]

Additional context
The fix simply requires updating the string literals referencing streamablehttp_client to streamable_http_client in src/openinference/instrumentation/mcp/__init__.py and the corresponding tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginstrumentationAdding instrumentations to open source packagestriageIssues that require triage

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions