You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/v2-feedback.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
name: v2 feedback
2
2
description: Bugs, API friction, or docs gaps in v2 of the SDK
3
3
title: "[v2] "
4
-
labels: ["v2-alpha"]
4
+
labels: ["v2"]
5
5
6
6
body:
7
7
- type: markdown
8
8
attributes:
9
9
value: |
10
-
Thanks for trying v2. Anything that broke, surprised you, or slowed you down is useful — API feedback is explicitly welcome while v2 is in pre-release.
10
+
Anything in v2 that broke, surprised you, or slowed you down is useful, including API friction and docs gaps.
11
11
12
-
Docs: https://py.sdk.modelcontextprotocol.io/v2/ · Migration from v1: https://py.sdk.modelcontextprotocol.io/v2/migration/
12
+
Docs: https://py.sdk.modelcontextprotocol.io/ · Migration from v1: https://py.sdk.modelcontextprotocol.io/migration/
| New features, breaking changes|`main`| New APIs, refactors |
79
+
| New features and fixes for v2|`main`| New APIs, refactors |
80
80
| Security fixes for v1 |`v1.x`| Critical patches |
81
-
|Bug fixes for v1 |`v1.x`|Non-breaking fixes|
81
+
|Critical bug fixes for v1 |`v1.x`|Backports of severe bugs|
82
82
83
-
> **Note:**`main` is the v2 development branch. Breaking changes are welcome on `main`. The `v1.x` branch receives only security and critical bug fixes.
83
+
> **Note:**`main` is the current stable line (v2). The `v1.x` branch is the previous major's maintenance line and receives only security and critical bug fixes.
84
84
85
85
2. Create a new branch from your chosen base branch
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,18 +13,18 @@
13
13
14
14
</div>
15
15
16
-
> [!CAUTION]
17
-
> **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.
16
+
> [!NOTE]
17
+
> **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.
18
18
>
19
-
> **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.**
19
+
> **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.
20
20
>
21
-
> 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).
21
+
> 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).
22
22
23
23
## Documentation
24
24
25
-
**The documentation lives at <https://py.sdk.modelcontextprotocol.io/v2/>.**
25
+
**The documentation lives at <https://py.sdk.modelcontextprotocol.io/>.**
26
26
27
-
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/).
27
+
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/).
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.
47
+
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.
48
48
49
49
## A server in 15 lines
50
50
@@ -82,7 +82,7 @@ Call `add` with `a=1`, `b=2` and you get `3` back.
82
82
83
83
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.
84
84
85
-
[Get started](https://py.sdk.modelcontextprotocol.io/v2/get-started/) takes it from here.
85
+
[Get started](https://py.sdk.modelcontextprotocol.io/get-started/) takes it from here.
86
86
87
87
## A client in 10 lines
88
88
@@ -122,7 +122,7 @@ This project is licensed under the MIT License. See the [LICENSE](https://github
Copy file name to clipboardExpand all lines: docs/get-started/real-host.md
+12-17Lines changed: 12 additions & 17 deletions
Display the source diff
Display the rich diff
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
23
23
Every host below gets the same command:
24
24
25
25
```bash
26
-
uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py
26
+
uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py
27
27
```
28
28
29
-
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.
29
+
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.
30
30
31
-
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.
32
-
33
-
!!! warning "The version pin is not optional"
34
-
v2 of this SDK is a release candidate, and installers never select a pre-release unless you name one. An
35
-
unpinned `--with "mcp[cli]"` gives you the latest **v1.x**, which these docs do not describe.
36
-
Use the exact pin from **[Installation](installation.md)**.
31
+
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.
37
32
38
33
!!! tip "If a host can't find `uv`"
39
34
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:
74
69
"run",
75
70
"--frozen",
76
71
"--with",
77
-
"mcp[cli]==2.0.0rc1",
72
+
"mcp[cli]==2.0.0",
78
73
"mcp",
79
74
"run",
80
75
"/absolute/path/to/server.py"
@@ -84,12 +79,12 @@ There is nothing to be mystified by. This is the entry it writes:
84
79
}
85
80
```
86
81
87
-
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:
82
+
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:
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.
87
+
You can write that file by hand. `mcp install` exists so you don't make the classic mistake (a relative path) while doing it.
93
88
94
89
Fully quit Claude Desktop (not just its window) and reopen it.
95
90
@@ -107,7 +102,7 @@ Fully quit Claude Desktop (not just its window) and reopen it.
107
102
There is no file to edit. Register the server with the `claude` CLI; everything after `--` is the launch command.
108
103
109
104
```bash
110
-
claude mcp add bookshop -- uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py
105
+
claude mcp add bookshop -- uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py
111
106
```
112
107
113
108
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.
@@ -156,7 +151,7 @@ Two differences from Cursor's file, and they are the only two: the wrapper key i
156
151
Before you touch any host config, run the launch command yourself:
157
152
158
153
```bash
159
-
uv run --with "mcp[cli]==2.0.0rc1" mcp run /absolute/path/to/server.py
154
+
uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py
160
155
```
161
156
162
157
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
174
169
## Recap
175
170
176
171
* 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.
177
-
* 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.
178
-
***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.
172
+
* That command is `uv run --with "mcp[cli]" mcp run /absolute/path/to/server.py`: no venv to activate, works from any directory.
173
+
***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.
179
174
***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`.
180
175
* Absolute paths everywhere, restart the host after editing its config, and never let anything but the SDK write to stdout.
0 commit comments