Skip to content

fix(python): require mcp>=1.29.0,<2 in fetch, git, and time - #4663

Merged
olaservo merged 2 commits into
modelcontextprotocol:mainfrom
olaservo:fix/python-cap-mcp-below-2
Aug 18, 2026
Merged

fix(python): require mcp>=1.29.0,<2 in fetch, git, and time#4663
olaservo merged 2 commits into
modelcontextprotocol:mainfrom
olaservo:fix/python-cap-mcp-below-2

Conversation

@olaservo

Copy link
Copy Markdown
Member

Description

mcp 2.0.0 shipped on 2026-07-28 and became what pip install mcp / uv add mcp resolves. It renamed McpError to MCPError and replaced the low-level Server decorators with constructor handlers. All three Python servers declared mcp with no upper bound, so every fresh uvx install since then has resolved 2.0.0 and failed to start:

  • mcp-server-fetch: ImportError: cannot import name 'McpError' from 'mcp.shared.exceptions'
  • mcp-server-time: same ImportError
  • mcp-server-git: AttributeError: 'Server' object has no attribute 'list_tools'

This caps mcp below 2 and raises the floor to 1.29.0, the last 1.x release. The previous floors (>=1.0.0 for git, >=1.1.3 for fetch, >=1.23.0 for time) allowed resolutions affected by GHSA-vj7q-gjh5-988w, GHSA-jpw9-pfvf-9f58, and GHSA-hvrp-rf83-w775.

Porting the servers to the v2 SDK is separate work — this is the unbreak.

Server Details

  • Server: fetch, git, time
  • Changes to: dependencies (pyproject.toml, uv.lock)

Motivation and Context

Closes #4560, closes #4570, closes #4580. Also reported in #4600 and #4635.

Supersedes #4563, #4572, #4577, #4611, #4645, #4657, which propose the same cap without the floor bump, and #4650, which raises the floor to 1.23.0 without capping.

How Has This Been Tested?

  • uv sync --frozen --all-extras --dev + uv run pytest + uv run pyright for all three servers. fetch 20 passed, time 38 passed, git 43 passed (git's 37 teardown errors are a pre-existing Windows-only PermissionError in shutil.rmtree of the temp repo, unrelated to this change).
  • stdio smoke test against the relocked 1.29.0: initialize + tools/list both answer correctly for fetch and time.
  • Verified the failure this fixes by installing mcp==2.0.0 against the current pins and reproducing each of the three startup errors above.

Breaking Changes

None for users on mcp 1.x. Anyone who pinned mcp>=2 alongside these servers had a broken install already.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling

mcp 2.0.0 renamed McpError to MCPError and replaced the low-level Server
decorators with constructor handlers. The three servers had no upper bound,
so a fresh uvx install has resolved 2.0.0 since 2026-07-28 and failed to
start: fetch and time raise ImportError on the McpError import, git raises
AttributeError on server.list_tools().

The floor moves to 1.29.0, the last 1.x release. The previous floors (1.0.0
for git, 1.1.3 for fetch, 1.23.0 for time) resolved versions affected by
GHSA-vj7q-gjh5-988w, GHSA-jpw9-pfvf-9f58, and GHSA-hvrp-rf83-w775.

Porting to the v2 SDK is tracked separately.

Closes modelcontextprotocol#4560
Closes modelcontextprotocol#4570
Closes modelcontextprotocol#4580

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 18, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Caps Python MCP SDK dependencies to the compatible, security-patched 1.x release line.

Changes:

  • Require mcp>=1.29.0,<2 for fetch, git, and time servers.
  • Regenerate each server’s lockfile with MCP 1.29.0.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/fetch/pyproject.toml Adds the MCP version bounds.
src/fetch/uv.lock Locks MCP 1.29.0.
src/git/pyproject.toml Adds the MCP version bounds.
src/git/uv.lock Locks MCP 1.29.0.
src/time/pyproject.toml Adds the MCP version bounds.
src/time/uv.lock Locks MCP 1.29.0.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Users hitting the 2.0.0 startup failure land on the README first. Also makes
the three packages qualify for the next release: the release workflow selects
packages by .py/.ts/.md changes, so a dependency-only fix would merge without
publishing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@olaservo

Copy link
Copy Markdown
Member Author

Added a README line to each of the three servers noting the mcp>=1.29.0,<2 requirement. It documents the failure users are hitting, and it makes the packages qualify for the next release run — release.py's has_changes only counts .py/.ts/.md, so a dependency-only change would merge without publishing. #4604 fixes that properly by counting pyproject.toml.

Copilot AI review requested due to automatic review settings August 18, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 9 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/git/README.md:11

  • This explanation is inaccurate for the git server: its v2 startup failure is caused by removal of the low-level Server.list_tools/call_tool decorator API, not an API rename. Please describe the removed decorators so users understand why a rename-only workaround cannot restore compatibility.
Requires MCP Python SDK 1.x (`mcp>=1.29.0,<2`). SDK 2.0 renamed APIs this server uses. The port to v2 is in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants