Update the v2 status banner and pin spawned environments to the running SDK version#2834
Merged
Conversation
…ng SDK version - README.md banner: v2 is in alpha with pre-releases published to PyPI (previously said "pre-alpha, in development"), plus the beta/stable target dates, the <2 upper-bound ask for dependents, and v1.x's maintenance-mode status. The freeze check in shared.yml now honors an override-readme-freeze label so deliberate updates like this one can land while accidental edits stay blocked. - mcp dev and mcp install spawn environments via `uv run --with mcp`, which resolves to the latest stable release rather than the version the user installed; pre-releases are never selected without an explicit pin, so with a v2 pre-release installed the spawned environment got v1 and the user's server failed to import. The requirement now pins the running version; source builds fall back to the unpinned form since dev/local versions are not published to PyPI.
9 tasks
Also pin down two test contracts on the new requirement helper: the dev-version fallback preserves extras, and a user-supplied mcp[cli] coexists with the pinned requirement rather than deduplicating into it.
felixweinberger
approved these changes
Jun 11, 2026
| import pytest | ||
|
|
||
| from mcp.cli.claude import get_uv_path, update_claude_config | ||
| from mcp.cli.claude import get_uv_path, mcp_requirement, update_claude_config |
Contributor
There was a problem hiding this comment.
Interesting we have a Claude test but guess it's pre-existing
Contributor
Author
There was a problem hiding this comment.
yeaaa it is definitely weird, will have to think whether we add all CLIs later or something
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two pre-alpha-release fixes in one PR, per maintainer discussion.
Motivation and Context
README banner: the front-page README.md still described v2 as "pre-alpha, in development". With
2.0.0a1about to be published, it now states the alpha status, how to install it, the beta/stable target dates, the<2upper-bound ask for dependent packages, and v1.x's maintenance-mode status. README.md is deliberately frozen onmain(it documents v1), so the freeze CI check now honors anoverride-readme-freezelabel for intentional updates like this one; accidental edits stay blocked.CLI version pinning:
mcp devandmcp installbuild commands of the formuv run --with mcp .../uv run --with mcp[cli] .... In a fresh environment an unpinnedmcprequirement resolves to the latest stable release - never a pre-release - so a user who installedmcp[cli]==2.0.0a1and ranmcp dev server.py(outside a uv project) ormcp installgot a child environment with v1 in it, and their v2 server failed withModuleNotFoundError. Themcp installcase is the worst variant: the broken command is persisted into Claude Desktop's config. Both sites now pin the requirement to the running SDK version (mcp[cli]==<version>). Source builds carry dev/local version segments that are not on PyPI, so they fall back to the unpinned form.How Has This Been Tested?
uv run --with mcp python -c "from mcp.server.mcpserver import MCPServer"resolves mcp 1.27.2 and fails the import..dev-> unpinned,+local-> unpinned), and the command-construction tests now mock the SDK version so they are deterministic across environments (the repo venv runs a dev build; CI may produce a different version).tests/cli/passes (26 tests), 100% branch coverage onsrc/mcp/cli/*, strict-no-cover clean, pyright and ruff clean.Breaking Changes
None. Claude Desktop configs written by older versions keep their unpinned form until
mcp installis re-run.Types of changes
Checklist
Additional context
A companion PR updates the v1.x branch's README with the same v2 status information, since that branch's README is what PyPI renders for the stable line.
AI Disclaimer