简单的mcp-mcp项目
一个完整的MCP项目,包括客户端和服务器组件,使用stdio传输。
特性
- 强有力的沟通:可靠的stdio传输,具有适当的错误处理和超时管理
- 多种连接方式:连接到已运行的服务器或启动新的服务器进程
- 交互模式:选择工具并交互式提供参数
- 一次性模式:直接从命令行运行查询
- 综合录井:调试和监控的详细日志记录
项目结构
client/:MCP客户端实现server/:使用工具实现MCP服务器test.sh:运行客户端和服务器的测试脚本
建筑
# Build the server
cd server
cargo build
# Build the client
cd ../client
cargo build跑步
启动服务器
cd server
cargo run运行客户端
cd client
cargo run -- --name "Your Name"交互模式
cd client
cargo run -- --interactive测试
./test.sh可用工具
hello:一个用名字问候某人的简单工具

