mcp-kit-macros
Procedural macros for the mcp-kit crate.
This crate provides attribute macros that simplify building MCP (Model Context Protocol) servers by automatically generating boilerplate code and JSON schemas.
Macros
#[tool]
Generate tools from async functions with automatic schema generation:
use *;
async
// Use the generated function
builder
.tool_def
.build
#[resource]
Generate resource handlers for static or template URIs:
use ;
async
// Template resource with {variables}
async
#[prompt]
Generate prompt handlers with optional arguments:
use ;
async
Usage
Add to your Cargo.toml:
[]
= "0.1"
The macros are automatically re-exported by mcp-kit, so you don't need to add this crate as a direct dependency.
Documentation
See the main mcp-kit documentation for complete usage guides and examples.
License
MIT