使用说明
MCP翼展
Rust中的MCP(模型上下文协议)服务器实现。
概述
MCP Wingspan是一个模型上下文协议服务器,为AI应用程序提供工具和资源。它演示了如何使用Rust构建MCP服务器。
特性
- 回显工具:回显输入消息
- 问候工具:用名字问候某人
- 示例资源:提供示例资源数据
建筑
cargo build --release
跑步
cargo run
或者运行发布二进制文件:
./target/release/mcp-wingspan
发展
# Run with debug logging
RUST_LOG=debug cargo run
CI/CD
本项目使用GitHub Actions进行持续集成:
-
CI工作流 (
.github/workflows/ci.yml):综合CI管道:- 在多个平台(Linux、macOS、Windows)上进行测试
- 在多个Rust版本上进行测试(稳定版、测试版、夜间版)
- 运行代码格式检查
- 运行Clippy门楣
- 构建和测试项目
-
Rust工作流 (
.github/workflows/rust.yml):简化了在Ubuntu上快速检查的工作流程 -
Dependabot (
.github/dependabot.yml):每周自动更新依赖关系
项目结构
mcp-wingspan/
├── .github/
│ ├── workflows/ # GitHub Actions workflows
│ │ ├── ci.yml # Comprehensive CI pipeline
│ │ └── rust.yml # Simplified Rust workflow
│ └── dependabot.yml # Dependabot configuration
├── Cargo.toml # Project dependencies and metadata
├── README.md # This file
├── src/
│ └── main.rs # Main server implementation
└── .gitignore # Git ignore rules
许可证
[在此处添加您的许可证]