mcpkit-client
Client implementation for the Model Context Protocol (MCP).
This crate provides the client-side implementation including a fluent client API, server discovery, and connection pooling.
Overview
The MCP client allows AI applications to:
- Connect to MCP servers via various transports
- Discover and invoke tools
- Read resources
- Get prompts
- Track long-running tasks
- Handle server-initiated requests (sampling, elicitation)
Usage
use ClientBuilder;
use SpawnedTransport;
async
Features
Server Discovery
Discover MCP servers from configuration:
use ServerDiscovery;
let discovery = new;
discovery.register;
let server = discovery.get;
Connection Pooling
Manage multiple client connections:
use ;
let pool = builder
.max_connections
.build;
Client Handler
Handle server-initiated requests by implementing ClientHandler:
use ClientHandler;
;
Part of mcpkit
This crate is part of the mcpkit SDK. For most use cases, depend on mcpkit directly rather than this crate.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.