关于 Agent Handoff
Agent Handoff 是无服务器中间件,可通过一次 API 调用清理、补充并路由 AI Agent 之间的消息。它提供 REST 和 MCP 接口,两者共用授权、用量统计及 Stripe 计费流程。
主要功能
- 01清理并补充 Agent 消息
- 02将消息路由给下一个 Agent
- 03提供 MCP 和 REST 接口
- 04通过 API 密钥查看用量统计
- 05支持 Stripe 按量计费
适用场景
- 01在不同 Agent 之间传递任务
- 02在交接前整理消息内容
- 03使用 API 密钥查询用量统计
MCP 相关
MCP 端点向 MCP 客户端提供 handoff 和 get_usage_stats 工具。MCP 请求与 REST 交接接口共用授权、用量统计和计费流程。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
服务地址
https://agent-handoff-production-573c.up.railway.app/mcp一键复制安装命令
Claude CodeTerminal
claude mcp add --transport http jordan23wagner-ops-agent-handoff https://agent-handoff-production-573c.up.railway.app/mcpCursor.cursor/mcp.json
{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}在 Cursor 中打开VS Code.vscode/mcp.json
{"servers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}在 VS Code 中打开Claude Desktopclaude_desktop_config.json
{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"serverUrl":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
全部服务地址
Streamable HTTP
https://agent-handoff-production-573c.up.railway.app/mcp需要授权工具
详细介绍
Agent 交接中间件
用于 AI Agent 交接的无服务器中间件,内置 Stripe 按量计费功能。通过一次 API 调用清理、丰富并路由 AI Agent 之间的消息。
在线 API
https://agent-handoff-production-573c.up.railway.app
```bash
## Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| /handoff | POST | Process and route a message to the next agent |
| /health | GET | Service health check |
| /stats | GET | Usage statistics (requires API key) |
| /mcp | POST | Model Context Protocol server (`handoff` + `get_usage_stats` tools) — same auth/billing path as REST |
## Quick Start
```bash
curl -X POST https://agent-handoff-production-573c.up.railway.app/handoff -H 'x-api-key: your-key' -H 'Content-Type: application/json' -d '{"message": {"task": "Summarize this"}, "next_agent": "summarizer"}'
```bash
## PowerShell Module
```powershell
Install-Module AgentHandoff
$env:HANDOFF_API_KEY = 'your-key'
$result = Invoke-AgentHandoff -Message @{ task = 'Summarize this' } -NextAgent 'summarizer' -VerboseOutput
```powershell
## Pricing
- Pay-per-use: $0.001 per handoff via Stripe
- Pro tier: $29/month for unlimited handoffs
## Tech Stack
- FastAPI + Python
- Railway deployment
- Stripe metered billing
- Slowapi rate limiting
## Links
- [PowerShell Gallery](https://www.powershellgallery.com/packages/AgentHandoff)
- [Live API](https://agent-handoff-production-573c.up.railway.app/health)
## Recent changes (2026-07-27)
- **MCP server added** at `POST /mcp` — exposes `handoff` and `get_usage_stats` as MCP tools over JSON-RPC 2.0, discoverable via `tools/list`. Runs through the exact same auth → usage → billing path as the REST `/handoff` endpoint, so it can't become an unmetered bypass. `server.json` added for the official MCP registry (schema-validated); publishing via `mcp-publisher` is still pending.
- **Durable billing-failure audit trail** — failures now persist to Supabase (`public.billing_failures`) instead of only an ephemeral local file that reset on every redeploy.
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。