mcpkit 0.5.0

Rust SDK for the Model Context Protocol (MCP) - the official facade crate providing unified access to all mcpkit functionality
Documentation
//! Prelude module for convenient imports.
//!
//! Import everything you need with a single use statement:
//!
//! ```rust
//! use mcpkit::prelude::*;
//!
//! // Now you have access to all common types
//! let info = ServerInfo::new("my-server", "1.0.0");
//! let caps = ServerCapabilities::new().with_tools();
//! ```
//!
//! This module re-exports the most commonly used types from the MCP SDK,
//! making it easy to get started without having to import individual items.
//!
//! ## Included Types
//!
//! ### Serde (for convenience)
//! - `Serialize`, `Deserialize` - common derive traits
//! - `json!` - JSON value construction macro
//!
//! ### Core Types
//! - Protocol types (Request, Response, Notification, Message)
//! - Error types (`McpError`, `JsonRpcError`)
//! - Capability types (`ServerCapabilities`, `ClientCapabilities`)
//! - Result types (`CallToolResult`, `GetPromptResult`, etc.)
//!
//! ### Server Types
//! - Handler traits (`ToolHandler`, `ResourceHandler`, `PromptHandler`, etc.)
//! - Server and `ServerBuilder`
//! - Context and `ContextData`
//!
//! ### Transport Types
//! - Transport trait
//! - `TransportListener` trait
//! - `TransportMetadata`
//!
//! ### Macros
//! - `#[mcp_server]` - Main server macro
//! - `#[tool]` - Tool attribute
//! - `#[resource]` - Resource attribute
//! - `#[prompt]` - Prompt attribute
//! - `#[derive(ToolInput)]` - Parameter struct derive

// Core types
pub use mcpkit_core::prelude::*;

// Server types
pub use mcpkit_server::{
    CompletionHandler, Context, ContextData, ElicitationHandler, LogLevel, LoggingHandler,
    PromptHandler, ResourceHandler, SamplingHandler, Server, ServerBuilder, ServerHandler,
    TaskHandler, ToolHandler,
};

// Transport types
pub use mcpkit_transport::{Transport, TransportListener, TransportMetadata};

// Macros - these are automatically available at crate root
pub use mcpkit_macros::{
    ToolInput, elicitation, mcp_client, mcp_server, on_connected, on_disconnected,
    on_prompts_list_changed, on_resource_updated, on_resources_list_changed, on_task_progress,
    on_tools_list_changed, prompt, resource, roots, sampling, tool,
};