From 027d916f99b3df7967855c73590aa8512c6873ca Mon Sep 17 00:00:00 2001 From: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com> Date: Tue, 28 Jul 2026 20:42:18 +0000 Subject: [PATCH] tools/mcp: pin mcp<2 to fix unit CI collection mcp 2.0.0 dropped the mcp.server.fastmcp module, so the unpinned `mcp>=1.0` now resolves to 2.0.0 and modelopt_mcp/server.py's `from mcp.server.fastmcp import FastMCP` fails at import, breaking the `mcp` unit job (and the unit-pr-required-check gate) on every PR that touches pyproject.toml or the workflow. Pin to the 1.x line that still ships fastmcp; migrating to the mcp 2.0 API is a separate change. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com> --- tools/mcp/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mcp/pyproject.toml b/tools/mcp/pyproject.toml index 3e30411baa1..9defaa0afaa 100644 --- a/tools/mcp/pyproject.toml +++ b/tools/mcp/pyproject.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "MCP server exposing ModelOpt launcher operations (submit, status, logs) as typed tools for codex / Claude Code agents" requires-python = ">=3.10" dependencies = [ - "mcp>=1.0", + "mcp>=1.0,<2", # server.py imports mcp.server.fastmcp, removed in mcp 2.0 "modelopt-launcher", "pyyaml", "pydantic>=2.0",