A2H: ask a human
Pause an agent to get your approval or answers by email, Telegram or push
- Pricing
- Free
- Platforms
- CLI, self-hosted, Linux
- Runs
- Locally
- Version
- 0.3.0
- Listing updated
- 4 days ago
Similar MCP servers
About A2H: ask a human
A2H: ask a human is a free MCP server for communication. It runs locally on your machine and is started by your AI client.
A2H is the agent-side tool for a self-hosted gateway built on Twilio Labs' Agent-to-Human protocol; the project says it is an independent implementation, not affiliated with Twilio. Run as a stdio server with a gateway URL, API key and a recipient address, it lets an agent stop before something risky and wait for a person to decide.
The recipient is fixed in configuration, so the model can write the question but cannot choose who receives it. Every answer is verified against the gateway's signature before a decision is reported, and an answer that fails verification is reported as a failure, never an approval. A tool call waits up to 10 minutes, then the agent can follow up with check_request. Setting require_passkey makes an approval need a passkey (WebAuthn).
The gateway itself is a single Go binary with SQLite. It delivers requests by email (SMTP), a Telegram bot, ntfy push or a paired phone app, with signed webhooks, replay protection and a conformance suite. Binaries exist for Linux, macOS, Windows and FreeBSD, plus a Docker image.
Install
Run in a terminal
claude mcp add a2h-gateway --env A2H_GATEWAY='<A2H_GATEWAY>' --env A2H_API_KEY='<A2H_API_KEY>' --env A2H_TO='<A2H_TO>' -- docker run -i --rm -e A2H_GATEWAY -e A2H_API_KEY -e A2H_TO ghcr.io/andreaacanfora/a2h-gateway:0.3.0Add to claude_desktop_config.json
{
"mcpServers": {
"a2h-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"A2H_GATEWAY",
"-e",
"A2H_API_KEY",
"-e",
"A2H_TO",
"ghcr.io/andreaacanfora/a2h-gateway:0.3.0"
],
"env": {
"A2H_GATEWAY": "<A2H_GATEWAY>",
"A2H_API_KEY": "<A2H_API_KEY>",
"A2H_TO": "<A2H_TO>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"a2h-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"A2H_GATEWAY",
"-e",
"A2H_API_KEY",
"-e",
"A2H_TO",
"ghcr.io/andreaacanfora/a2h-gateway:0.3.0"
],
"env": {
"A2H_GATEWAY": "<A2H_GATEWAY>",
"A2H_API_KEY": "<A2H_API_KEY>",
"A2H_TO": "<A2H_TO>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"a2h-gateway": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"A2H_GATEWAY",
"-e",
"A2H_API_KEY",
"-e",
"A2H_TO",
"ghcr.io/andreaacanfora/a2h-gateway:0.3.0"
],
"env": {
"A2H_GATEWAY": "<A2H_GATEWAY>",
"A2H_API_KEY": "<A2H_API_KEY>",
"A2H_TO": "<A2H_TO>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"a2h-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"A2H_GATEWAY",
"-e",
"A2H_API_KEY",
"-e",
"A2H_TO",
"ghcr.io/andreaacanfora/a2h-gateway:0.3.0"
],
"env": {
"A2H_GATEWAY": "<A2H_GATEWAY>",
"A2H_API_KEY": "<A2H_API_KEY>",
"A2H_TO": "<A2H_TO>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"a2h-gateway": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"A2H_GATEWAY",
"-e",
"A2H_API_KEY",
"-e",
"A2H_TO",
"ghcr.io/andreaacanfora/a2h-gateway:0.3.0"
],
"env": {
"A2H_GATEWAY": "<A2H_GATEWAY>",
"A2H_API_KEY": "<A2H_API_KEY>",
"A2H_TO": "<A2H_TO>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
A2H_GATEWAYURL of your A2H gateway, e.g. https://a2h.example.comRequiredA2H_API_KEYAPI key of the gatewayRequiredA2H_TOWhere to reach you: mailto:you@example.com, tg:<chat_id> or an ntfy topic URLRequiredA2H_PRINCIPALYour principal ID on the gateway (optional)
Tools this server provides (5)
Taken from the project documentation; the running server may differ.
- request_approval
- Ask you to approve or decline an action; returns the verified decision.
- ask_human
- Ask you to fill in a short form.
- notify_human
- Send you a message such as progress, result or alert.
- check_request
- Follow up on a request that is still waiting.
- cancel_request
- Withdraw a request that has not been answered.
What it does
- Approval requests
- Asks a person to approve or decline an action and returns the verified decision.
- Short forms
- Collects text, numbers, dates, choices or yes/no answers.
- Multiple channels
- Reaches you by email, Telegram, ntfy push or a phone app.
- Signed answers
- Responses are signed, and unverified ones count as failures.
- Passkey option
- High-stakes approvals can require a WebAuthn passkey.
- Fixed recipient
- The model cannot pick who is contacted.
Good for
- Ask before an agent deploys to production
- Confirm a purchase or booking before it is made
- Collect a missing detail mid-task from a phone
- Send progress or alerts from a long-running agent
- Require a passkey for sensitive approvals
Pricing
Free
Self-hosted; you run the gateway
A2H: ask a human FAQ
What do I need to run it?
A gateway URL, API key and a recipient such as mailto:, tg: or an ntfy topic URL, set as environment variables.
Can the agent choose who to message?
No. The recipient is configuration.
How long does it wait?
A tool call waits up to 10 minutes, after which check_request follows up.
Is it from Twilio?
No. It is an independent implementation of the Twilio Labs A2H protocol.
Is A2H: ask a human free?
Yes. A2H: ask a human is free to use.
How do I add A2H: ask a human to Claude Code?
Run this command in your terminal: claude mcp add a2h-gateway --env A2H_GATEWAY='<A2H_GATEWAY>' --env A2H_API_KEY='<A2H_API_KEY>' --env A2H_TO='<A2H_TO>' -- docker run -i --rm -e A2H_GATEWAY -e A2H_API_KEY -e A2H_TO ghcr.io/andreaacanfora/a2h-gateway:0.3.0
What are the best alternatives to A2H: ask a human?
The closest alternatives to A2H: ask a human are Aval, Human Handoff relay, Invoke Human Tool, askingahuman and iotPush.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.
