refactor(client,server): move stdio transports to ./stdio subpath export (#1871)

Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
This commit is contained in:
Felix Weinberger 2026-04-29 14:48:36 +01:00 • committed by GitHub
commit 9fc9070b7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 194 additions and 31 deletions

View file

@ -28,7 +28,9 @@ export type { HostHeaderValidationResult } from './server/middleware/hostHeaderV
export { hostHeaderValidationResponse, localhostAllowedHostnames, validateHostHeader } from './server/middleware/hostHeaderValidation.js';
export type { ServerOptions } from './server/server.js';
export { Server } from './server/server.js';
export { StdioServerTransport } from './server/stdio.js';
// StdioServerTransport is exported from the './stdio' subpath — server stdio has only type-level Node
// imports (erased at compile time), but matching the client's `./stdio` subpath gives consumers a
// consistent shape across packages.
export type {
EventId,
EventStore,

View file

@ -0,0 +1,8 @@
// Subpath entry for the stdio server transport.
//
// Exported separately from the root entry to keep `StdioServerTransport` out of the default bundle
// surface — server stdio has only type-level Node imports, but matching the client's `./stdio`
// subpath gives consumers a consistent shape across packages. Import from
// `@modelcontextprotocol/server/stdio` only in process-stdio runtimes (Node.js, Bun, Deno).
export { StdioServerTransport } from './server/stdio.js';