mcpr

MCPR is a Rust implementation of Anthropic's Model Context Protocol, providing tools and libraries for connecting AI assistants to data sources. It offers schema definitions, transport layers, and CLI tools

305
14

MCPR - Model Context Protocol for Rust

A Rust implementation of Anthropic's Model Context Protocol (MCP), an open standard for connecting AI assistants to data sources and tools.

Important Notice: Version 0.2.0 has been yanked. Use version 0.2.3 or later.

Examples

The GitHub Tools example demonstrates an MCP client-server application interacting with GitHub repositories.

Features

  • Schema Definitions: Complete implementation of the MCP schema.
  • Transport Layer: stdio and SSE transport options.
  • High-Level Client/Server: Easy-to-use client and server implementations.
  • CLI Tools: Generate server and client stubs.
  • Project Generator: Quickly scaffold new MCP projects.
  • Mock Implementations: Built-in mock transports for testing.

Coming Soon

  • WebSocket Transport: WebSocket transport implementation is planned.

Installation

Add mcpr = "0.2.3" to your Cargo.toml. Install CLI tools globally with cargo install mcpr.

Usage

Provides code snippets for high-level client and server implementations using StdioTransport.

Creating MCP Projects

MCPR includes a project generator accessible via the CLI. Projects include client/server implementations and test scripts. Local development allows switching between crates.io and local versions.

Transport Options

Supports StdioTransport and SSETransport. WebSocket support is planned.

Detailed Testing Guide

Provides instructions for generating and testing projects with stdio and SSE transports, including troubleshooting tips.

Contributing

Fork, create a feature branch, commit, push, and open a pull request.

License

MIT License.

Repository

CO
conikeec

conikeec/mcpr

Created

March 13, 2025

Updated

March 28, 2025

Language

Rust

Category

Developer Tools