Skip to content

Commit 9b2b5d3

Browse files
fix: address review comments on stdio subpath PR
- README.md: split root-barrel StdioServerTransport import into /stdio subpath - packages/server/package.json: drop unused @types/cross-spawn devDependency - CLAUDE.md: document runtime-neutral root barrel rule under Public API Exports
1 parent dd8085e commit 9b2b5d3

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ When modifying exports:
7474
- Use explicit named exports, not `export *`, in package `index.ts` files and `core/public`.
7575
- Adding a symbol to a package `index.ts` makes it public API — do so intentionally.
7676
- 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.
7778

7879
### Transport System
7980

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ npm install @modelcontextprotocol/hono hono
9595
Here is what an MCP server looks like. This minimal example exposes a single `greet` tool over stdio:
9696

9797
```typescript
98-
import { McpServer, StdioServerTransport } from '@modelcontextprotocol/server';
98+
import { McpServer } from '@modelcontextprotocol/server';
99+
import { StdioServerTransport } from '@modelcontextprotocol/server/stdio';
99100
import * as z from 'zod/v4';
100101

101102
const server = new McpServer({ name: 'greeting-server', version: '1.0.0' });

packages/server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
"@modelcontextprotocol/test-helpers": "workspace:^",
9393
"@modelcontextprotocol/tsconfig": "workspace:^",
9494
"@modelcontextprotocol/vitest-config": "workspace:^",
95-
"@types/cross-spawn": "catalog:devTools",
9695
"@types/eventsource": "catalog:devTools",
9796
"@typescript/native-preview": "catalog:devTools",
9897
"eslint": "catalog:devTools",

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)