Summary
PR #4360 added mcp[cli]>=...,<2.0.0 to 44 servers as a stopgap for #4354, pinning the
ecosystem to SDK 1.x. This issue tracks removing that cap by porting the servers to v2.
SDK 2.0.0 removed mcp.server.fastmcp (it is gone, not deprecated) and renamed
FastMCP -> MCPServer. Every capped server would crash at import under 2.x, so the cap
is load-bearing and cannot simply be dropped.
Actual scope: 48 servers / 246 files
Larger than PR #4360's pyproject count suggests. Four servers (amazon-keyspaces,
amazon-translate, aws-iot-sitewise, ecs) declare the standalone fastmcp package
and import mcp.server.fastmcp, so they are affected too and can't be set aside as
"different dependency."
API surface
Verified by importing from an installed mcp 2.0.0 rather than reading the migration
guide. All seven v1 import forms present in src/ move under mcp.server.mcpserver:
| v1 import |
files |
v2 import |
from mcp.server.fastmcp import Context |
143 |
from mcp.server.mcpserver import Context |
from mcp.server.fastmcp import Context, FastMCP |
45 |
from mcp.server.mcpserver import Context, MCPServer |
from mcp.server.fastmcp import FastMCP |
41 |
from mcp.server.mcpserver import MCPServer |
from mcp.server.fastmcp.tools import Tool |
10 |
from mcp.server.mcpserver.tools import Tool |
from mcp.server.fastmcp.prompts import Prompt |
5 |
from mcp.server.mcpserver.prompts import Prompt |
from mcp.server.fastmcp.exceptions import ToolError |
3 |
from mcp.server.mcpserver.exceptions import ToolError |
from mcp.server.fastmcp.server import Context |
1 |
from mcp.server.mcpserver.server import Context |
Constructor kwargs (instructions, dependencies), the mcp.tool() decorator, and
mcp.run() are unchanged. For a stdio server the migration is effectively an import
rename. No file in src/ uses the 3-parameter Context[ServerSessionT, ...] form, so
that v2 delta doesn't apply here.
Approach
Per-server: rename imports -> bump cap to >=2.0.0,<3.0.0 -> uv lock -> run that
server's own test suite. Rename and cap bump must land atomically per server, since
v2-only imports break under a 1.x resolution.
Stateless / streamable-HTTP / cache-hint adoption is out of scope — it matters for
remote-deployed servers and is a separate per-server decision.
Rejected: a try/except ImportError shim supporting both 1.x and 2.x. It would add
dual-path complexity to 48 servers for a transitional benefit, and the repo pins via
lockfiles anyway.
Needs individual review
- Heaviest surface —
amazon-bedrock-agentcore (33 files), aws-dataprocessing (32),
aws-serverless (26), aws-healthomics (25), eks (16), aws-iot-sitewise (15),
aws-transform (15).
stateless_http= — aws-api-mcp-server passes it to the constructor; in v2 it moves
to run(). The one confirmed non-mechanical change. (Not among the 48 — it uses the
standalone fastmcp package.)
- String monkeypatch targets — 3 files patch
'mcp.server.fastmcp.FastMCP' as a
string. Both halves must be renamed together; rewriting only the module yields
mcp.server.mcpserver.FastMCP, which doesn't exist and fails at patch time rather than
import time.
- Standalone
fastmcp servers — the 4 above need a dependency decision alongside the
rename.
Separate latent bug
ecs-mcp-server imports mcp.server.fastmcp but declares no mcp dependency at all
(only fastmcp>=3.0.0) — it receives mcp transitively. Worth fixing independently of
this migration.
Plan
First server + tooling, then the rest in follow-up PRs (individually or batched), each
gated on its own test suite so one failure doesn't block the others.
Related: #4354, #4360, #2533.
Summary
PR #4360 added
mcp[cli]>=...,<2.0.0to 44 servers as a stopgap for #4354, pinning theecosystem to SDK 1.x. This issue tracks removing that cap by porting the servers to v2.
SDK 2.0.0 removed
mcp.server.fastmcp(it is gone, not deprecated) and renamedFastMCP->MCPServer. Every capped server would crash at import under 2.x, so the capis load-bearing and cannot simply be dropped.
Actual scope: 48 servers / 246 files
Larger than PR #4360's pyproject count suggests. Four servers (
amazon-keyspaces,amazon-translate,aws-iot-sitewise,ecs) declare the standalonefastmcppackageand import
mcp.server.fastmcp, so they are affected too and can't be set aside as"different dependency."
API surface
Verified by importing from an installed
mcp 2.0.0rather than reading the migrationguide. All seven v1 import forms present in
src/move undermcp.server.mcpserver:from mcp.server.fastmcp import Contextfrom mcp.server.mcpserver import Contextfrom mcp.server.fastmcp import Context, FastMCPfrom mcp.server.mcpserver import Context, MCPServerfrom mcp.server.fastmcp import FastMCPfrom mcp.server.mcpserver import MCPServerfrom mcp.server.fastmcp.tools import Toolfrom mcp.server.mcpserver.tools import Toolfrom mcp.server.fastmcp.prompts import Promptfrom mcp.server.mcpserver.prompts import Promptfrom mcp.server.fastmcp.exceptions import ToolErrorfrom mcp.server.mcpserver.exceptions import ToolErrorfrom mcp.server.fastmcp.server import Contextfrom mcp.server.mcpserver.server import ContextConstructor kwargs (
instructions,dependencies), themcp.tool()decorator, andmcp.run()are unchanged. For a stdio server the migration is effectively an importrename. No file in
src/uses the 3-parameterContext[ServerSessionT, ...]form, sothat v2 delta doesn't apply here.
Approach
Per-server: rename imports -> bump cap to
>=2.0.0,<3.0.0->uv lock-> run thatserver's own test suite. Rename and cap bump must land atomically per server, since
v2-only imports break under a 1.x resolution.
Stateless / streamable-HTTP / cache-hint adoption is out of scope — it matters for
remote-deployed servers and is a separate per-server decision.
Rejected: a
try/except ImportErrorshim supporting both 1.x and 2.x. It would adddual-path complexity to 48 servers for a transitional benefit, and the repo pins via
lockfiles anyway.
Needs individual review
amazon-bedrock-agentcore(33 files),aws-dataprocessing(32),aws-serverless(26),aws-healthomics(25),eks(16),aws-iot-sitewise(15),aws-transform(15).stateless_http=—aws-api-mcp-serverpasses it to the constructor; in v2 it movesto
run(). The one confirmed non-mechanical change. (Not among the 48 — it uses thestandalone
fastmcppackage.)'mcp.server.fastmcp.FastMCP'as astring. Both halves must be renamed together; rewriting only the module yields
mcp.server.mcpserver.FastMCP, which doesn't exist and fails at patch time rather thanimport time.
fastmcpservers — the 4 above need a dependency decision alongside therename.
Separate latent bug
ecs-mcp-serverimportsmcp.server.fastmcpbut declares nomcpdependency at all(only
fastmcp>=3.0.0) — it receivesmcptransitively. Worth fixing independently ofthis migration.
Plan
First server + tooling, then the rest in follow-up PRs (individually or batched), each
gated on its own test suite so one failure doesn't block the others.
lambda-tool-mcp-server+scripts/migrate-mcp-v2.pycodemodecs-mcp-servermissingmcpdependency (separate)Related: #4354, #4360, #2533.