Agent Handoff について
Agent Handoffは、AIエージェント間のメッセージを整形、補完し、API呼び出しで次のエージェントへ渡すサーバーレスミドルウェアです。RESTとMCPに対応し、同じ認証・課金経路で利用量を計測します。
主な機能
- 01エージェント間メッセージの整形と補完
- 02次のエージェントへのメッセージ転送
- 03MCPおよびRESTエンドポイント
- 04APIキーが必要な利用統計
- 05Stripeによる従量課金
活用シーン
- 01タスクをあるエージェントから別のエージェントへ渡す
- 02引き継ぎ前にメッセージ内容を整える
- 03APIキー認証で利用統計を確認する
MCP 対応
MCPエンドポイントは、handoffとget_usage_statsのツールをMCPクライアントに公開します。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認証が必要ツール
詳細
エージェントハンドオフミドルウェア
Stripe の従量課金機能を組み込んだ、AI エージェント間のハンドオフ向けサーバーレスミドルウェアです。1 回の API 呼び出しで、AI エージェント間のメッセージを整理し、拡充してルーティングできます。
ライブ 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 サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。