# A2H: ask a human

> A2H: ask a human is a free MCP server for communication. Pause an agent to get your approval or answers by email, Telegram or push. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/andreaacanfora/a2h-gateway
- **MCP Registry name:** io.github.AndreaAcanfora/a2h-gateway
- **Categories:** [communication](https://ai-powered.com/categories/communication), [productivity](https://ai-powered.com/categories/productivity), [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

- `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.

## 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.

## Alternatives

- [Aval](https://ai-powered.com/mcp/aval-2): Aval is a free MCP server for productivity.
- [Human Handoff relay](https://ai-powered.com/mcp/human-handoff-relay): Human Handoff relay is a freemium MCP server for developer tools.
- [Invoke Human Tool](https://ai-powered.com/mcp/invoke-human-tool): Invoke Human Tool is a free MCP server for productivity.
- [askingahuman](https://ai-powered.com/mcp/askingahuman): askingahuman is a freemium MCP server for communication.
- [iotPush](https://ai-powered.com/mcp/iotpush): iotPush is a freemium MCP server for communication.
- [Pushary: human-in-the-loop for AI agents](https://ai-powered.com/mcp/pushary-human-in-the-loop-for-ai-agents): Pushary: human-in-the-loop for AI agents is an MCP server for productivity.
- [Hwip](https://ai-powered.com/mcp/hwip): Hwip is an MCP server for developer tools.
- [Ask a Human (Tech & Toast)](https://ai-powered.com/mcp/ask-a-human-tech-and-toast): Ask a Human (Tech & Toast) is a freemium MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/a2h-ask-a-human
