Skip to main content

Module mcp_client

Module mcp_client 

Source
Expand description

MCP client implementation

Module provides the main MCP client that can connect to MCP servers, initialize connections, and perform operations like calling tools, reading resources, and executing prompts according to the Model Context Protocol specification.

§Standards-track and proprietary HTTP

Use McpClient::connect_with_http for standards-track MCP, including MCP 2026 request-scoped subscription SSE. The optional chunked-encoding feature exposes historical Prism-specific endpoints:

[dependencies]
prism-mcp-rs = { version = "3", features = ["chunked-encoding"] }

Those helpers require explicit ProtocolMode::LegacyOnly and a peer that implements the same proprietary routes; automatic transport selection never chooses them.

Structs§

ClientConfig
Configuration for the MCP client
McpClient
Main MCP client implementation
McpClientBuilder
Client builder for easier construction
TransportInfo
Information about a transport for comparison

Enums§

TransportUseCase
Transport use case guide for automatic selection