docs: rebuild the v2 documentation around a task-based page tree (#2397)

This commit is contained in:
Felix Weinberger 2026-06-30 21:18:42 +01:00 • committed by GitHub
commit b153505428
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11884 additions and 4971 deletions

View file

@ -50,5 +50,5 @@ the codemod first; the guide is the codemod's companion for what's left.
## See also
- [`@modelcontextprotocol/codemod` README](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/packages/codemod/README.md)
- [FAQ](../faq.md)
- [Troubleshooting](../troubleshooting.md)
- [Examples](https://github.com/modelcontextprotocol/typescript-sdk/tree/main/examples)

View file

@ -38,14 +38,14 @@ below.
## Serving the 2026-07-28 revision
These entry points are documented in full in the server and client guides; this section
contextualizes them as the migration path.
These entry points are documented in full in [Protocol versions](../protocol-versions.md);
this section contextualizes them as the migration path.
### Client side: `versionNegotiation`
By default `Client.connect()` performs the same 2025 `initialize` handshake as v1.x,
byte for byte. To negotiate the 2026-07-28 era, opt in via `ClientOptions.versionNegotiation` —
see [client.md › Protocol version negotiation](../client.md#protocol-version-negotiation-2026-07-28-revision).
see [Negotiate the era from the client](../protocol-versions.md#negotiate-the-era-from-the-client).
```typescript
const client = new Client({ name: 'my-client', version: '1.0.0' }, { versionNegotiation: { mode: 'auto' } });
@ -166,7 +166,7 @@ on the wire. Serving 2026-07-28 (or both eras) on stdio goes through the
connection-pinned `serveStdio(() => buildServer())` entry from
`@modelcontextprotocol/server/stdio`; the opening exchange selects the connection's era,
and one factory instance is pinned per connection. See
[server.md › Serving the 2026-07-28 draft revision on stdio](../server.md#serving-the-2026-07-28-draft-revision-on-stdio).
[Serve over stdio](../serving/stdio.md).
To migrate an existing stdio server, replace
`await server.connect(new StdioServerTransport())` with

View file

@ -1145,7 +1145,7 @@ version negotiation. Under the probing modes (`versionNegotiation: { mode: 'auto
with or without a pin) the connect-time 401 currently surfaces wrapped as
`SdkError(SdkErrorCode.EraNegotiationFailed)` with the `UnauthorizedError` at
`error.data.cause` — unwrap before the check, as shown in the
[client guide's authentication section](../client.md#authentication).
[client OAuth guide](../clients/oauth.md).
#### `auth()` options are now `AuthOptions`
@ -1777,7 +1777,7 @@ where an entry notes its own signature change:
- `StreamableHTTPClientTransport`, `SSEClientTransport` constructors and options —
including resumability: the per-request `resumptionToken` / `onresumptiontoken`
request options carry over from v1 unchanged
([Resumption tokens](../client.md#resumption-tokens) in the client guide).
([Resume a dropped stream](../serving/sessions-state-scaling.md#resume-a-dropped-stream)).
- `StdioClientTransport` and `StdioServerTransport` — **import path moved** to the
`./stdio` subpath and gained an optional `maxBufferSize` ([Imports & transports](#imports--transports)).
- The **`Transport` interface contract** — `start` / `send` / `close`, `onmessage` /
@ -1809,7 +1809,7 @@ where an entry notes its own signature change:
- The codemod's [`@mcp-codemod-error`](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/packages/codemod/README.md) markers point
at every site it could not safely rewrite.
- The [FAQ](../faq.md) covers common v2 questions.
- The [Troubleshooting](../troubleshooting.md) page covers common errors and their fixes.
- Runnable [examples](https://github.com/modelcontextprotocol/typescript-sdk/tree/main/examples)
for every subsystem.
- Open an issue on [GitHub](https://github.com/modelcontextprotocol/typescript-sdk/issues).