Model Context Protocol (MCP) Types
LocalAbout Model Context Protocol (MCP) Types
Model Context Protocol (MCP) Types is a Rust crate for developers implementing MCP-related software. It provides strongly typed Rust bindings generated from the official MCP JSON Schema, with serde support.
Key features
- 01Generated Rust bindings for MCP
- 02Types derived from the official JSON Schema
- 03Serde support
Use cases
- 01Use MCP types in Rust projects
- 02Deserialize MCP data with serde
MCP support
It provides Rust types generated from the MCP specification schema; it is not described as an MCP server implementation.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEModel Context Protocol (MCP) Types
This repository contains Rust types generated from the Model Context Protocol (MCP) specification.
About
The Model Context Protocol (MCP) is a specification for standardizing context exchange between AI models and their runtime environments. This crate provides strongly-typed Rust bindings generated from the official MCP JSON Schema.
Schema Source
The types are generated from the official MCP schema version 2024-11-05:
- Schema URL: https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json
- Specification Documentation: https://spec.modelcontextprotocol.io/specification/2024-11-05/
Usage
The generated types are available through the types module. Import them in your code:
use mcp::types::*;
Generation
The types are generated using typify, which converts JSON Schema into idiomatic Rust types with full serde support.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.