Skip to main content

Module client

Module client 

Source
Expand description

An MCP client over one transport: the initialize handshake, requests with timeouts, progress and cancellation, server requests (ping, roots/list) and notifications. Port of client.ts in pi-mcp v1.0.0.

Structs§

ClientOptions
Who the client is and how it behaves.
McpClient
A connected client. Cheap to clone, and clones share the connection.
RequestOptions
Per-request options.
Root
A directory the client exposes to the server.
ServerInfo
What the server said in initialize.
Tool
A tool a server offers.

Enums§

ResourceKind
What a resource listing lists.

Constants§

LATEST_PROTOCOL_VERSION
The protocol version the client asks for.
SUPPORTED_PROTOCOL_VERSIONS
Versions accepted from a server. A server that does not support the requested version answers with its own latest one.

Type Aliases§

ProgressListener
Receives the parameters of notifications/progress for one request.