Skip to content

fix(fetch, git): cap mcp dependency to <2 to prevent ImportError on SDK 2.0.0 - #4573

Closed
cyforkk wants to merge 8 commits into
modelcontextprotocol:mainfrom
cyforkk:fix/fetch-git-mcp-version-cap
Closed

fix(fetch, git): cap mcp dependency to <2 to prevent ImportError on SDK 2.0.0#4573
cyforkk wants to merge 8 commits into
modelcontextprotocol:mainfrom
cyforkk:fix/fetch-git-mcp-version-cap

Conversation

@cyforkk

@cyforkk cyforkk commented Jul 29, 2026

Copy link
Copy Markdown

Description

Related: #4560, #4570

The mcp-server-fetch and mcp-server-git fail to start when uvx resolves to mcp SDK 2.0.0, which renamed McpError to MCPError. Both pyproject.toml files had no upper bound on the mcp dependency.

This PR caps:

  • mcp-server-fetch: mcp>=1.1.3mcp>=1.1.3,<2
  • mcp-server-git: mcp>=1.0.0mcp>=1.0.0,<2

Short-term fix to prevent breakage. Long-term migration to v2 API can follow separately.

Changes

  • src/fetch/pyproject.toml: added <2 upper bound
  • src/git/pyproject.toml: added <2 upper bound

Checklist

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

cyforkk and others added 3 commits July 29, 2026 16:52
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>
…DK 2.0.0

mcp 2.0.0 renamed McpError to MCPError, breaking imports in
servers that had no upper bound on the mcp dependency. Cap both
fetch (>=1.1.3,<2) and git (>=1.0.0,<2) as a short-term fix.

Related: modelcontextprotocol#4560, modelcontextprotocol#4570

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cyforkk and others added 5 commits July 29, 2026 20:32
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The previous lockfile was generated with a mirror index URL which
caused CI's `uv sync --locked` to fail. Regenerate with the default
PyPI index so the lockfile is compatible with CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regenerate with the default PyPI index so the lockfile is
compatible with CI's `uv sync --locked` step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The previous lockfiles were 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>
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.

1 participant