Crate wasmcp

Crate wasmcp 

Source
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§

http

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’s json! macro for convenience. Construct a serde_json::Value from a JSON literal.

Structs§

PromptArgument
Represents a single argument for a prompt.
PromptMessage
Represents a message in a prompt conversation.

Enums§

Json
Re-export of serde_json::Value as Json for convenience. Represents any valid JSON value.
PromptRole
The role of a participant in a prompt conversation.

Traits§

AsyncPromptHandler
Async trait for implementing MCP prompts.
AsyncResourceHandler
Async trait for implementing MCP resources.
AsyncToolHandler
Async trait for implementing MCP tools.
PromptArguments
Trait for defining prompt arguments.
PromptHandler
Trait for implementing MCP prompts.
ResourceHandler
Trait for implementing MCP resources.
ToolHandler
Trait for implementing MCP tools.