Client.connect() accepts several transport inputs and resolves the right connection automatically:
This page is under construction. The outline below sketches what it will cover.
- Resolution rules — string URLs become Streamable HTTP (with SSE fallback on 4xx);
StdioTransportspawns a subprocess; a live server instance connects via an in-memory transport pair; raw SDKTransportobjects pass through. - In-process connections — ideal for tests: full protocol fidelity without process or network overhead.
mcpServersconfigs —{ mcpServers: { name: { url } | { command } } }entries; single-entry configs return aClient, multi-entry return aMultiServerClient.