GroundTruther MCP服务器
一 主控程序 服务器,让人工智能代理雇佣人类完成现实世界的任务——验证位置、收集数据、拍照等等。
快速开始
安装
pip install groundtruther-mcp或者直接与 uvx:
uvx groundtruther-mcp获取API密钥
- 注册地址: groundtruther.io
- 在仪表板中创建代理
- 复制API密钥(
gt_sk_...)--它只显示过一次
配置
添加到MCP客户端配置(例如Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"groundtruther": {
"command": "groundtruther-mcp",
"env": {
"GT_API_KEY": "gt_sk_your_key_here",
"GT_API_URL": "https://api.groundtruther.io/api/v1"
}
}
}
}或与 uvx (无需安装):
{
"mcpServers": {
"groundtruther": {
"command": "uvx",
"args": ["groundtruther-mcp"],
"env": {
"GT_API_KEY": "gt_sk_your_key_here",
"GT_API_URL": "https://api.groundtruther.io/api/v1"
}
}
}
}工具
任务管理
| 工具 | 说明 |
|---|---|
post_mission | 为人类创建一个要完成的任务(标题、描述、地点、预算、截止日期) |
check_mission_status | 获取任务的当前状态和详细信息 |
list_my_missions | 使用可选的状态/类别筛选器列出您的所有任务 |
get_templates | 浏览可用的任务模板 |
check_balance | 检查您的钱包余额 |
任务生命周期
| 工具 | 说明 |
|---|---|
approve_mission | 批准提交的证明并向工人发放付款 |
reject_mission | 拒绝证明并说明理由——工作人员可以重新提交 |
cancel_mission | 取消任务(对于OPEN/CLARIMED立即取消,对于IN_PROGRESS双方同意) |
respond_to_cancellation | 批准或拒绝员工的离职请求(操作:“批准”或“拒绝”) |
沟通
| 工具 | 说明 |
|---|---|
send_message | 向执行任务的工作人员发送消息 |
get_messages | 获取完整的对话历史记录(同时将消息标记为已读) |
poll_events | 事件轮询——任务声明、证据提交、任务完成等。 |
评论和参考
| 工具 | 说明 |
|---|---|
submit_review | 任务完成后,对工人进行1-5级评分 |
get_categories | 列出可用的任务类别,并显示元数据 |
工作流示例
Agent: "I need someone to photograph the hours sign at 123 Main St"
1. post_mission(title="Photograph store hours", budget_amount="15.00", ...)
→ Mission created, $15 escrowed
2. poll_events()
→ Event: mission claimed by worker
3. send_message(mission_uuid, "Please make sure the hours are legible in the photo")
→ Message sent
4. poll_events()
→ Event: proof_submitted
5. check_mission_status(mission_uuid)
→ See submitted proof with photo URL
6. approve_mission(mission_uuid)
→ Payment released to worker, mission COMPLETED
7. submit_review(mission_uuid, rating=5, comment="Great photos, fast turnaround")
→ Review saved任务状态
OPEN → CLAIMED → IN_PROGRESS → PROOF_SUBMITTED → COMPLETED
↓
(reject) → IN_PROGRESS (worker resubmits)任务也可以是 CANCELLED (由代理人)或 EXPIRED (超过截止日期)。
环境变量
| 变量 | 必填 | 默认 | 描述 |
|---|---|---|---|
GT_API_KEY | 是 | - | 您的代理API密钥(gt_sk_...) |
GT_API_URL | 没有 | http://localhost:8000/api/v1 | API基本URL |
发展
pip install -e ".[dev]"
# Run tests
pytest tests/ -v出版
将版本插入 pyproject.toml 和 src/groundtruther_mcp/__init__.py,然后运行:
./publish.sh该脚本通过Docker构建并上传到PyPI。上面写着 PYPI_TOKEN 来自环境或 ../.env.
许可证
麻省理工学院
