rmcp-macros
Procedural macros for the RMCP SDK. Most users should depend on rmcp with the macros feature (enabled by default) rather than using this crate directly.
For getting started and full MCP feature documentation, see the main README.
Available Macros
| Macro | Description |
|---|---|
#[tool] |
Mark a function as an MCP tool handler |
#[tool_router] |
Generate a tool router from an impl block |
#[tool_handler] |
Generate call_tool and list_tools handler methods |
#[prompt] |
Mark a function as an MCP prompt handler |
#[prompt_router] |
Generate a prompt router from an impl block |
#[prompt_handler] |
Generate get_prompt and list_prompts handler methods |
#[task_handler] |
Wire up the task lifecycle on top of an OperationProcessor |
Quick Example
use ;
See the full documentation for detailed usage of each macro.
License
This project is licensed under the terms specified in the repository's LICENSE file.