-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Present v2 as the stable release across the README, docs, and policies #3178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,18 +13,18 @@ | |
|
|
||
| </div> | ||
|
|
||
| > [!CAUTION] | ||
| > **This README documents v2 of the MCP Python SDK, currently a release candidate (`2.0.0rc1`); the stable v2 release is planned for 2026-07-28.** Do not use v2 in production yet. Pre-releases are published to PyPI as `2.0.0aN` / `2.0.0bN` / `2.0.0rcN`, and **a pre-release may still contain breaking changes from the previous one**. Pin an exact version and expect to update your code when you bump the pin. | ||
| > [!NOTE] | ||
| > **This is v2 of the MCP Python SDK, the current stable release line.** It is a major rework of the SDK, both to support the [2026-07-28 MCP specification](https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/) (and every earlier revision) and to fix long-standing architectural issues. Coming from v1? See [What's new in v2](https://py.sdk.modelcontextprotocol.io/whats-new/) for the tour of what changed and the [migration guide](https://py.sdk.modelcontextprotocol.io/migration/) for every breaking change. | ||
| > | ||
| > **v1.x is the only stable release line and remains recommended for production.** It lives on the [`v1.x` branch](https://github.com/modelcontextprotocol/python-sdk/tree/v1.x) and continues to receive critical bug fixes and security patches; see [the v1.x README](https://github.com/modelcontextprotocol/python-sdk/blob/v1.x/README.md) for its documentation. `pip` and `uv` don't select a pre-release unless you explicitly request one, so existing installs are unaffected. **If your package depends on `mcp`, add a `<2` upper bound to your version constraint (for example `mcp>=1.27,<2`) before the stable release lands.** | ||
| > **Not ready to migrate?** v1.x lives on the [`v1.x` branch](https://github.com/modelcontextprotocol/python-sdk/tree/v1.x), continues to receive critical bug fixes and security patches, and is documented at <https://py.sdk.modelcontextprotocol.io/v1/>. Since `pip install mcp` now installs 2.x, keep a `<2` upper bound on your requirement (for example `mcp>=1.28,<2`) until you've migrated. | ||
|
claude[bot] marked this conversation as resolved.
|
||
| > | ||
| > v2 is a major rework of the SDK, both to support the [2026-07-28 MCP specification release](https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/) and to fix long-standing architectural issues. See [What's new in v2](https://py.sdk.modelcontextprotocol.io/v2/whats-new/) for the tour of what changed, and the [migration guide](https://py.sdk.modelcontextprotocol.io/v2/migration/) for every breaking change. Stable v2 is targeted for 2026-07-28, alongside the spec release. Try the pre-releases and [tell us what breaks](https://github.com/modelcontextprotocol/python-sdk/issues/new?template=v2-feedback.yaml), or discuss in [#python-sdk-dev on the MCP Contributors Discord](https://discord.gg/6CSzBmMkjX). | ||
| > Something rough, confusing, or broken? [Open an issue](https://github.com/modelcontextprotocol/python-sdk/issues/new?template=v2-feedback.yaml) or find us in [#python-sdk-dev on the MCP Contributors Discord](https://discord.gg/6CSzBmMkjX). | ||
|
Comment on lines
+16
to
+21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 The rewritten admonition uses GitHub alert syntax ( Extended reasoning...What the bug is. The rewritten top admonition (README.md lines 16–21) is a GitHub alert: a blockquote whose first line is Verified empirically, not from documentation. Rendering this PR's README with the workspace's readme_renderer 45.0 wheel via <blockquote><p>[!NOTE]
<strong>This is v2 of the MCP Python SDK, the current stable release line.</strong> ...The root cause is a renderer-config fact: readme_renderer 45.0 configures its comrak backend with Why this is in scope for this PR, not merely pre-existing. The old README used Why existing checks don't catch it. The pre-commit README check only syncs Step-by-step proof of the trigger.
How to fix. One line, pre-tag: delete the Severity. Nit: purely cosmetic, nothing breaks, twine check and the docs build both pass — but the blemish is permanent on the release's highest-visibility artifact, and only this PR can still fix it cheaply. |
||
|
|
||
| ## Documentation | ||
|
|
||
| **The documentation lives at <https://py.sdk.modelcontextprotocol.io/v2/>.** | ||
| **The documentation lives at <https://py.sdk.modelcontextprotocol.io/>.** | ||
|
|
||
| It has a [Get started guide](https://py.sdk.modelcontextprotocol.io/v2/get-started/), [What's new in v2](https://py.sdk.modelcontextprotocol.io/v2/whats-new/), the [API reference](https://py.sdk.modelcontextprotocol.io/v2/api/mcp/), and the [migration guide](https://py.sdk.modelcontextprotocol.io/v2/migration/). | ||
| It has a [Get started guide](https://py.sdk.modelcontextprotocol.io/get-started/), [What's new in v2](https://py.sdk.modelcontextprotocol.io/whats-new/), the [API reference](https://py.sdk.modelcontextprotocol.io/api/mcp/), and the [migration guide](https://py.sdk.modelcontextprotocol.io/migration/). | ||
|
claude[bot] marked this conversation as resolved.
|
||
|
|
||
| ## What is MCP? | ||
|
|
||
|
|
@@ -41,10 +41,10 @@ Python 3.10+. | |
| ## Installation | ||
|
|
||
| ```bash | ||
| uv add "mcp[cli]==2.0.0rc1" # or: pip install "mcp[cli]==2.0.0rc1" | ||
| uv add "mcp[cli]" # or: pip install "mcp[cli]" | ||
| ``` | ||
|
|
||
| The pin matters while v2 is in pre-release: an unpinned install resolves to the latest stable v1.x, which this README does not describe. Check [PyPI](https://pypi.org/project/mcp/#history) for the newest pre-release, and use `uv run --with "mcp==2.0.0rc1"` for one-off commands. | ||
| The `cli` extra adds the `mcp` command-line tool (`mcp dev`, `mcp run`, `mcp install`) on top of the SDK; install plain `mcp` if you don't need it. For one-off commands, `uv run --with "mcp[cli]" mcp ...` works without a project. | ||
|
|
||
| ## A server in 15 lines | ||
|
|
||
|
|
@@ -82,7 +82,7 @@ Call `add` with `a=1`, `b=2` and you get `3` back. | |
|
|
||
| Notice what you did **not** write: no JSON Schema (`a: int, b: int` _is_ the schema), no request parsing, no validation code, no protocol handling. Two type-hinted Python functions and a docstring. | ||
|
|
||
| [Get started](https://py.sdk.modelcontextprotocol.io/v2/get-started/) takes it from here. | ||
| [Get started](https://py.sdk.modelcontextprotocol.io/get-started/) takes it from here. | ||
|
|
||
| ## A client in 10 lines | ||
|
|
||
|
|
@@ -122,7 +122,7 @@ This project is licensed under the MIT License. See the [LICENSE](https://github | |
| [python-badge]: https://img.shields.io/pypi/pyversions/mcp.svg | ||
| [python-url]: https://www.python.org/downloads/ | ||
| [docs-badge]: https://img.shields.io/badge/docs-python--sdk-blue.svg | ||
| [docs-url]: https://py.sdk.modelcontextprotocol.io/v2/ | ||
| [docs-url]: https://py.sdk.modelcontextprotocol.io/ | ||
| [protocol-badge]: https://img.shields.io/badge/protocol-modelcontextprotocol.io-blue.svg | ||
| [protocol-url]: https://modelcontextprotocol.io | ||
| [spec-badge]: https://img.shields.io/badge/spec-spec.modelcontextprotocol.io-blue.svg | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,17 +23,12 @@ That is the last line of Python on this page. From here down it is all host conf | |
| Every host below gets the same command: | ||
|
|
||
| ```bash | ||
| uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py | ||
| uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py | ||
| ``` | ||
|
|
||
| One command for all of them because `uv run --with` resolves the pinned SDK into a fresh environment on the spot: it works from any directory, needs no project and no virtual environment to activate, and always gets the exact `mcp` version these docs describe. That matters here more than anywhere else, because a host launches your server from *its* working directory with a near-empty environment, not from your shell. | ||
| One command for all of them because `uv run --with` resolves the SDK into a fresh environment on the spot: it works from any directory and needs no project and no virtual environment to activate. That matters here more than anywhere else, because a host launches your server from *its* working directory with a near-empty environment, not from your shell. | ||
|
|
||
| It is also the command `mcp install` writes into Claude Desktop's config for you (below), so what you type by hand and what the tool generates agree. | ||
|
|
||
| !!! warning "The version pin is not optional" | ||
| v2 of this SDK is a release candidate, and installers never select a pre-release unless you name one. An | ||
| unpinned `--with "mcp[cli]"` gives you the latest **v1.x**, which these docs do not describe. | ||
| Use the exact pin from **[Installation](installation.md)**. | ||
| It is also the command `mcp install` writes into Claude Desktop's config for you (below), so what you type by hand and what the tool generates agree, apart from the exact version pin the tool adds. | ||
|
|
||
| !!! tip "If a host can't find `uv`" | ||
| A host spawns your server with a minimal `PATH`, and `uv` may not be on it. Replace the bare | ||
|
|
@@ -74,7 +69,7 @@ There is nothing to be mystified by. This is the entry it writes: | |
| "run", | ||
| "--frozen", | ||
| "--with", | ||
| "mcp[cli]==2.0.0rc1", | ||
| "mcp[cli]==2.0.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 The docs' one remaining exact pin — the Extended reasoning...What the bug is. This PR deliberately keeps exactly one literal version pin in the docs: the The code path / concrete trigger. Step-by-step proof. (1) v2.0.1 ships; per RELEASE.md's stable-release section, no pin-flip commit is made — the releaser is explicitly told none is needed. (2) The docs rebuild from Why this is a nit, not blocking. One verifier refutation argued this is intentional behavior with no concrete failure, and it is largely right about impact: the JSON block is an illustrative sample full of placeholders ( How to fix (one line either side). Either genericize the example so it cannot rot — e.g. Not a duplicate. The cubic-dev-ai comment on this page (addressed in 43e7743) was about qualifying the Recap's pin promise for source builds; the earlier RELEASE.md finding targeted the old, pre-#3179 text that no longer exists. This finding is about the new RELEASE.md's pin-free claim versus the pin this PR keeps. |
||
| "mcp", | ||
| "run", | ||
| "/absolute/path/to/server.py" | ||
|
|
@@ -84,12 +79,12 @@ There is nothing to be mystified by. This is the entry it writes: | |
| } | ||
| ``` | ||
|
|
||
| That's the launch command from the section above with two additions: the absolute path to `uv`, and `--frozen` so `uv` never rewrites a lockfile it happens to be near. It lands in `claude_desktop_config.json`, which lives at: | ||
| That's the launch command from the section above with three additions: the absolute path to `uv`, `--frozen` so `uv` never rewrites a lockfile it happens to be near, and an exact pin to the `mcp` version you have installed. It lands in `claude_desktop_config.json`, which lives at: | ||
|
|
||
| * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` | ||
| * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` | ||
|
|
||
| You can write that file by hand. `mcp install` exists so you don't make the two classic mistakes (a relative path, a missing version pin) while doing it. | ||
| You can write that file by hand. `mcp install` exists so you don't make the classic mistake (a relative path) while doing it. | ||
|
|
||
| Fully quit Claude Desktop (not just its window) and reopen it. | ||
|
|
||
|
|
@@ -107,7 +102,7 @@ Fully quit Claude Desktop (not just its window) and reopen it. | |
| There is no file to edit. Register the server with the `claude` CLI; everything after `--` is the launch command. | ||
|
|
||
| ```bash | ||
| claude mcp add bookshop -- uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py | ||
| claude mcp add bookshop -- uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py | ||
| ``` | ||
|
|
||
| Run `/mcp` inside a Claude Code session to confirm `bookshop` is connected and its tools are listed. | ||
|
|
@@ -121,7 +116,7 @@ Create `.cursor/mcp.json` in your project root. | |
| "mcpServers": { | ||
| "bookshop": { | ||
| "command": "uv", | ||
| "args": ["run", "--with", "mcp[cli]==2.0.0rc1", "mcp", "run", "/absolute/path/to/server.py"] | ||
| "args": ["run", "--with", "mcp[cli]", "mcp", "run", "/absolute/path/to/server.py"] | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -139,7 +134,7 @@ Create `.vscode/mcp.json` in your project root. | |
| "bookshop": { | ||
| "type": "stdio", | ||
| "command": "uv", | ||
| "args": ["run", "--with", "mcp[cli]==2.0.0rc1", "mcp", "run", "/absolute/path/to/server.py"] | ||
| "args": ["run", "--with", "mcp[cli]", "mcp", "run", "/absolute/path/to/server.py"] | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -156,7 +151,7 @@ Two differences from Cursor's file, and they are the only two: the wrapper key i | |
| Before you touch any host config, run the launch command yourself: | ||
|
|
||
| ```bash | ||
| uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py | ||
| uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py | ||
| ``` | ||
|
|
||
| Nothing prints, and it doesn't return. That silence is correct: a stdio server is waiting for a host to speak first on stdin (`Ctrl-C` to stop it). A traceback or an immediate exit is the real bug, and now you can read it instead of guessing at it through a host. | ||
|
|
@@ -174,8 +169,8 @@ For anything past those three, **[Troubleshooting](../troubleshooting.md)** is t | |
| ## Recap | ||
|
|
||
| * A **host** (Claude Desktop, an IDE) runs an MCP client that launches your server as a child process over stdio. Connecting means giving it one launch command. | ||
| * That command is `uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py`: version-pinned, no venv to activate, works from any directory. The pin is mandatory while v2 is pre-release. | ||
| * **Claude Desktop** is the one host `mcp install` configures for you. It writes that same command (plus the absolute path to `uv`) into `claude_desktop_config.json`, so you never have to. | ||
| * That command is `uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py`: no venv to activate, works from any directory. | ||
| * **Claude Desktop** is the one host `mcp install` configures for you. It writes that same command (plus the absolute path to `uv`, `--frozen`, and an exact pin to the version you have installed) into `claude_desktop_config.json`, so you never have to. | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
|
||
| * **Claude Code** is `claude mcp add bookshop -- <launch command>`. **Cursor** is `.cursor/mcp.json` under `mcpServers`. **VS Code** is `.vscode/mcp.json` under `servers`, each entry with a `type`. | ||
| * Absolute paths everywhere, restart the host after editing its config, and never let anything but the SDK write to stdout. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟣 Pre-existing (files not touched by this PR, but this PR performs exactly this class of label edit on the sibling template): the labels declared by the two neighboring issue templates don't exist in the repo, so GitHub silently drops them and issues filed through them arrive unlabeled —
bug.yamlsetsneed confirmation(repo label isneeds confirmation, plural) andfeature-request.yamlsetsfeature request(no such label). Thev2label this line writes DOES exist, so this edit is correct; the fix is to align the two siblings (need confirmation→needs confirmation, and pointfeature-request.yamlat an existing label such asenhancementor createfeature request).Extended reasoning...
What the bug is. Two of the three issue templates in this directory that declare labels reference labels that do not exist in the repository.
.github/ISSUE_TEMPLATE/bug.yamlline 3 setslabels: ["need confirmation"], but the repository's actual label isneeds confirmation(plural)..github/ISSUE_TEMPLATE/feature-request.yamlline 3 setslabels: ["feature request"], which does not exist at all (the closest existing labels areenhancementandquestion). Both were verified against the repo's live label set via the GitHub REST API — 33 labels total (a single page atper_page=100), containingneeds confirmation,needs maintainer,v2, andv2-alpha, but neitherneed confirmationnorfeature request.How it manifests. GitHub issue forms silently skip labels that don't already exist in the repository — they are never auto-created. So every issue filed through the bug template or the feature-request template arrives with no label at all. This is empirically visible: the most recent issues (#3193, #3194) carry zero labels, consistent with the template label never applying.
Why it matters. The repo's own triage flow keys off this label.
CONTRIBUTING.mdexplicitly states that issues labeledneeds confirmationare not ready for work (CONTRIBUTING.md:51 in this PR's checkout), and the bug template's clear intent is to land new reports in that triage state. Because the label string doesn't match, that state never applies automatically, and every bug report needs a maintainer to hand-apply the label before the documented workflow functions.Why it's surfaced on this PR. This PR edits the
labels:line of the sibling template in the same directory —v2-feedback.yaml'sv2-alpha→v2— which is exactly this class of label-hygiene edit. Notably, this PR's own edit is correct:v2exists in the repo's label set, so the v2-feedback template will label correctly after merge. The two broken siblings simply weren't part of the sweep, which is what makes this the natural PR to mention them on.Step-by-step proof. (1) A user files a bug via the bug template. (2) GitHub reads
labels: ["need confirmation"]from the form definition and looks the string up in the repo's label set. (3) No label with that exact name exists (needs confirmation≠need confirmation), so GitHub drops it silently — issue forms never create labels. (4) The issue is created with zero labels, as seen on #3193 and #3194. (5) Triage queries and contributor guidance built aroundlabel:"needs confirmation"never see the issue in its intended state.How to fix. One-line changes in each sibling:
bug.yaml"need confirmation"→"needs confirmation", and either create afeature requestlabel or pointfeature-request.yamlat an existing one (e.g.enhancement). Optionally, the same mismatch pattern appears inCONTRIBUTING.md, which refers to aneeds maintainer actionlabel while the repo label isneeds maintainer. Since neither defective file is modified by this PR, this is pre-existing and should not block merge — but it's cheap to fold into this PR (or a tiny follow-up) since it's the same directory and the same kind of edit.