@modelcontextprotocol/server 2.0.0-alpha.3 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +7 -4
  2. package/dist/{ajvProvider-Birb50r-.mjs → ajvProvider-BQMcjynJ.mjs} +952 -154
  3. package/dist/ajvProvider-BQMcjynJ.mjs.map +1 -0
  4. package/dist/{ajvProvider-DZ_siXcF.d.mts → ajvProvider-Dzgk80kq.d.mts} +58 -11
  5. package/dist/ajvProvider-Dzgk80kq.d.mts.map +1 -0
  6. package/dist/{cfWorkerProvider-BrJKpSFH.mjs → cfWorkerProvider-BDC2rVl3.mjs} +21 -5
  7. package/dist/cfWorkerProvider-BDC2rVl3.mjs.map +1 -0
  8. package/dist/{cfWorkerProvider-DUhk5Ewx.d.mts → cfWorkerProvider-DmvjVsvQ.d.mts} +13 -6
  9. package/dist/cfWorkerProvider-DmvjVsvQ.d.mts.map +1 -0
  10. package/dist/{transport-DMKhEchd.d.mts → createMcpHandler-Du3hjXvf.d.mts} +5283 -1559
  11. package/dist/createMcpHandler-Du3hjXvf.d.mts.map +1 -0
  12. package/dist/index.d.mts +167 -2015
  13. package/dist/index.d.mts.map +1 -1
  14. package/dist/index.mjs +1238 -1281
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/mcp-JttQJlI9.mjs +9998 -0
  17. package/dist/mcp-JttQJlI9.mjs.map +1 -0
  18. package/dist/shimsNode.d.mts +1 -1
  19. package/dist/shimsNode.mjs +1 -1
  20. package/dist/shimsWorkerd.d.mts +1 -1
  21. package/dist/shimsWorkerd.mjs +1 -1
  22. package/dist/stdio.d.mts +61 -3
  23. package/dist/stdio.d.mts.map +1 -1
  24. package/dist/stdio.mjs +457 -2
  25. package/dist/stdio.mjs.map +1 -1
  26. package/dist/types-DBYdVs-n.d.mts +1099 -0
  27. package/dist/types-DBYdVs-n.d.mts.map +1 -0
  28. package/dist/validators/ajv.d.mts +1 -1
  29. package/dist/validators/ajv.mjs +1 -1
  30. package/dist/validators/cfWorker.d.mts +1 -1
  31. package/dist/validators/cfWorker.mjs +1 -1
  32. package/package.json +3 -6
  33. package/dist/ajvProvider-Birb50r-.mjs.map +0 -1
  34. package/dist/ajvProvider-DZ_siXcF.d.mts.map +0 -1
  35. package/dist/cfWorkerProvider-BrJKpSFH.mjs.map +0 -1
  36. package/dist/cfWorkerProvider-DUhk5Ewx.d.mts.map +0 -1
  37. package/dist/src-Pa1iAvsj.mjs +0 -3386
  38. package/dist/src-Pa1iAvsj.mjs.map +0 -1
  39. package/dist/transport-DMKhEchd.d.mts.map +0 -1
  40. package/dist/types-R2RTIcjk.d.mts +0 -66
  41. package/dist/types-R2RTIcjk.d.mts.map +0 -1
package/README.md CHANGED
@@ -4,24 +4,27 @@ The MCP (Model Context Protocol) TypeScript server SDK. Build MCP servers that e
4
4
 
5
5
  <!-- prettier-ignore -->
6
6
  > [!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.
8
8
 
9
9
  <!-- prettier-ignore -->
10
10
  > [!NOTE]
11
- > This is **v2** of the MCP TypeScript SDK. It replaces the monolithic `@modelcontextprotocol/sdk` package from v1. See the **[migration guide](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/migration.md)** if you're coming from v1.
11
+ > This is **v2** of the MCP TypeScript SDK. It replaces the monolithic `@modelcontextprotocol/sdk` package from v1. See the **[migration guide](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/migration/upgrade-to-v2.md)** if you're coming from v1.
12
12
 
13
13
  ## Install
14
14
 
15
15
  ```bash
16
- npm install @modelcontextprotocol/server@alpha
16
+ npm install @modelcontextprotocol/server@beta
17
17
  ```
18
18
 
19
+ TypeScript ≥6.0 no longer auto-includes `@types/*` — add `"types": ["node"]` to your `tsconfig.json` `compilerOptions` (the published `.d.mts` references `Buffer`).
20
+
19
21
  Optional framework adapters: [`@modelcontextprotocol/express`](https://www.npmjs.com/package/@modelcontextprotocol/express), [`@modelcontextprotocol/hono`](https://www.npmjs.com/package/@modelcontextprotocol/hono),
20
22
  [`@modelcontextprotocol/node`](https://www.npmjs.com/package/@modelcontextprotocol/node).
21
23
 
22
24
  ## Documentation
23
25
 
24
26
  - **[Repository README](https://github.com/modelcontextprotocol/typescript-sdk#readme)** — overview, package layout, examples
25
- - **[Server guide](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/docs/server.md)**
27
+ - **[Server guide](https://ts.sdk.modelcontextprotocol.io/v2/servers/tools)** — tools, resources, prompts, and the rest of the server surface
28
+ - **[Serving guide](https://ts.sdk.modelcontextprotocol.io/v2/serving/http)** — stdio, HTTP, the framework adapters, sessions, and authorization
26
29
  - **[API reference](https://ts.sdk.modelcontextprotocol.io/v2/)**
27
30
  - **[MCP specification](https://modelcontextprotocol.io)**