Agent Handoff
RemoteAbout Agent Handoff
Agent Handoff is serverless middleware for cleaning, enriching, and routing messages between AI agents through an API call. It offers REST and MCP access, with usage metering and Stripe billing on the same authorization and billing path.
Key features
- 01Clean and enrich agent messages
- 02Route messages to the next agent
- 03MCP and REST endpoints
- 04Usage statistics requiring an API key
- 05Stripe metered billing
Use cases
- 01Passing a task from one agent to another
- 02Preparing message content before agent handoff
- 03Checking API-key-protected usage statistics
MCP support
The MCP endpoint exposes the handoff and get_usage_stats tools to MCP clients. MCP requests use the same authorization, usage tracking, and billing path as the REST handoff endpoint.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://agent-handoff-production-573c.up.railway.app/mcpclaude mcp add --transport http jordan23wagner-ops-agent-handoff https://agent-handoff-production-573c.up.railway.app/mcp{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}Open in Cursor{"servers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}Open in VS Code{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"type":"http","url":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}{"mcpServers":{"jordan23wagner-ops-agent-handoff":{"serverUrl":"https://agent-handoff-production-573c.up.railway.app/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://agent-handoff-production-573c.up.railway.app/mcpAuth requiredTools
Details
From the project READMEAgent Handoff Middleware
Serverless middleware for AI agent handoffs with built-in Stripe metered billing. Clean, enrich, and route messages between AI agents in one API call.
Live 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.