🤝 MCP切换服务器
A. 模型上下文协议(MCP)服务器 这有助于人工智能代理通过结构化文档和进度跟踪将工作移交给彼此。
✨ 它做什么
当AI代理需要在彼此之间传递工作时,此服务器提供:
- 📝 结构化移交文件 使用模板
- 🔄 进度跟踪 从开始到完成
- 📁 自动组织 活动交接和存档交接
- 🔍 轻松搜索 过滤过去的工作
🚀 快速开始
只需使用npx运行它,无需安装:
# Start in MCP mode (for MCP clients)
npx -y mcp-handoff-server
# Start HTTP server (for testing/direct API access)
npx -y mcp-handoff-server --mode http就是这样!服务器会自动创建所有需要的文件夹和模板。
📋 基本用法
适用于MCP客户
添加到MCP客户端配置中:
{
"mcpServers": {
"handoff": {
"command": "npx",
"args": [
"-y",
"mcp-handoff-server"
]
}
}
}用于HTTP测试
# Start server
npx -y mcp-handoff-server --mode http
# Test it works
curl http://localhost:3001/health🛠️ 可用工具
服务器为AI代理提供以下MCP工具:
graph LR
A[📝 create_handoff] --> B[📖 read_handoff]
B --> C[🔄 update_handoff]
C --> D[✅ complete_handoff]
D --> E[📦 archive_handoff]
F[📋 list_handoffs] --> B
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
style E fill:#fff3e0
style F fill:#fce4ec工具功能:
create_handoff-启动新的移交文档read_handoff-读取现有切换update_handoff-添加进度更新complete_handoff-将工作标记为已完成archive_handoff-将已完成的工作移至存档list_handoffs-查找并过滤交接单
📖 示例:创建切换
# Start the server
npx -y mcp-handoff-server --mode http
# Create a new handoff
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "create_handoff",
"params": {
"type": "quick",
"initialData": {
"date": "2025-06-30",
"time": "14:30 UTC",
"currentState": {
"workingOn": "Building user login",
"status": "50% complete",
"nextStep": "Add password validation"
},
"environmentStatus": {
"details": {
"Server": "✅",
"Database": "✅"
}
}
}
}
}'🔧 命令选项
npx -y mcp-handoff-server [options]
Options:
--mode 'mcp' or 'http' (default: mcp)
--port
HTTP port (default: 3001)
--handoff-root Storage directory (default: ./handoff-system)
--help Show help
--version Show version🔄 运作原理
简单的工作流程
- 创建 开始工作时的交接
- 更新 工作中的进步
- 完成 完成时
- 档案 以备查
graph TD
A[🤖 Agent Starts Work] --> B{New Work?}
B -->|Yes| C[📝 create_handoff]
B -->|No| D[📖 read_handoff]
C --> E[📁 Active Handoff]
D --> E
E --> F[🔄 update_handoff]
F --> G{Work Done?}
G -->|No| F
G -->|Yes| H[✅ complete_handoff]
H --> I[📦 archive_handoff]
I --> J[🗄️ Archived]
style C fill:#e1f5fe
style F fill:#f3e5f5
style H fill:#e8f5e8
style I fill:#fff3e0文件组织
服务器会自动将所有内容组织到文件夹中:
handoff-system/active/-当前工作handoff-system/archive/-已完成的工作handoff-system/templates/-文档模板
🎯 两种类型的交接
📋 标准切换 -适用于具有详细背景的复杂工作 ⚡ 快速切换 -用于简单的更新和简短的转换
🏷️ 状态指示灯
- ✅ 工作 -一切都好
- ⚠️ 警告 -存在一些问题,但未被阻止
- ❌ 错误 -需要解决的问题
🛠️ 发展
您想在本地进行贡献或运营吗?
# Clone and install
git clone
cd mcp-handoff-server
npm install
# Run in development
npm run dev
# Build for production
npm run build📄 许可证
麻省理工学院许可证-请在您的项目中自由使用!
🆘 需要帮助?
- 问题:
- MCP协议: 模型上下文协议文档
______________________________________________________________________
为无缝的AI代理协作而构建 🤖✨
