| Crates.io | mmcp |
| lib.rs | mmcp |
| version | 0.1.0 |
| created_at | 2025-04-12 09:11:11.061453+00 |
| updated_at | 2025-04-12 09:11:11.061453+00 |
| description | A modular, minimalistic and macro-powered MCP (Model Context Protocol) framework for Rust. |
| homepage | https://github.com/ryo33/mmcp |
| repository | https://github.com/ryo33/mmcp |
| max_upload_size | |
| id | 1630759 |
| size | 37,649 |
A modular, minimalistic and macro-powered MCP (Model Context Protocol) framework for Rust.
This is the main crate for the MMCP framework, providing core functionality and interfaces.
use mmcp::{
server::{MCPServer, primitives::tool::Text, stdio_server_rpc},
tool,
};
use uuid::Uuid;
/// Generate a UUID
#[tool]
fn generate_uuid() -> Text<Uuid> {
Text(Uuid::new_v4())
}
/// Generate multiple UUIDs
#[tool]
fn generate_uuid_many(count: usize) -> Vec<Text<Uuid>> {
(0..count).map(|_| generate_uuid()).collect()
}
#[tokio::main]
async fn main() {
let server = MCPServer::new("mmcp-uuid", env!("CARGO_PKG_VERSION")).with_tools_from_inventory();
let adapter = stdio_server_rpc();
server.start(adapter).await.unwrap();
}
Licensed under either of Apache License, Version 2.0 or MIT license at your option.