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§
- Client
Options - Who the client is and how it behaves.
- McpClient
- A connected client. Cheap to clone, and clones share the connection.
- Request
Options - Per-request options.
- Root
- A directory the client exposes to the server.
- Server
Info - What the server said in
initialize. - Tool
- A tool a server offers.
Enums§
- Resource
Kind - 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§
- Progress
Listener - Receives the parameters of
notifications/progressfor one request.