You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move stdio transports to a `./stdio` subpath export. Import `StdioClientTransport`, `getDefaultEnvironment`, `DEFAULT_INHERITED_ENV_VARS`, and `StdioServerParameters` from `@modelcontextprotocol/client/stdio`, and `StdioServerTransport` from `@modelcontextprotocol/server/stdio`. The `@modelcontextprotocol/client` root entry no longer pulls in `node:child_process`, `node:stream`, or `cross-spawn`, fixing bundling for browser and Cloudflare Workers targets; the `@modelcontextprotocol/server` root entry drops its `node:stream` reference. Node.js, Bun, and Deno consumers update the import path; runtime behavior is unchanged.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ When modifying exports:
74
74
- Use explicit named exports, not `export *`, in package `index.ts` files and `core/public`.
75
75
- Adding a symbol to a package `index.ts` makes it public API — do so intentionally.
76
76
- Internal helpers should stay in the core internal barrel and not be added to `core/public` or package index files.
77
+
- The package root entry must stay runtime-neutral so browser and Cloudflare Workers bundlers can consume it. Exports whose module graph transitively touches unpolyfillable Node builtins (`node:child_process`, `node:net`, `cross-spawn`, etc.) must live at a named subpath export (e.g. `./stdio`) and be covered by a `barrelClean` test in that package.
|`@modelcontextprotocol/sdk/server/streamableHttp.js`|`@modelcontextprotocol/node` (class renamed to `NodeStreamableHTTPServerTransport`) OR `@modelcontextprotocol/server` (web-standard `WebStandardStreamableHTTPServerTransport` for Cloudflare Workers, Deno, etc.) |
56
56
|`@modelcontextprotocol/sdk/server/sse.js`| REMOVED (migrate to Streamable HTTP) |
@@ -66,7 +66,7 @@ Replace all `@modelcontextprotocol/sdk/...` imports using this table.
66
66
|`@modelcontextprotocol/sdk/shared/transport.js`|`@modelcontextprotocol/client` or `@modelcontextprotocol/server`|
67
67
|`@modelcontextprotocol/sdk/shared/uriTemplate.js`|`@modelcontextprotocol/client` or `@modelcontextprotocol/server`|
68
68
|`@modelcontextprotocol/sdk/shared/auth.js`|`@modelcontextprotocol/client` or `@modelcontextprotocol/server`|
69
-
|`@modelcontextprotocol/sdk/shared/stdio.js`|`@modelcontextprotocol/client` or `@modelcontextprotocol/server`|
69
+
|`@modelcontextprotocol/sdk/shared/stdio.js`|`@modelcontextprotocol/client` or `@modelcontextprotocol/server`(`ReadBuffer`, `serializeMessage`, `deserializeMessage` are in the root barrel; the `./stdio` subpath only has the transport class) |
0 commit comments