Skip to main content
Defined in: client/transports.ts:43

Methods

_modernFetch()?

Defined in: client/transports.ts:61 Optional modern-era (2026-07-28) in-process fetch entrypoint, for servers built on createMcpHandler (e.g. FastMCP’s own _modernFetch). InMemoryTransport — used by connect() above — is 2025-era only (the legacy Server/session model); there is no in-process equivalent of a real HTTP round trip for the modern era’s stateless-per-request dispatch. When present, and the caller pins modern era via versionNegotiation: { mode: { pin: '2026-07-28' } }, the client builds a StreamableHTTPClientTransport whose fetch calls this function directly — no sockets, but otherwise the same code path a real HTTP connection takes. Not used for 'auto' or 'legacy' modes: this server-side hook is modern-only (mirrors createMcpHandler(..., { legacy: 'reject' })), so auto-negotiation (which must be able to fall back to legacy) still goes through connect() + InMemoryTransport, and stays legacy-only for in-process servers until a dual-era in-process bridge exists.

Parameters

request
Request
options?
unknown

Returns

Promise<Response>

connect()

Defined in: client/transports.ts:44

Parameters

transport
Transport

Returns

Promise<void>