hanzo-mcp-types
Rust type definitions for the Model Context Protocol (MCP).
Overview
This crate provides strongly-typed Rust definitions for all MCP protocol messages, enabling type-safe communication between AI agents and tool servers.
Installation
[]
= "0.6"
Usage
use ;
// Define a tool
let tool = Tool ;
// Create a tool call request
let request = CallToolRequest ;
Key Types
| Type | Description |
|---|---|
Tool |
Tool definition with name, description, and JSON schema |
CallToolRequest |
Request to execute a tool |
CallToolResult |
Result from tool execution |
ListToolsRequest |
Request to list available tools |
ListToolsResult |
List of available tools |
Content |
Tool output content (text, image, resource) |
Resource |
External resource reference |
Prompt |
Prompt template definition |
Protocol Version
This crate implements MCP specification version 2025-06-18.
- TypeScript schema (source of truth): schema.ts
- JSON schema: schema.json
Related Crates
hanzo-mcp-client- Async MCP clienthanzo-protocol- Core protocol typeshanzo-zap- Zero-copy Agent Protocol
License
MIT License - Copyright 2025 Hanzo AI Inc.