Package-level declarations

Types

Link copied to clipboard
abstract class AbstractTransport : Transport

Implements onClose, onError and onMessage functions of Transport providing corresponding _onClose, _onError and _onMessage properties to use for an implementation.

Link copied to clipboard
typealias ProgressCallback = (Progress) -> Unit

Callback for progress notifications.

Link copied to clipboard
abstract class Protocol(options: ProtocolOptions?)

Implements MCP protocol framing on top of a pluggable transport, including features like request/response linking, notifications, and progress.

Link copied to clipboard
open class ProtocolOptions(var enforceStrictCapabilities: Boolean = false, var timeout: Duration = DEFAULT_REQUEST_TIMEOUT)

Additional initialization options.

Link copied to clipboard

Buffers a continuous stdio stream into discrete JSON-RPC messages.

Link copied to clipboard

Extra data given to request handlers.

Link copied to clipboard
data class RequestOptions(val onProgress: ProgressCallback? = null, val timeout: Duration = DEFAULT_REQUEST_TIMEOUT)

Options that can be given per request.

Link copied to clipboard
interface Transport

Describes the minimal contract for MCP transport that a client or server can communicate over.

Link copied to clipboard

Abstract class representing a WebSocket transport for the Model Context Protocol (MCP). Handles communication over a WebSocket session.

Properties

Link copied to clipboard

The default request timeout.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard