Skip to content

fix(deps): cap mcp below 2.0 — 2.0.0 removed mcp.client.websocket - #763

Merged
ericleepi314 merged 2 commits into
mainfrom
fix/pin-mcp-below-2
Jul 29, 2026
Merged

fix(deps): cap mcp below 2.0 — 2.0.0 removed mcp.client.websocket#763
ericleepi314 merged 2 commits into
mainfrom
fix/pin-mcp-below-2

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Every PR opened since 2026-07-28T13:45 fails CI, in files the PR never touched:

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

Cause

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.

when what mcp
2026-07-28T08:12 PR #761 CI passes 1.28.1
2026-07-28T13:45 mcp 2.0.0 published
2026-07-29T05:06 PR #762 CI fails, 26 collection errors 2.0.0

Nothing in the failing PR touched MCP or any dependency file. A no-op PR opened right now would fail identically.

Verified in clean venvs

mcp 2.0.0  -> submodules: _input_required _memory _probe _transport auth caching
                          client context extension session session_group sse
                          stdio streamable_http subscriptions
              websocket_client GONE: ModuleNotFoundError

mcp>=1.27.0,<2 -> resolves 1.29.0, websocket_client imports OK
                  (against the already-declared websockets>=14.0)

Note experimental is also gone and _transport/caching/subscriptions are 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

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>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Test Results

    1 files      1 suites   8m 4s ⏱️
8 993 tests 8 987 ✅ 6 💤 0 ❌
9 239 runs  9 233 ✅ 6 💤 0 ❌

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
ericleepi314 merged commit 544e30c into main Jul 29, 2026
3 checks passed
@ericleepi314
ericleepi314 deleted the fix/pin-mcp-below-2 branch July 29, 2026 05:23
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.
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.

1 participant