Skip to content

fix(time): cap mcp dependency to <2 to prevent ImportError on SDK 2.0.0 - #4571

Closed
cyforkk wants to merge 3 commits into
modelcontextprotocol:mainfrom
cyforkk:fix/time-mcp-version-cap-4570
Closed

fix(time): cap mcp dependency to <2 to prevent ImportError on SDK 2.0.0#4571
cyforkk wants to merge 3 commits into
modelcontextprotocol:mainfrom
cyforkk:fix/time-mcp-version-cap-4570

Conversation

@cyforkk

@cyforkk cyforkk commented Jul 29, 2026

Copy link
Copy Markdown

Description

Closes #4570

The mcp-server-time fails to start when uvx resolves to mcp SDK 2.0.0, which renamed McpError to MCPError. Since pyproject.toml had no upper bound on the mcp dependency, all unpinned launchers broke as of 2026-07-28.

This PR caps the dependency to mcp>=1.23.0,<2 as a short-term fix, matching the workaround uvx --with "mcp<2" mcp-server-time that users confirmed working.

A longer-term migration to the v2 API can follow separately.

Changes

  • src/time/pyproject.toml: added <2 upper bound to the mcp dependency.

Checklist

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

mcp 2.0.0 renamed McpError to MCPError, breaking the import in
server.py. Since pyproject.toml had no upper bound, unpinned
launchers like uvx resolved to 2.0.0 and failed at startup.

Cap the dependency to mcp>=1.23.0,<2 as a short-term fix.
Long-term migration to the v2 API can follow separately.

Closes modelcontextprotocol#4570

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The lockfile was stale after adding the <2 upper bound to the mcp
dependency. Update it so CI's `uv sync --locked` step passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The previous lockfile was generated with a mirror index URL
(UV_DEFAULT_INDEX env var) which caused CI's `uv sync --locked`
to fail. Regenerate with the default PyPI index.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cyforkk

cyforkk commented Jul 29, 2026

Copy link
Copy Markdown
Author

Superseded by #4577 which combines all Python server fixes into a single PR.

@cyforkk cyforkk closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

time: ImportError on startup with mcp SDK 2.0.0 (McpError renamed to MCPError)

1 participant