McpProtocol
Defines the MCP protocol implementations that an McpServer can support.
Models
AnyProtocolAdapter interface
The operational shape shared by protocol adapters.
Signature
interface AnyProtocolAdapter<out Version extends string = string, HandlerRequirements = unknown> { readonly clientNotificationRpcs: ErasedRpcGroup; readonly clientRpcs: ErasedClientRpcGroup; readonly installHandlers: (core: any, lifecycle: any, target: any) => Effect<void, never, HandlerRequirements>; readonly makeReverseClient: (profile: any) => Effect<McpReverseClient, never, Scope | Protocol>; readonly normalizeCancellation: (payload: unknown) => Effect<any, unknown>; readonly payloadCodecs: (rpc: AnyWithProps) => PayloadCodecs; readonly projectNotification: (notification: any) => Effect<ProjectedNotification | undefined, any>; readonly protocolVersion: Version; readonly serverNotificationRpcs: ErasedRpcGroup<AnyWithProps>; readonly serverRequestRpcs: Any; readonly transport: { readonly acceptsJsonRpcBatches: boolean; readonly requiresVersionHeader: boolean; };}ErasedClientRpcGroup interface
The additional operation required from the complete client RPC group.
Signature
interface ErasedClientRpcGroup extends ErasedRpcGroup { readonly prefix: (prefix: string) => RpcGroup<any>;}ErasedRpcGroup interface
The operations required from an RPC group after its RPC union is erased.
Signature
interface ErasedRpcGroup<RpcType extends Rpc.Any = Rpc.Any> { readonly requests: ReadonlyMap<string, RpcType>;}PayloadCodecs interface
Payload codecs used by a protocol adapter.
Signature
interface PayloadCodecs { readonly decode: (input: unknown) => Effect<unknown, SchemaError>; readonly encode: (input: unknown) => Effect<unknown, SchemaError>;}ProjectedNotification interface
A notification projected into a protocol-specific payload.
Signature
interface ProjectedNotification { readonly payload: unknown; readonly tag: string;}ProtocolAdapter interface
An MCP protocol adapter that can be supplied to McpServer.
Signature
interface ProtocolAdapter<out Version extends ProtocolVersion = ProtocolVersion> extends AnyProtocolAdapter<Version> {}ProtocolVersion type
The MCP protocol versions implemented by this release.
Signature
type ProtocolVersion = "2024-11-05" | "2025-03-26" | "2025-06-18" | "2025-11-25"Protocols
v2024_11_05
The MCP 2024-11-05 protocol implementation.
Details
It provides the dated schema and stdio behavior. When supplied to
McpServer.layerHttp, the server uses its single-endpoint Streamable HTTP
compatibility transport; it does not implement the historical two-endpoint
HTTP+SSE transport.
Signature
declare const v2024_11_05: ProtocolAdapter<"2024-11-05">v2025_03_26
The MCP 2025-03-26 protocol implementation.
Signature
declare const v2025_03_26: ProtocolAdapter<"2025-03-26">v2025_06_18
The MCP 2025-06-18 protocol implementation.
Signature
declare const v2025_06_18: ProtocolAdapter<"2025-06-18">v2025_11_25
The MCP 2025-11-25 protocol implementation.
Signature
declare const v2025_11_25: ProtocolAdapter<"2025-11-25">