mcpField
A
Agent Handoff

Agent Handoff

リモート
agent-handoff-production-573c.up.railway.appAI・エージェント013 週間前に更新
リポジトリ公式サイト

Agent Handoff について

Agent Handoffは、AIエージェント間のメッセージを整形、補完し、API呼び出しで次のエージェントへ渡すサーバーレスミドルウェアです。RESTとMCPに対応し、同じ認証・課金経路で利用量を計測します。

主な機能

  1. 01エージェント間メッセージの整形と補完
  2. 02次のエージェントへのメッセージ転送
  3. 03MCPおよびRESTエンドポイント
  4. 04APIキーが必要な利用統計
  5. 05Stripeによる従量課金

活用シーン

  1. 01タスクをあるエージェントから別のエージェントへ渡す
  2. 02引き継ぎ前にメッセージ内容を整える
  3. 03APIキー認証で利用統計を確認する

MCP 対応

MCPエンドポイントは、handoffとget_usage_statsのツールをMCPクライアントに公開します。MCPリクエストもRESTの引き継ぎと同じ認証、利用量計測、課金経路を使います。

設定

リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。

エンドポイントhttps://agent-handoff-production-573c.up.railway.app/mcp
インストールコマンドをコピー
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。

すべてのエンドポイント
Streamable HTTPhttps://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.

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。