Expand description
Core Client implementation for MCP communication
This module contains the main Client<T> struct and its implementation,
providing the core MCP client functionality including:
- Connection initialization and lifecycle management
- Message processing and bidirectional communication
- MCP operation support (tools, prompts, resources, sampling, etc.)
- Plugin middleware integration
- Handler registration and management
§Architecture
Client<T> is implemented as a cheaply-cloneable Arc wrapper with interior
mutability (same pattern as reqwest and AWS SDK):
- AtomicBool for initialized flag (lock-free)
- Arc<Mutex<…>> for handlers/plugins (infrequent mutation)
Arc<ClientInner<T>>for cheap cloning
Structs§
- Client
- The core MCP client implementation