Skip to main content

Crate tower_mcp_types

Crate tower_mcp_types 

Source
Expand description

Lightweight MCP protocol and error types.

This crate provides the core type definitions for the Model Context Protocol (MCP) without pulling in runtime dependencies like Tower, Tokio, or axum.

Use this crate directly when you need MCP types for serialization, code generation, or editor integrations. For a full MCP server/client implementation, see tower-mcp.

Re-exports§

pub use error::BoxError;
pub use error::Error;
pub use error::ErrorCode;
pub use error::JsonRpcError;
pub use error::McpErrorCode;
pub use error::Result;
pub use error::ResultExt;
pub use error::ToolError;
pub use protocol::CallToolResult;
pub use protocol::Content;
pub use protocol::GetPromptResult;
pub use protocol::ReadResourceResult;

Modules§

error
Error types for MCP
protocol
MCP protocol types based on JSON-RPC 2.0