Skip to content

Commit a400259

Browse files
chore: enter beta prerelease mode (#2402)
1 parent e7137a7 commit a400259

26 files changed

Lines changed: 76 additions & 59 deletions

File tree

.changeset/beta-release.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@modelcontextprotocol/server': patch
3+
'@modelcontextprotocol/client': patch
4+
'@modelcontextprotocol/core': patch
5+
'@modelcontextprotocol/server-legacy': patch
6+
'@modelcontextprotocol/codemod': patch
7+
'@modelcontextprotocol/express': patch
8+
'@modelcontextprotocol/hono': patch
9+
'@modelcontextprotocol/fastify': patch
10+
'@modelcontextprotocol/node': patch
11+
---
12+
13+
First beta release of SDK v2 with support for the MCP 2026-07-28 specification
14+
revision. See the migration guides for upgrading from v1
15+
(`docs/migration/upgrade-to-v2.md`) and adopting the 2026-07-28 revision
16+
(`docs/migration/support-2026-07-28.md`).

.changeset/pre.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"mode": "pre",
3-
"tag": "alpha",
3+
"tag": "beta",
44
"initialVersions": {
55
"@modelcontextprotocol/eslint-config": "2.0.0",
66
"@modelcontextprotocol/tsconfig": "2.0.0",
77
"@modelcontextprotocol/vitest-config": "2.0.0",
88
"@modelcontextprotocol/examples": "2.0.0-alpha.0",
9-
"@modelcontextprotocol/client": "2.0.0-alpha.0",
10-
"@modelcontextprotocol/core-internal": "2.0.0-alpha.0",
11-
"@modelcontextprotocol/express": "2.0.0-alpha.0",
12-
"@modelcontextprotocol/fastify": "2.0.0-alpha.0",
13-
"@modelcontextprotocol/hono": "2.0.0-alpha.0",
14-
"@modelcontextprotocol/node": "2.0.0-alpha.0",
15-
"@modelcontextprotocol/server": "2.0.0-alpha.0",
16-
"@modelcontextprotocol/server-legacy": "2.0.0-alpha.0",
17-
"@modelcontextprotocol/core": "2.0.0-alpha.0",
18-
"@modelcontextprotocol/codemod": "2.0.0-alpha.0",
19-
"@modelcontextprotocol/test-conformance": "2.0.0-alpha.0",
20-
"@modelcontextprotocol/test-helpers": "2.0.0-alpha.0",
21-
"@modelcontextprotocol/test-integration": "2.0.0-alpha.0",
22-
"@modelcontextprotocol/test-e2e": "2.0.0-alpha.0",
239
"@mcp-examples/client-quickstart": "2.0.0-alpha.0",
2410
"@mcp-examples/server-quickstart": "2.0.0-alpha.0",
25-
"@mcp-examples/shared": "2.0.0-alpha.0"
11+
"@mcp-examples/shared": "2.0.0-alpha.0",
12+
"@modelcontextprotocol/client": "2.0.0-alpha.4",
13+
"@modelcontextprotocol/codemod": "2.0.0-alpha.2",
14+
"@modelcontextprotocol/core": "2.0.0-alpha.2",
15+
"@modelcontextprotocol/core-internal": "2.0.0-alpha.3",
16+
"@modelcontextprotocol/express": "2.0.0-alpha.4",
17+
"@modelcontextprotocol/fastify": "2.0.0-alpha.4",
18+
"@modelcontextprotocol/hono": "2.0.0-alpha.4",
19+
"@modelcontextprotocol/node": "2.0.0-alpha.4",
20+
"@modelcontextprotocol/server": "2.0.0-alpha.4",
21+
"@modelcontextprotocol/server-legacy": "2.0.0-alpha.4",
22+
"@modelcontextprotocol/test-conformance": "2.0.0-alpha.1",
23+
"@modelcontextprotocol/test-e2e": "2.0.0-alpha.1",
24+
"@modelcontextprotocol/test-helpers": "2.0.0-alpha.0",
25+
"@modelcontextprotocol/test-integration": "2.0.0-alpha.1"
2626
},
2727
"changesets": [
2828
"abort-handlers-on-close",

docs/migration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ v2 packages (`@modelcontextprotocol/client`, `@modelcontextprotocol/server`, …
1919
Start by running the codemod:
2020

2121
```bash
22-
npx @modelcontextprotocol/codemod@alpha v1-to-v2 .
22+
npx @modelcontextprotocol/codemod@beta v1-to-v2 .
2323
```
2424

2525
Run it at the package root (`.`) — real projects import the SDK from `test/`,

docs/migration/support-2026-07-28.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,10 @@ Task methods are excluded from the typed method maps: `RequestMethod` / `Request
614614
`ctx.mcpReq.send()`, `setRequestHandler()`, `setNotificationHandler()` reject task
615615
methods at compile time. `ResultTypeMap['tools/call']` is plain `CallToolResult` (no
616616
`| CreateTaskResult`); same for `sampling/createMessage` and `elicitation/create`.
617-
(The published `2.0.0-alpha.3` typings predate this exclusion — there the typed maps
618-
still carry the `tasks/*` entries and the `CreateTaskResult` unions; narrow with the
619-
`isCallToolResult` guard until the next published alpha.) Where
617+
(Typings published before `2.0.0-alpha.4` predate this exclusion: there the typed
618+
maps still carry the `tasks/*` entries and the `CreateTaskResult` unions; narrow with
619+
the `isCallToolResult` guard if you are pinned to one of those alphas. `2.0.0-alpha.4`
620+
and later include the exclusion.) Where
620621
task interop is genuinely required, use the explicit-schema custom-method form
621622
(`request({ method: 'tasks/get', params }, GetTaskResultSchema)`). Inbound `tasks/*`
622623
requests → `-32601`.

docs/migration/upgrade-to-v2.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are already on v2 and want to adopt the **2026-07-28 protocol revision**,
1919
only; CommonJS callers must use dynamic `import()`.
2020
2. **Run the codemod.**
2121
```bash
22-
npx @modelcontextprotocol/codemod@alpha v1-to-v2 .
22+
npx @modelcontextprotocol/codemod@beta v1-to-v2 .
2323
```
2424
Run it at the **package root** (`.`), not `./src` — it also rewrites `package.json`,
2525
and real projects import the SDK from `test/`, `scripts/`, and fixtures too.
@@ -233,15 +233,14 @@ for the literal instead; and the emitted quote style differs from v1, so a
233233
quote-anchored pattern misses silently — match either quote. v2 also ships ESM only:
234234
`/dist/cjs/``/dist/esm/` flavor-pair path swaps have no equivalent.
235235
236-
#### Registry availability during the alpha
236+
#### Registry availability during the beta
237237
238-
All v2 packages are published on the public npm registry. Two notes for the alpha
238+
All v2 packages are published on the public npm registry. Two notes for the beta
239239
window:
240240
241-
- The packages do not share one version number — at the time of writing
242-
`@modelcontextprotocol/core` rides a lower prerelease than its siblings. The
243-
codemod writes ranges that match what is published, so prefer its manifest output
244-
over hand-pinning every package to the same tag.
241+
- As of `2.0.0-beta.1` all v2 packages share one version number (earlier alphas
242+
did not). The codemod writes ranges that match what is published, so prefer its
243+
manifest output over hand-pinning every package.
245244
- Environments that resolve through a corporate or private registry mirror may not
246245
have synced the newer scoped packages yet (the symptom is "not found" for a package
247246
that exists on npmjs.org). Point the install at the public registry
@@ -1000,8 +999,9 @@ the third argument — `new SdkHttpError(SdkErrorCode.ClientHttpNotImplemented,
1000999
(carries `data.requiredCapabilities`) are new typed `ProtocolError` subclasses.
10011000
`resources/read` for an unknown URI now answers `-32602` on every protocol revision
10021001
(v1.x already emitted `-32602`; an interim `-32002` from earlier v2 alphas is mapped at
1003-
the encode seam — published `2.0.0-alpha.3` predates the mapping and still emits
1004-
`-32002` on the wire, so accept both until the next published alpha). The encode-seam mapping applies to **your own throws too**: a handler
1002+
the encode seam — `2.0.0-alpha.3` and earlier predate the mapping and still emit
1003+
`-32002` on the wire, so accept both if peers may run those alphas; `2.0.0-alpha.4`
1004+
and later emit `-32602`). The encode-seam mapping applies to **your own throws too**: a handler
10051005
that deliberately throws `ProtocolError(ProtocolErrorCode.ResourceNotFound, …)` reaches
10061006
peers as `-32602` — a server can no longer emit `-32002` on the wire.
10071007
`ProtocolErrorCode.ResourceNotFound` (`-32002`) stays importable as
@@ -1373,12 +1373,12 @@ The role-aggregate unions (`ClientRequest`, `ServerResult`, `ServerRequest`,
13731373
(`RequestMethod`, `RequestTypeMap`, `ResultTypeMap`, `NotificationTypeMap`) no longer
13741374
include task vocabulary; the deprecated `Task*` types remain importable on their own.
13751375
(One published-alpha qualification, like the `-32002` note in [Errors](#errors): the
1376-
`2.0.0-alpha.3` typings predate this — the typed maps there still carry the `tasks/*`
1377-
entries, and `ResultTypeMap['tools/call']` still unions `CreateTaskResult`, so a
1378-
`client.request({ method: 'tools/call', … })` result does not assign to
1379-
`Promise<CallToolResult>`. Narrow with the `isCallToolResult` guard until the next
1380-
published alpha — the guard is the recommended discrimination tool anyway, per the next
1381-
paragraph.)
1376+
`2.0.0-alpha.3` and earlier typings predate this — the typed maps there still carry the
1377+
`tasks/*` entries, and `ResultTypeMap['tools/call']` still unions `CreateTaskResult`, so
1378+
a `client.request({ method: 'tools/call', … })` result does not assign to
1379+
`Promise<CallToolResult>`. If pinned to those alphas, narrow with the
1380+
`isCallToolResult` guard the recommended discrimination tool anyway, per the next
1381+
paragraph; `2.0.0-alpha.4` and later are unaffected.)
13821382
13831383
**Discriminating result shapes: use guards, not the `in` operator.** The v2
13841384
zod-inferred result types are passthrough objects — every union member carries an index

examples/client-quickstart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mcp-examples/client-quickstart",
33
"private": true,
4-
"version": "2.0.0-alpha.0",
4+
"version": "2.0.0-beta.0",
55
"type": "module",
66
"scripts": {
77
"build": "tsc",

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@modelcontextprotocol/examples",
33
"private": true,
4-
"version": "2.0.0-alpha.0",
4+
"version": "2.0.0-beta.0",
55
"description": "Runnable MCP TypeScript SDK examples — one story per directory, each a self-verifying client/server pair",
66
"license": "MIT",
77
"author": "Anthropic, PBC (https://anthropic.com)",

examples/server-quickstart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mcp-examples/server-quickstart",
33
"private": true,
4-
"version": "2.0.0-alpha.0",
4+
"version": "2.0.0-beta.0",
55
"type": "module",
66
"scripts": {
77
"build": "tsc",

examples/shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mcp-examples/shared",
33
"private": true,
4-
"version": "2.0.0-alpha.0",
4+
"version": "2.0.0-beta.0",
55
"description": "Model Context Protocol implementation for TypeScript",
66
"license": "MIT",
77
"author": "Anthropic, PBC (https://anthropic.com)",

packages/client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The MCP (Model Context Protocol) TypeScript client SDK. Build MCP clients that c
44

55
<!-- prettier-ignore -->
66
> [!WARNING]
7-
> **This is an alpha release.** Expect breaking changes until v2 stabilizes. We're publishing early to gather feedback — please try it and open issues — but we can't guarantee API stability yet. We'll aim to minimize disruption between alphas.
7+
> **This is a beta release.** The API surface is settling but breaking changes remain possible until v2 stabilizes. Please try it and open issues — feedback during the beta directly shapes the stable release.
88
99
<!-- prettier-ignore -->
1010
> [!NOTE]
@@ -13,7 +13,7 @@ The MCP (Model Context Protocol) TypeScript client SDK. Build MCP clients that c
1313
## Install
1414

1515
```bash
16-
npm install @modelcontextprotocol/client@alpha
16+
npm install @modelcontextprotocol/client@beta
1717
```
1818

1919
TypeScript ≥6.0 no longer auto-includes `@types/*` — add `"types": ["node"]` to your `tsconfig.json` `compilerOptions` (the published `.d.mts` references `Buffer`).

0 commit comments

Comments
 (0)