Does mcp-agent work with the mcp 2.x SDK?
No: mcp-agent 0.2.6 failed at startup with the mcp 2.x Python SDK in our 2026-11-12 UTC retest, with No module named 'mcp.server.fastmcp' (SDK 2.x retest results). With mcp<2 pinned, the SDK error went away; result: past the import; did not list tools on a plain launch. This is the result from that test date; a newer release may already pin or fix it.
Tested 2026-11-12 UTC
Evidence
- Error with mcp 2.x (verbatim excerpt) (2026-11-12 UTC):
initialize: eof | stderr: ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) and other APIs changed; see the migration guide at https://py.sdk.modelcontextpr - Version tested (2026-11-12 UTC):
mcp-agent0.2.6 (PyPI) - Retest with mcp<2 pinned (2026-11-12 UTC):
uvx --python 3.12 --with mcp<2 --from mcp-agent==0.2.6 mcp-agent: past the import; did not list tools on a plain launch - PyPI downloads, last 30 days (as of the retest list) (2026-11-12 UTC): 25,742
Related
mcp Python SDK 2.x errors · MCP troubleshooting · All answers