agent-handoff-mcp
Enables AI agents to exchange structured work items with an auditable lifecycle, supporting send, acknowledge, block, complete, and cancel operations via a shared SQLite-backed inbox.
README
Agent Handoff MCP
A local-first Model Context Protocol server for bounded, auditable handoffs between AI agents.
Agent Handoff MCP gives Claude, Codex, local agents, and other MCP clients a shared inbox without giving one model control over another. Agents can send structured work, acknowledge it, report a blocker, complete it, or cancel work they originally queued. Every transition is attributable and retained in SQLite.
Why this exists
Multi-agent systems often pass work through chat transcripts, ad hoc files, or vendor-specific orchestration. That loses ownership, lifecycle state, authorization boundaries, and a durable audit trail. This server turns a handoff into a small protocol object:
sender -> queued -> accepted -> completed
| ^
v |
blocked --------+
sender may cancel only while queued
The server coordinates work; it does not execute agents, fetch references, read arbitrary files, or create autonomous agent loops.
MCP tools
| Tool | Purpose |
|---|---|
handoff_whoami |
Show the authenticated identity and communication boundaries. |
handoff_send |
Send a structured handoff to an authorized recipient. |
handoff_inbox |
List handoffs addressed to the current identity. |
handoff_get |
Read a handoff and its append-only event history. |
handoff_acknowledge |
Accept queued or blocked work. |
handoff_update_status |
Mark work blocked/completed, or cancel it while queued. |
Design properties
- SQLite shared state with WAL mode and parameterized queries
- Streamable HTTP and stdio transports
- Opaque UUID handoff, event, and thread identifiers
- Explicit
send_toandreceive_fromauthorization - Per-agent disclosure ceilings:
public-safe,internal, orrestricted - Hashed, expiring bearer-token bindings for HTTP
- Idempotency keys for safe retries
- Maximum reply-chain depth to limit automated ping-pong
- Strict message, array, reference, and request-size limits
- Sender/recipient-only reads
- Append-only lifecycle events; no MCP delete tool
- References are stored as inert strings and never dereferenced
Quick start
Requirements: Node.js 22.13 or newer.
git clone https://github.com/SarutobiSasuke8/agent-handoff-mcp.git
cd agent-handoff-mcp
npm ci
cp .env.example .env
cp config/agents.example.yaml config/agents.yaml
npm run token:new
Replace the disabled example token hashes and expiry timestamps in config/agents.yaml, then start the shared HTTP service:
npm run check
npm start
The default endpoints are:
GET http://127.0.0.1:3220/healthz
POST http://127.0.0.1:3220/mcp
Authorization: Bearer handoff_<agent-specific-token>
The server binds to localhost by default. Put an authenticated private-network or TLS boundary in front of it before any remote deployment.
Stdio mode
Each stdio client supplies its identity through its own process environment while sharing the same SQLite database and registry:
{
"command": "node",
"args": ["/absolute/path/agent-handoff-mcp/dist/src/stdio.js"],
"env": {
"HANDOFF_AGENT_ID": "example-codex",
"HANDOFF_MCP_DB": "/absolute/shared/path/handoffs.sqlite",
"HANDOFF_MCP_REGISTRY": "/absolute/path/agents.yaml"
}
}
Use HTTP when multiple clients should connect to one long-running service. Use stdio for local clients that can safely receive a fixed identity through their own configuration.
Documentation
Scope boundary
This project is a coordination primitive, not a general task platform. Shared task boards, decisions, broadcasts, presence, leases, notifications, context promotion, and remote dispatch belong behind future optional modules. The six-tool handoff surface remains the stable core.
License
Apache-2.0. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。