docs: comprehensive GA pass — stable-release wording, released-spec links, install tags (#2566)

This commit is contained in:
Felix Weinberger 2026-07-27 23:32:17 +01:00 • committed by GitHub
commit a9835b4149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 51 additions and 52 deletions

View file

@ -172,7 +172,7 @@ export function generateLlmsArtifacts(docsDir: string, outDir: string, site: str
const header = [
'# MCP TypeScript SDK',
'',
'> The official TypeScript SDK for the Model Context Protocol (MCP): build MCP servers and clients on Node.js, Bun, Deno, and Workers. This is the v2 beta documentation, tracking the 2026-07-28 spec revision.',
'> The official TypeScript SDK for the Model Context Protocol (MCP): build MCP servers and clients on Node.js, Bun, Deno, and Workers. This is the v2 documentation, covering the 2026-07-28 spec revision.',
'',
'Every page below is also served as plain markdown at its `.md` URL — fetch any page directly.',
''

View file

@ -1,6 +1,6 @@
<template>
<div class="version-banner">
This is the documentation for the v2 beta — looking for the
This is the documentation for v2 — looking for the
<a href="https://ts.sdk.modelcontextprotocol.io/" target="_self">v1 documentation</a>?
</div>
</template>

View file

@ -4,7 +4,7 @@ shape: how-to
# Provide roots
::: warning Deprecated — SEP-2577
Pass paths through tool arguments, resource URIs, or host configuration instead. **Roots** are deprecated as of protocol version 2026-07-28 (SEP-2577) and stay functional on 2025-era connections for at least twelve months — see the [deprecated features registry](https://modelcontextprotocol.io/specification/draft/deprecated).
Pass paths through tool arguments, resource URIs, or host configuration instead. **Roots** are deprecated as of protocol version 2026-07-28 (SEP-2577) and stay functional on 2025-era connections for at least twelve months — see the [deprecated features registry](https://modelcontextprotocol.io/specification/2026-07-28/deprecated).
:::
## Migrate away first

View file

@ -4,8 +4,8 @@ shape: landing
# MCP TypeScript SDK
::: info v2 beta
This is the documentation for **v2** of the SDK, currently in **beta**: the API is settling but can still change before the stable release alongside the [2026-07-28 spec](https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/). [Tell us what you find](https://github.com/modelcontextprotocol/typescript-sdk/issues/new?template=v2-feedback.yml) — and if you need the stable v1, its documentation is at [ts.sdk.modelcontextprotocol.io](https://ts.sdk.modelcontextprotocol.io/).
::: info v2
This is the documentation for **v2** of the SDK, the stable release line implementing the [2026-07-28 spec](https://modelcontextprotocol.io/specification/2026-07-28). [Report issues](https://github.com/modelcontextprotocol/typescript-sdk/issues/new/choose) — and if you need v1, its documentation is at [ts.sdk.modelcontextprotocol.io](https://ts.sdk.modelcontextprotocol.io/).
:::
The **Model Context Protocol** (MCP) is an open standard that connects AI applications to the systems where your data and tools live. You write a **server** that exposes tools, resources, and prompts; any MCP **host** — Claude Code, VS Code, Cursor, your own application — connects to it and lets a model use them. The protocol is defined by [the MCP specification](https://modelcontextprotocol.io/specification/latest); this SDK is its TypeScript implementation, on Node.js, Bun, and Deno.

View file

@ -19,7 +19,7 @@ v2 packages (`@modelcontextprotocol/client`, `@modelcontextprotocol/server`, …
Start by running the codemod:
```bash
npx @modelcontextprotocol/codemod@beta v1-to-v2 .
npx @modelcontextprotocol/codemod@latest v1-to-v2 .
```
Run it at the package root (`.`) — real projects import the SDK from `test/`,

View file

@ -9,11 +9,6 @@ protocol revision — and for code written against an earlier **v2 alpha** that
wire-only members directly. If you are on `@modelcontextprotocol/sdk` (v1.x), start with
[upgrade-to-v2.md](./upgrade-to-v2.md) instead.
> **Schema artifact:** until the revision is finalized, the spec repository publishes
> the 2026-07-28 schema under `schema/draft/` — there is no `schema/2026-07-28/`
> directory yet. Tooling that vendors per-revision schema artifacts should track
> `draft/` and note the divergence.
Nothing in v2 puts a 2026-07-28 byte on the wire by default: a hand-constructed
`Client` / `Server` / `McpServer` keeps speaking the 2025-era protocol it was written
for. Serving or speaking 2026-07-28 is always an explicit opt-in via one of the entries
@ -366,7 +361,7 @@ tightening that **does** affect v1 code (custom-handler `_meta` passthrough,
`CallToolResult.content` keeps its v1 default on the legacy era (2026-07-28
connections require it explicitly).
> **If you were on a v2 alpha:** the 2026-07-28 draft error codes were renumbered:
> **If you were on a v2 alpha:** the 2026-07-28 error codes were renumbered:
> `HeaderMismatch` `-32001`→`-32020`, `MissingRequiredClientCapability` `-32003`→`-32021`,
> `UnsupportedProtocolVersion` `-32004`→`-32022`. No v1.x impact (these codes never
> existed in v1); v2-alpha code that hard-coded the old literals must update — prefer

View file

@ -19,7 +19,7 @@ If you are already on v2 and want to adopt the **2026-07-28 protocol revision**,
both `import` and `require('@modelcontextprotocol/…')` resolve natively.
2. **Run the codemod.**
```bash
npx @modelcontextprotocol/codemod@beta v1-to-v2 .
npx @modelcontextprotocol/codemod@latest v1-to-v2 .
```
Run it at the **package root** (`.`), not `./src` — it also rewrites `package.json`,
and real projects import the SDK from `test/`, `scripts/`, and fixtures too.
@ -233,10 +233,9 @@ quote-anchored pattern misses silently — match either quote. The build layout
changed: v2 emits `.mjs`/`.cjs` siblings in a flat `dist/`, so v1's `/dist/cjs/` ↔
`/dist/esm/` flavor-pair path swaps have no equivalent.
#### Registry availability during the beta
#### Registry availability
All v2 packages are published on the public npm registry. Two notes for the beta
window:
All v2 packages are published on the public npm registry. Two notes:
- As of `2.0.0-beta.1` all v2 packages share one version number (earlier alphas
did not). The codemod writes ranges that match what is published, so prefer its

View file

@ -74,7 +74,7 @@ Only the result comes back:
## Log to the client
::: warning Deprecated — SEP-2577
Log to `stderr` (stdio servers) or use OpenTelemetry instead. **MCP logging** is deprecated as of protocol version 2026-07-28 (SEP-2577) and stays functional through the deprecation window (at least twelve months) — see the [deprecated features registry](https://modelcontextprotocol.io/specification/draft/deprecated).
Log to `stderr` (stdio servers) or use OpenTelemetry instead. **MCP logging** is deprecated as of protocol version 2026-07-28 (SEP-2577) and stays functional through the deprecation window (at least twelve months) — see the [deprecated features registry](https://modelcontextprotocol.io/specification/2026-07-28/deprecated).
:::
Declare the `logging` capability when you construct the server.

View file

@ -4,7 +4,7 @@ shape: how-to
# Sampling
::: warning Deprecated — SEP-2577
Call your LLM provider's API directly from your server instead. **Sampling** is deprecated as of protocol version 2026-07-28 (SEP-2577) and stays functional on 2025-era connections for at least twelve months — see the [deprecated features registry](https://modelcontextprotocol.io/specification/draft/deprecated).
Call your LLM provider's API directly from your server instead. **Sampling** is deprecated as of protocol version 2026-07-28 (SEP-2577) and stays functional on 2025-era connections for at least twelve months — see the [deprecated features registry](https://modelcontextprotocol.io/specification/2026-07-28/deprecated).
:::
## Replace sampling with a direct provider call

View file

@ -1,6 +1,6 @@
<template>
<div class="version-banner">
This is the documentation for v1.x — looking for the
<a href="https://ts.sdk.modelcontextprotocol.io/v2/" target="_self">v2 beta documentation</a>?
<a href="https://ts.sdk.modelcontextprotocol.io/v2/" target="_self">v2 documentation</a>?
</div>
</template>