import { gt as JSONRPCMessage, n as Transport } from "./transport-DMKhEchd.mjs"; import { Readable, Writable } from "node:stream"; //#region src/server/stdio.d.ts /** * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`. * * This transport is only available in Node.js environments. * * @example * ```ts source="./stdio.examples.ts#StdioServerTransport_basicUsage" * const server = new McpServer({ name: 'my-server', version: '1.0.0' }); * const transport = new StdioServerTransport(); * await server.connect(transport); * ``` */ declare class StdioServerTransport implements Transport { private _stdin; private _stdout; private _readBuffer; private _started; private _closed; constructor(_stdin?: Readable, _stdout?: Writable, options?: { /** * Maximum size of the read buffer in bytes. If a single message exceeds * this size the transport will emit an error and close. * * Defaults to 10 MB. */ maxBufferSize?: number; }); onclose?: () => void; onerror?: (error: Error) => void; onmessage?: (message: JSONRPCMessage) => void; _ondata: (chunk: Buffer) => void; _onerror: (error: Error) => void; _onstdouterror: (error: Error) => void; /** * Starts listening for messages on `stdin`. */ start(): Promise; private processReadBuffer; close(): Promise; send(message: JSONRPCMessage): Promise; } //#endregion export { StdioServerTransport }; //# sourceMappingURL=stdio.d.mts.map