MCP Server Error

I get the following error when I try to connect:
Traceback (most recent call last): File “/home/jovyan/work/L4/mcp_project/research_server.py”, line 6, in from mcp.server.fastmcp import FastMCP ModuleNotFoundError: No module named ‘mcp.server.fastmcp’

Traceback (most recent call last): File “/home/jovyan/work/L4/mcp_project/research_server.py”, line 6, in from mcp.server.fastmcp import FastMCP ModuleNotFoundError: No module named ‘mcp.server.fastmcp’

Traceback (most recent call last): File “/home/jovyan/work/L4/mcp_project/research_server.py”, line 6, in from mcp.server.fastmcp import FastMCP ModuleNotFoundError: No module named ‘mcp.server.fastmcp’

Traceback (most recent call last): File “/home/jovyan/work/L4/mcp_project/research_server.py”, line 6, in from mcp.server.fastmcp import FastMCP ModuleNotFoundError: No module named ‘mcp.server.fastmcp’

1 Like

Figured this out. There have been breaking changes to the MCP SDK since this tutorial. You need to do these two things.
1)update the version of MCP
2)change the code:
from mcp.server import MCPServer

PAPER_DIR = “papers”

Initialize FastMCP server

mcp = MCPServer(“research”)

1 Like

Please concentrate your comments io this course in one thread. It will be easier to track that way.

1 Like

This is because uv add mcp now installs mcp 2.0.0, which removed mcp.server.fastmcp.

Fix

cd ~/work/L4/mcp_project
source .venv/bin/activate
uv add "mcp>=1.2,<2"
uv run python -c "from mcp.server.fastmcp import FastMCP; print('ok')"

When that prints ok, restart the inspector:

npx @modelcontextprotocol/inspector uv run research_server.py

Cheers !

1 Like

Thanks everyone for reporting, suggesting solutions and mostly for your patience! Updates have been pushed to production for all notebooks.

Note: You may still see some non-blocking warnings in the terminal (npm engine warnings, a pydantic-settings warning) — these don’t stop the lessons from working, just noisy output

Quick status: the errors you’ve been hitting (mcp.server.fastmcp import errors, McpError import errors, tool_use/tool_result mismatches) are due to a breaking update released by MCP on 2026-07-28, which changed parts of the SDK the course was originally built against. This isn’t something on your end — the environment genuinely needs a few extra steps beyond what’s shown in the videos to keep working with today’s package versions.

We’ve pushed markdown notes to L3, L4, L6, and L7 with the exact commands needed to get things running again. Please check those notebooks for the updated instructions.

Happy Learning!

Lesly - DLAI

1 Like