Skip to content

Commit e81758c

Browse files
Version Packages (beta) (modelcontextprotocol#2484)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent ee8267a commit e81758c

21 files changed

Lines changed: 115 additions & 11 deletions

File tree

.changeset/pre.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,25 @@
2929
"calltoolresult-content-default",
3030
"cjs-ajv-validator-subpath",
3131
"cjs-support-v2-packages",
32+
"codemod-fixed-group",
3233
"codemod-iterations-5",
3334
"codemod-versions-from-manifests",
3435
"content-type-media-type-validation",
3536
"cross-bundle-error-instanceof",
3637
"examples-protected-wiring",
3738
"initialize-session-hygiene",
39+
"lazy-ajv-engine",
40+
"lazy-era-wire-schemas",
3841
"malformed-resource-uri-invalid-params",
3942
"post-dispatch-32021-http-400",
4043
"probe-window-handler-restore",
44+
"response-cache-document-codec",
45+
"schemas-source-home",
4146
"silent-validators-wave",
4247
"standard-header-ows",
4348
"standard-schema-elicitation",
4449
"web-standard-bearer-auth",
45-
"web-standard-oauth-metadata"
50+
"web-standard-oauth-metadata",
51+
"workerd-schema-preload"
4652
]
4753
}

packages/client/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# @modelcontextprotocol/client
22

