mcp-client-rs

This Rust crate provides a client implementation for the Model Context Protocol, enabling structured communication between language models and external tools with async/await support and capability negotiation. This Rust crate

5
0

MCP Protocol Client - Very Much a WIP

Rust client implementation for the Model Context Protocol - a structured communication protocol facilitating communication between language models and external tools.

Features

  • Rust client implementation designed for Rust projects aiming to leverage the MCP protocol.
  • Async/await support via Tokio for concurrent operations.
  • Capability negotiation to establish compatible communication parameters.
  • Tool execution enabling interaction with external tools.
  • Resource management for efficient handling of resources during protocol interactions.
  • Prompt handling to manage and process prompts effectively.

Usage

The provided code snippet demonstrates how to initialize the Protocol client with a protocol version, command, arguments, and environment variables. It showcases calling a tool (search_repositories) with a JSON payload and printing the response.

Installation

To incorporate this client into your Rust project, add the following dependency to your Cargo.toml file:

[dependencies]
mcp-client-rs = { git = "https://github.com/tim-schultz/mcp-client-rs.git" }

License

MIT

Repository

TI
tim-schultz

tim-schultz/mcp-client-rs

Created

December 2, 2024

Updated

March 21, 2025

Language

Rust

Category

Developer Tools