一个模型上下文协议(MCP)服务器,帮助AI代理之间通过结构化的文档和进度跟踪来交接工作。
当AI代理需要在彼此之间传递工作时,此服务器提供:
只需使用npx运行,无需安装:
# 在MCP模式下启动(适用于MCP客户端)
npx -y mcp-handoff-server
# 启动HTTP服务器(用于测试/直接API访问)
npx -y mcp-handoff-server --mode http
就这样!服务器会自动创建所有所需的文件夹和模板。
在您的MCP客户端配置中添加:
{
"mcpServers": {
"handoff": {
"command": "npx",
"args": [
"-y",
"mcp-handoff-server"
]
}
}
}
# 启动服务器
npx -y mcp-handoff-server --mode http
# 测试是否正常工作
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 - 查找和筛选交接文档# 启动服务器
npx -y mcp-handoff-server --mode http
# 创建新的交接
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": "构建用户登录",
"status": "完成50%",
"nextStep": "添加密码验证"
},
"environmentStatus": {
"details": {
"Server": "✅",
"Database": "✅"
}
}
}
}
}'
npx -y mcp-handoff-server [options]
选项:
--mode <mode> 'mcp' 或 'http'(默认:mcp)
--port <port> HTTP端口(默认:3001)
--handoff-root <dir> 存储目录(默认:./handoff-system)
--help 显示帮助
--version 显示版本
graph TD
A[🤖 代理开始工作] --> B{新任务?}
B -->|是| C[📝 create_handoff]
B -->|否| D[📖 read_handoff]
C --> E[📁 当前交接]
D --> E
E --> F[🔄 update_handoff]
F --> G{工作完成?}
G -->|否| F
G -->|是| H[✅ complete_handoff]
H --> I[📦 archive_handoff]
I --> J[🗄️ 归档]
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/ - 文档模板📋 标准交接 - 用于复杂工作,具有详细背景 ⚡ 快速交接 - 用于简单更新和简短过渡
想要贡献或本地运行?
# 克隆并安装
git clone <repository-url>
cd mcp-handoff-server
npm install
# 开发模式运行
npm run dev
# 构建生产环境
npm run build
MIT许可证 - 欢迎在您的项目中使用!
为无缝AI代理协作而设计 🤖✨