3+
## 2.0.0-beta.4
4+
5+
### Minor Changes
6+
7+
- [#2468](https://github.com/modelcontextprotocol/typescript-sdk/pull/2468) [`5db6e38`](https://github.com/modelcontextprotocol/typescript-sdk/commit/5db6e38f2bdeb5052f608121e9a2679ff8742af2) Thanks [@felixweinberger](https://github.com/felixweinberger)! - The response cache now stores results as JSON-serialized documents (serialize on write, parse on read) instead of live object graphs isolated with `structuredClone`. Same mutation isolation, but no dependency on the `structuredClone` global — whose absence (jest+jsdom, Node < 17) previously made every cache write throw into the store-error swallow, silently disabling caching and output-schema lookups for the session. A value without a JSON representation now fails the write loudly to the error sink, and an undecodable document in an external store is reported, dropped, and read as a miss.
8+
9+
Migration for custom `ResponseCacheStore` implementations: `CacheEntry.value` (and the `set()` entry value) is now `string` — persist and return it verbatim, `JSON.parse` to inspect. Entries persisted by a previous SDK version fail decode once (reported, dropped) and are rewritten on the next fetch.
10+
11+
- [#2477](https://github.com/modelcontextprotocol/typescript-sdk/pull/2477) [`8e1d2e9`](https://github.com/modelcontextprotocol/typescript-sdk/commit/8e1d2e92b1720d2520122b3a5f20ea084edaf3c4) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Move the schema source modules (spec schemas, OAuth schemas, protocol constants) into `@modelcontextprotocol/core` and resolve them from there as a regular runtime dependency instead of bundling a private copy into each package. An application importing more than one of the packages now evaluates a single shared schema graph with shared object identity. `@modelcontextprotocol/core` gains a `./internal` subpath (SDK-internal contract; may change in any release) and the four packages now version together.
12+
13+
- [#2483](https://github.com/modelcontextprotocol/typescript-sdk/pull/2483) [`3f07a32`](https://github.com/modelcontextprotocol/typescript-sdk/commit/3f07a325c6741b2374ce2255846dfa0c25f74d03) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Add `preloadSchemas()`, an explicit opt-in to eager wire-schema construction, and call it automatically in the Cloudflare Workers builds. The wire schemas are built lazily by default, which is the right trade on process-per-invocation runtimes — but on isolate platforms that bill request CPU while module evaluation runs during isolate warm-up, laziness moves construction into the first request each fresh isolate serves. Calling `preloadSchemas()` at module scope (it is synchronous and idempotent) moves that one-time cost back to module evaluation; the packages' workerd export condition now does this automatically, while the Node and browser builds stay lazy. The server package gains a dedicated browser shim for this (its `browser` condition previously reused the workerd shim), so browser bundles keep lazy construction.
14+
15+
### Patch Changes
16+
17+
- [#2458](https://github.com/modelcontextprotocol/typescript-sdk/pull/2458) [`7c49b47`](https://github.com/modelcontextprotocol/typescript-sdk/commit/7c49b47fb3a58b51cec8fd0b337f656515f1a2b7) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Construct the default Ajv validation engine lazily on first validation. Creating a `Client` or `Server` no longer pays the ajv + ajv-formats instantiation cost at startup when no JSON Schema validation ever runs.
18+
19+
- [#2476](https://github.com/modelcontextprotocol/typescript-sdk/pull/2476) [`e0a0ab7`](https://github.com/modelcontextprotocol/typescript-sdk/commit/e0a0ab74d9baed74572c9f435313fb6daef1b989) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Build protocol-revision wire schemas lazily on first validation instead of at import. Each revision's schema set is now constructed by a module-level memoized factory, so importing the client or server package no longer pays the construction cost of both frozen wire-schema graphs up front. Method membership in the revision registries stays static, the schemas themselves are unchanged, and registry lookups keep returning reference-identical schema objects.
20+
21+
- Updated dependencies [[`8e1d2e9`](https://github.com/modelcontextprotocol/typescript-sdk/commit/8e1d2e92b1720d2520122b3a5f20ea084edaf3c4)]:
22+
- @modelcontextprotocol/core@2.0.0-beta.4
23+
324
## 2.0.0-beta.3
425

526
### Patch Changes

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/client",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0-beta.4",
44
"description": "Model Context Protocol implementation for TypeScript - Client package",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

packages/codemod/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @modelcontextprotocol/codemod
22

3+
## 2.0.0-beta.4
4+
5+
### Patch Changes
6+
7+
- [#2486](https://github.com/modelcontextprotocol/typescript-sdk/pull/2486) [`ee8267a`](https://github.com/modelcontextprotocol/typescript-sdk/commit/ee8267af4a55efda3cebdb35a1ebb1d797e4235d) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Version the codemod together with the core SDK packages, matching the migration guide's shared-version guarantee.
8+
39
## 2.0.0-beta.3
410

511
### Patch Changes

packages/codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/codemod",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0-beta.4",
44
"description": "Codemod to migrate MCP TypeScript SDK code from v1 to v2",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

packages/core-internal/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @modelcontextprotocol/core-internal
22

3+
## 2.0.0-beta.3
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`8e1d2e9`](https://github.com/modelcontextprotocol/typescript-sdk/commit/8e1d2e92b1720d2520122b3a5f20ea084edaf3c4)]:
8+
- @modelcontextprotocol/core@2.0.0-beta.4
9+
310
## 2.0.0-beta.2
411

512
### Minor Changes

packages/core-internal/package.json

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

packages/core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @modelcontextprotocol/core
22

3+
## 2.0.0-beta.4
4+
5+
### Minor Changes
6+
7+
- [#2477](https://github.com/modelcontextprotocol/typescript-sdk/pull/2477) [`8e1d2e9`](https://github.com/modelcontextprotocol/typescript-sdk/commit/8e1d2e92b1720d2520122b3a5f20ea084edaf3c4) Thanks [@felixweinberger](https://github.com/felixweinberger)! - Move the schema source modules (spec schemas, OAuth schemas, protocol constants) into `@modelcontextprotocol/core` and resolve them from there as a regular runtime dependency instead of bundling a private copy into each package. An application importing more than one of the packages now evaluates a single shared schema graph with shared object identity. `@modelcontextprotocol/core` gains a `./internal` subpath (SDK-internal contract; may change in any release) and the four packages now version together.
8+
39
## 2.0.0-beta.3
410

511
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/core",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0-beta.4",
44
"description": "Model Context Protocol for TypeScript — public Zod schemas (spec + OAuth/OpenID)",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

packages/middleware/express/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @modelcontextprotocol/express
22

3+
## 2.0.0-beta.4
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`7c49b47`](https://github.com/modelcontextprotocol/typescript-sdk/commit/7c49b47fb3a58b51cec8fd0b337f656515f1a2b7), [`e0a0ab7`](https://github.com/modelcontextprotocol/typescript-sdk/commit/e0a0ab74d9baed74572c9f435313fb6daef1b989), [`8e1d2e9`](https://github.com/modelcontextprotocol/typescript-sdk/commit/8e1d2e92b1720d2520122b3a5f20ea084edaf3c4), [`3f07a32`](https://github.com/modelcontextprotocol/typescript-sdk/commit/3f07a325c6741b2374ce2255846dfa0c25f74d03)]:
8+
- @modelcontextprotocol/server@2.0.0-beta.4
9+
310
## 2.0.0-beta.3
411

512
### Patch Changes

0 commit comments

Comments
 (0)