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.
Macros§
- create_
handler Deprecated - Legacy macro for backwards compatibility (deprecated).
Please use the
#[mcp_handler]
attribute macro instead. - json
- Re-export of
serde_json
’sjson!
macro for convenience. Construct aserde_json::Value
from 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::Value
asJson
for 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.
Attribute Macros§
- mcp_
handler - Re-export the proc macro for creating MCP handlers.