-
Notifications
You must be signed in to change notification settings - Fork 207
[bug] Support streamable_http_client transport for MCP SDK v2 #2837
Description
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:
- Install an MCP SDK version
2.0or greater (mcp>=2.0). - Run an application using
streamable_http_clientfor MCP connections with OpenInference MCP instrumentation enabled. - 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
Labels
Type
Projects
Status