fix(copaw): pin mcp below 2.0.0 in copaw-worker - #1215
Merged
Conversation
mcp 2.0.0 renamed the client entrypoint streamablehttp_client to streamable_http_client. copaw 1.0.2 still imports the legacy name at worker startup, so any fresh image build resolving mcp>=1.13 to the 2.x line (2.1.1 since 2026-08-25) crashes every copaw worker with ImportError. The qwenpaw chain is unaffected because agentscope 2.x pins mcp<2.0.0. Cap copaw-worker's implicit mcp requirement at the 1.x line so CI integration tests (copaw->qwenpaw migration, copaw runtime shards) resolve mcp 1.29.1 again.
shiyiyue1102
approved these changes
Sep 2, 2026
shiyiyue1102
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. This isolates the CoPaw/MCP compatibility hotfix into a focused dependency PR. The copaw-worker build confirms that both installation paths end with mcp 1.29.1, and all affected integration shards are green again.
After this merges, #1208–#1212 should be rebased to drop their duplicated copy of the same dependency patch.
LGTM。本 PR 将 CoPaw/MCP 兼容性热修复独立成了范围清晰的依赖 PR。copaw-worker 构建日志确认两条安装路径最终都使用 mcp 1.29.1,此前受影响的集成测试分片也已全部恢复绿色。
Contributor
Author
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.
What
Adds one constraint to
copaw-workerdependencies (copaw/pyproject.toml):"mcp>=1.13,<2.0.0",Why
mcp.client.streamable_http.streamablehttp_client→streamable_http_client(breaking rename;verified against the published
mcp-2.1.1wheel source).copaw 1.0.2(PyPI) still imports the legacy name unconditionally at worker startup(app MCP client module, line 9:
from mcp.client.streamable_http import streamablehttp_client).copaw-worker 1.0.3 → copaw 1.0.2 → agentscope 1.0.18 → mcp>=1.13.so every CoPaw worker container crashes at startup:
ImportError: cannot import name 'streamablehttp_client' from 'mcp.client.streamable_http'(container exits 1 within ~4s).
Evidence (CI, 2026-09-01)
Collecting mcp>=1.13 (from agentscope==1.0.18->copaw==1.0.2->copaw-worker==1.0.3)→
Downloading mcp-2.1.1-py3-none-any.whl.copaw→qwenpaw migration test:
Unable to create CoPaw runtime state+ 3 cascading assertions(state not persisted / not active / incomplete); the copaw/copaw shard additionally loses the
team lifecycle tests (workers run the default copaw runtime → crash loop).
pip install --dry-run copaw==1.0.2→ mcp-2.1.1; with the added cap → mcp-1.29.1.
mcp<2.0.0viaagentscope 2.0.4.post1(resolves 1.29.1); manager-qwenpaw uses the same chain;openclaw/hermes workers do not import the legacy name.
Fix
A single dependency line. pip intersects it with agentscope's
mcp>=1.13, so resolutionreturns 1.29.1 (the last 1.x line — the version CI has been green on). The constraint is in
copaw-worker itself, so it covers both venvs of the copaw-worker image (standard = copaw
from PyPI, lite = GitHub fork).
No code changes; no behavior change for correctly-running workers.
Test plan
build-images (copaw-worker)resolvesmcp 1.29.1.改了什么
copaw-worker依赖(copaw/pyproject.toml)加一行上限:"mcp>=1.13,<2.0.0",为什么
mcp.client.streamable_http.streamablehttp_client→streamable_http_client(已对照发布的
mcp-2.1.1wheel 源码验证)。copaw 1.0.2(PyPI)启动时仍无条件 import 旧名(应用 MCP 客户端模块第 9 行)。copaw-worker 1.0.3 → copaw 1.0.2 → agentscope 1.0.18 → mcp>=1.13。导致所有 CoPaw worker 容器启动即崩:
ImportError: cannot import name 'streamablehttp_client' from 'mcp.client.streamable_http'(容器 ~4 秒内 exit 1)。
证据(CI,2026-09-01)
Collecting mcp>=1.13 (from agentscope==1.0.18->copaw==1.0.2->copaw-worker==1.0.3)→
Downloading mcp-2.1.1-py3-none-any.whl。copaw→qwenpaw 迁移测试失败(
Unable to create CoPaw runtime state+ 3 条级联断言);copaw/copaw shard 另挂团队生命周期测试(worker 默认 copaw runtime → 崩溃重启循环)。
agentscope 2.0.4.post1pinmcp<2.0.0(解析 1.29.1);manager-qwenpaw 同链;openclaw/hermes worker 不 import 旧名。
修复方式
一行依赖约束。pip 与 agentscope 的
mcp>=1.13求交集 → 解析回 1.29.1(1.x 末版,CI 一直绿的版本)。约束放在 copaw-worker 自身,
因此同时覆盖镜像的两个 venv(standard = PyPI copaw,lite = GitHub fork)。
无代码改动;对正常运行的 worker 无行为变化。
验证
build-images (copaw-worker)解析出mcp 1.29.1。