The Rust Implementation of Model Context Protocol (MCP) is a project that provides strongly-typed Rust bindings generated from the official MCP JSON Schema. This implementation is designed to standardize context exchange between AI models and their runtime environments.
The types are generated from the official MCP schema version 2024-11-05:
To use the generated types in your Rust project, import them from the types
module:
use mcp::types::*;
The types are generated using typify, a tool that converts JSON Schema into idiomatic Rust types with full serde support.