The problem
The course was written for version 1.x of the mcp Python package. The project’s pyproject.toml doesn’t set an upper limit on that version, so uv now installs mcp 2.0, which renamed and moved things. The lesson code no longer matches the library.
You’ll see some or all of these:
Error 'Tool' object has no attribute 'inputSchema'
ModuleNotFoundError: No module named 'mcp.server.fastmcp'
Error connecting to research: Connection closed
ImportError: cannot import name 'McpError' from 'mcp.shared.exceptions'
Error connecting to fetch: Connection closed
Three different messages, one cause: mcp 2.0.
The fix
Open the terminal in the notebook and run:
cd ~/work/L7/mcp_project
uv add "mcp>=1.2,<2"
The <2 is the important part — it keeps you on the 1.x version the course expects. You should see it install mcp==1.29.0.
The fetch server is installed separately by uvx, so it needs the same limit.
Open /L7/mcp_project/server_config.json and change the fetch entry to:
"fetch": {
"command": "uvx",
"args": ["--with", "mcp<2", "mcp-server-fetch"]
}
Then clear the old cached copy and run again:
uv cache clean
uv run mcp_chatbot.py
Cheers !

