Expand description
Client for remote MCP servers over Streamable HTTP (JSON-RPC 2.0).
Not to be confused with greentic-mcp
(greentic-mcp-exec), which loads and executes wasix:mcp WASM
components locally. This crate is the network-client side: it connects to
remote MCP servers, lists their tools, and invokes them.
The proto module is sans-io and compiles for wasm32-wasip2
(default-features = false); the client module (feature native, on
by default) adds two transports sharing the client::McpClient shape:
McpHttpClient (reqwest, remote) and McpStdioClient (tokio process,
local subprocess speaking newline-delimited JSON-RPC).
Re-exports§
pub use auth::McpAuth;pub use error::McpError;pub use error::ProtoError;pub use error::ServerError;pub use error::ToolCallError;pub use proto::McpToolDef;pub use proto::PROTOCOL_VERSION;pub use proto::ToolOutput;pub use client::McpClient;pub use client::McpClientOptions;pub use client::McpHttpClient;pub use client::McpStdioClient;pub use client::ServerInfo;
Modules§
- auth
- Auth header configuration for remote MCP servers.
- client
- Native transports for MCP servers (feature
native). - error
- Error types shared by the sans-io proto layer and the native client.
- proto
- Sans-io MCP (Streamable HTTP / JSON-RPC 2.0) protocol helpers. No network or WIT imports — usable from native hosts and wasm guests alike.