From 1459124a1a1b60a24624124fe3c9a63995ed3d93 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 31 Jul 2026 14:35:07 -0400 Subject: [PATCH] chore(deps): cap mcp below 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MCP SDK 2.0 removes `mcp.server.fastmcp` entirely — `FastMCP` is now `MCPServer` under `mcp.server.mcpserver`, `ToolError` moves with it, and the transport settings (`stateless_http`, `json_response`, `transport_security`, host/port/path) move off the constructor and `.settings` onto `streamable_http_app()` / `run_streamable_http_async()`. The adapter does not import under 2.0, so every MCP and parity test errors at collection. Cap the range so dependabot keeps delivering 1.x updates (1.29.0 verified against the current adapter) instead of opening a major bump that reads as a routine dependency PR. Lifting the cap is the migration's job. Co-Authored-By: Claude Opus 5 --- pyproject.toml | 7 +++++-- uv.lock | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8df5ace..ee59836 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,8 +19,11 @@ dependencies = [ # REST adapter "fastapi>=0.139.1", "uvicorn[standard]>=0.51.0", - # MCP adapter (official SDK; bundles FastMCP server API) - "mcp>=1.28.1", + # MCP adapter (official SDK; bundles FastMCP server API). + # Capped below 2.0: that release removes `mcp.server.fastmcp` entirely (FastMCP -> + # MCPServer) and moves transport config off the constructor, so the adapter does not + # import under it. Migration is a deliberate PR, not a dependency bump. + "mcp>=1.28.1,<2", ] [project.optional-dependencies] diff --git a/uv.lock b/uv.lock index c3dbdef..1d93139 100644 --- a/uv.lock +++ b/uv.lock @@ -546,7 +546,7 @@ requires-dist = [ { name = "fastapi", specifier = ">=0.139.1" }, { name = "httpx", marker = "extra == 'dev'", specifier = ">=0.27" }, { name = "idc-index", specifier = ">=0.12.4" }, - { name = "mcp", specifier = ">=1.28.1" }, + { name = "mcp", specifier = ">=1.28.1,<2" }, { name = "pip-audit", marker = "extra == 'dev'", specifier = ">=2.7" }, { name = "pyarrow", specifier = ">=25.0.0" }, { name = "pydantic", specifier = ">=2.7" },