Skip to content

fix: support MCP 2 transport APIs - #89

Draft
rohitsalla wants to merge 1 commit into
grll:mainfrom
rohitsalla:fix/mcp-v2-streamable-http
Draft

fix: support MCP 2 transport APIs#89
rohitsalla wants to merge 1 commit into
grll:mainfrom
rohitsalla:fix/mcp-v2-streamable-http

Conversation

@rohitsalla

Copy link
Copy Markdown

Summary

  • use the MCP 2.x streamable_http_client API while retaining the MCP 1.x fallback
  • register the legacy WebSocket transport only when the installed MCP SDK provides it
  • exercise the core transport integration tests against MCP 2.x in CI
  • make the SSE and Streamable HTTP test servers compatible with both MCP server APIs

Root cause

MCP 2.0 renamed streamablehttp_client to streamable_http_client and removed the non-standard WebSocket client module. Importing either legacy symbol unconditionally prevented mcpadapt.core from loading, including for unaffected stdio, SSE, and Streamable HTTP users.

Validation

  • MCP 1.x core suite: 18 passed
  • MCP 2.x applicable core suite: 14 passed, 4 WebSocket tests deselected
  • ruff check src/mcpadapt/core.py tests/test_core.py
  • ruff format --check src/mcpadapt/core.py tests/test_core.py

Fixes #88

Signed-off-by: Rohit Salla <87137863+rohitsalla@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breaking changes with mcp >= 2.0

1 participant