1 unstable release
new 0.1.0 | Mar 5, 2025 |
---|
#455 in Procedural macros
Used in 2 crates
(via mcp-server-fishcode2025)
50KB
1K
SLoC
mcp-macros-fishcode2025
用于简化 Model Context Protocol (MCP) 开发的宏。
功能
- 简化工具定义
- 简化资源处理
- 简化路由器实现
使用方法
将以下依赖添加到您的Cargo.toml
文件中:
[dependencies]
mcp-core-fishcode2025 = "1.0"
mcp-macros-fishcode2025 = "1.0"
示例
use mcp_core_fishcode2025::tool::Tool;
use mcp_macros_fishcode2025::tool;
#[tool]
fn my_tool(param1: String, param2: i32) -> Result<String, String> {
// 工具实现
Ok(format!("处理了 {} 和 {}", param1, param2))
}
更多示例请参考 项目文档 或 examples 目录。
Dependencies
~4–6MB
~100K SLoC