Skip to content

Commit 0655591

Browse files
Merge branch 'main' into pradeep-ramola/www-auth-param-boundary
2 parents 5ce7010 + 53117cb commit 0655591

28 files changed

Lines changed: 2863 additions & 959 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
>
1919
> **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.**
2020
>
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 the [migration guide](https://py.sdk.modelcontextprotocol.io/v2/migration/) for what's changed. Stable v2 is targeted for 2026-07-27, 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+
> 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-27, 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).
2222
2323
## Documentation
2424

2525
**The documentation lives at <https://py.sdk.modelcontextprotocol.io/v2/>.**
2626

27-
It has a [Get started guide](https://py.sdk.modelcontextprotocol.io/v2/get-started/), 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/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/).
2828

2929
## What is MCP?
3030

docs/.overrides/.icons/mcp.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/extra.css

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* Sidebar hierarchy + density for MkDocs Material 9.7.x.
2+
All rules scoped to the desktop sidebar breakpoint (>= 76.25em), matching
3+
Material's own scoping for navigation.sections, so the mobile drill-down
4+
drawer keeps stock styling. Colors use Material tokens, so the light and
5+
slate schemes both work without extra palette handling. */
6+
7+
@media screen and (min-width: 76.25em) {
8+
/* Section labels: smaller, uppercase, letter-spaced, muted. Covers both the
9+
clickable index-page headers and the bare API Reference label. */
10+
.md-sidebar--primary .md-nav__item--section > .md-nav__link {
11+
font-size: 0.62rem;
12+
font-weight: 700;
13+
text-transform: uppercase;
14+
letter-spacing: 0.1em;
15+
color: var(--md-default-fg-color--light);
16+
}
17+
18+
/* Indent section children and hang a guide line. Material outdents section
19+
children with [dir=ltr] ... margin-left: -0.6rem, which is why they sit
20+
flush under the header; restoring the margin re-exposes the stock 0.6rem
21+
list padding. The logical property ties Material's physical one at
22+
(0,3,0) specificity and wins on source order (extra_css loads last),
23+
while staying direction-agnostic. */
24+
.md-sidebar--primary .md-nav__item--section > .md-nav {
25+
margin-inline-start: 0.1rem;
26+
border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest);
27+
}
28+
29+
/* Same guide line for collapsible groups inside the API Reference subtree
30+
(section items also carry --nested, so exclude them). */
31+
.md-sidebar--primary .md-nav__item--nested:not(.md-nav__item--section) > .md-nav {
32+
border-inline-start: 0.05rem solid var(--md-default-fg-color--lightest);
33+
}
34+
35+
/* Tighten vertical rhythm (stock: 0.625em link margins, 1.25em sections).
36+
The child combinator keeps this off anchors inside md-nav__container,
37+
which carry their own margin-top: 0 stock rule. */
38+
.md-sidebar--primary .md-nav__item > .md-nav__link {
39+
margin-top: 0.45em;
40+
}
41+
.md-sidebar--primary .md-nav__item--section {
42+
margin: 1em 0;
43+
}
44+
.md-sidebar--primary .md-nav__item--section > .md-nav__link {
45+
margin-top: 0;
46+
}
47+
48+
/* The current page stands out from its siblings. 700 because Material only
49+
loads Inter at 300/400/700; a 600 would silently substitute the 700 face
50+
anyway, but render lighter on the system-font fallback stack. */
51+
.md-sidebar--primary .md-nav__link--active {
52+
font-weight: 700;
53+
}
54+
55+
/* The sidebar repeats the site name right above the homepage nav entry;
56+
drop the title row on desktop (the mobile drawer still needs it for its
57+
drill-down back-navigation, hence the media-query scope). */
58+
.md-sidebar--primary .md-nav--primary > .md-nav__title {
59+
display: none;
60+
}
61+
}
62+
63+
/* Headings: Material's 300-weight light-gray defaults read washed out; use
64+
the full foreground color and a solid weight instead. 700, not 600: the
65+
Google Fonts request only carries Inter 300/400/700 (see the nav__link
66+
note above). */
67+
.md-typeset h1,
68+
.md-typeset h2 {
69+
font-weight: 700;
70+
color: var(--md-default-fg-color);
71+
}
72+
.md-typeset h3 {
73+
font-weight: 700;
74+
}

docs/favicon.svg

Lines changed: 11 additions & 0 deletions
Loading

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
!!! info "You are viewing the in-development v2 documentation"
44
For the current stable release, see the [v1.x documentation](https://py.sdk.modelcontextprotocol.io/).
5+
New to v2, or coming from v1? **[What's new in v2](whats-new.md)** is the five-minute tour of what changed.
56
Trying v2? [Tell us what you find](https://github.com/modelcontextprotocol/python-sdk/issues/new?template=v2-feedback.yaml) — it is the most useful thing you can do for the SDK right now.
67

78
The **Model Context Protocol (MCP)** lets applications provide context to LLMs in a standardized way, separating the concern of *providing* context from the LLM interaction itself.
@@ -93,6 +94,7 @@ You wrote two Python functions with type hints and a docstring. The SDK does the
9394
* Building an application that *uses* MCP servers? Start with **[Clients](client/index.md)**.
9495
* Already have a FastAPI or Starlette app? **[Add to an existing app](run/asgi.md)** mounts an MCP server inside it.
9596
* Hunting an exact error message? **[Troubleshooting](troubleshooting.md)** is keyed by the verbatim text.
97+
* Wondering what changed in v2? **[What's new in v2](whats-new.md)** is the five-minute tour.
9698
* Migrating from v1? Start with the **[Migration Guide](migration.md)**.
9799
* Hunting for an exact signature? The **[API Reference](api/mcp/index.md)** is generated from the source.
98100
* Reading with an LLM? This documentation is also published in the [llms.txt](https://llmstxt.org/) format:

0 commit comments

Comments
 (0)