Commit 023e171
fix(tutorials): pin mcp<2 for uvx-spawned MCP servers in 020_state_machine
mcp 2.0.0 renamed `McpError` to `MCPError` and split types out into a
separate `mcp_types` package. `mcp-server-time` and `mcp-server-fetch`
still import the 1.x name, so both now die at import:
ImportError: cannot import name 'McpError' from 'mcp.shared.exceptions'
... -> mcp.shared.exceptions.McpError: Connection closed
uvx builds each server its own isolated environment and resolves `mcp`
unpinned there, so the `mcp==1.23.0` this project installs does not apply.
With every server dead the deep research agent emits "Starting deep
research..." and then makes zero tool calls, so test_agent.py's
`uses_tool_requests` assertion fails (and the streaming test times out
waiting for the same content).
This is why the job passed at 03:48 today and failed at 14:08 with no
code change in between: mcp 2.0.0 landed in the gap.
Constraining uvx to mcp<2 restores all three servers. Verified by
completing an MCP initialize + tools/list handshake against the exact
argv this file now produces:
mcp-server-time tools=['get_current_time', 'convert_time']
openai-websearch-mcp tools=['openai_web_search']
mcp-server-fetch tools=['fetch']
The 30s test timeout is left alone; both tests passed in 21.1s total
when the servers worked.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent acbb9d4 commit 023e171
1 file changed
Lines changed: 10 additions & 3 deletions
File tree
- examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
23 | | - | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
30 | | - | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
0 commit comments