Expand description
Rust SDK for building MCP (Model Context Protocol) WebAssembly components
This crate provides the core traits and macros for implementing MCP handlers in Rust.
Modules§
Macros§
- create_
handler - Macro for generating MCP handler implementations.
- implement_
http - Macro to implement the HTTP send function using the component’s bindings
- json
- Re-export of
serde_json’sjson!macro for convenience. Construct aserde_json::Valuefrom a JSON literal.
Structs§
- Prompt
Argument - Represents a single argument for a prompt.
- Prompt
Message - Represents a message in a prompt conversation.
Enums§
- Json
- Re-export of
serde_json::ValueasJsonfor convenience. Represents any valid JSON value. - Prompt
Role - The role of a participant in a prompt conversation.
Traits§
- Async
Prompt Handler - Async trait for implementing MCP prompts.
- Async
Resource Handler - Async trait for implementing MCP resources.
- Async
Tool Handler - Async trait for implementing MCP tools.
- Prompt
Arguments - Trait for defining prompt arguments.
- Prompt
Handler - Trait for implementing MCP prompts.
- Resource
Handler - Trait for implementing MCP resources.
- Tool
Handler - Trait for implementing MCP tools.