mcpWebSocketTransport

fun Route.mcpWebSocketTransport(handler: suspend WebSocketMcpServerTransport.() -> Unit = {})(source)

Registers a WebSocket route that creates an MCP server transport layer.

Parameters

handler

A suspend function that defines the behavior of the transport layer.


fun Route.mcpWebSocketTransport(path: String, handler: suspend WebSocketMcpServerTransport.() -> Unit = {})(source)

Registers a WebSocket route at the specified path that creates an MCP server transport layer.

Parameters

path

The URL path at which to register the WebSocket route.

handler

A suspend function that defines the behavior of the transport layer.