fix(deps): cap mcp below 2.0 — 2.0.0 removed mcp.client.websocket - #763
Merged
Conversation
Every PR opened after 2026-07-28T13:45 fails CI with 26 collection errors:
ModuleNotFoundError: No module named 'mcp.client.websocket'
ERROR tests/test_mcp_transport.py
ERROR tests/test_mcp_auth.py
… 24 more
Interrupted: 26 errors during collection
in files the PR never touched. The bound was open-ended (``mcp>=1.27.0``),
so CI resolved mcp 2.0.0 the day it published. 2.0.0 is a restructure that
removed ``mcp.client.websocket``, which ``src/services/mcp/transport.py:30``
imports ``websocket_client`` from.
Timeline:
2026-07-28T08:12 PR #761 CI passes (mcp 1.28.1)
2026-07-28T13:45 mcp 2.0.0 published
2026-07-29T05:06 PR #762 CI fails, 26 errors (mcp 2.0.0)
Verified in a clean venv: 2.0.0 has no ``mcp.client.websocket`` (and no
``experimental``; ``_transport``/``caching``/``subscriptions`` are new),
while ``mcp>=1.27.0,<2`` resolves 1.29.0, which still ships the module and
imports fine against the already-declared ``websockets>=14.0``.
Lifting the cap is a migration, not a bump — the 2.x client internals are
renamed throughout, and the websocket transport has to be either ported or
explicitly dropped. Separate branch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Test Results 1 files 1 suites 8m 4s ⏱️ Results for commit 5080955. ♻️ This comment has been updated with latest results. |
The pyproject.toml cap alone did not fix CI, because CI never reads
pyproject.toml:
ci.yml:39 pip install -r requirements.dev.txt
requirements.dev.txt:4 -r requirements.txt
requirements.txt:14 mcp>=1.27.0 <- the bound that actually resolved
pyproject.toml is packaging metadata for the PyPI build; the CI environment
comes from requirements.txt. Both carry their own mcp bound, so both need
the cap or the two disagree — which is exactly how the first attempt at this
fix still resolved 2.0.0 and failed identically.
Verified by installing requirements.txt into a clean venv: resolves mcp
1.29.0 and ``from mcp.client.websocket import websocket_client`` succeeds.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ericleepi314
added a commit
that referenced
this pull request
Jul 29, 2026
CI installs from requirements.txt, which #763 capped; without this the image-paste PR keeps failing on the unrelated mcp 2.0.0 collection errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every PR opened since 2026-07-28T13:45 fails CI, in files the PR never touched:
Cause
The bound was open-ended —
mcp>=1.27.0— so CI resolvedmcp 2.0.0the day it published. 2.0.0 is a restructure that removedmcp.client.websocket, whichsrc/services/mcp/transport.py:30importswebsocket_clientfrom.mcp 2.0.0publishedNothing in the failing PR touched MCP or any dependency file. A no-op PR opened right now would fail identically.
Verified in clean venvs
Note
experimentalis also gone and_transport/caching/subscriptionsare new — this is a genuine 2.x restructure, not a rename or two.Why a cap and not a migration
Lifting the cap means porting the client internals and deciding the fate of the websocket transport. That's its own branch with its own review. This change unblocks CI with a one-line bound and a comment recording why, so the next person doesn't just widen it again.
tests/test_mcp_transport.py+tests/test_mcp_string_utils.py: 29 passed locally on the pinned resolve.🤖 Generated with Claude Code