A2H: ask a human

v0.3.0
io.github.AndreaAcanfora/a2h-gateway Checked 3 days ago Published 26 days ago

Ask a human before acting: approvals by email, Telegram or push, signed answers, passkeys.

Values you need

VariableWhat it is
A2H_GATEWAYrequired URL of your A2H gateway, e.g. https://a2h.example.com
A2H_API_KEYrequired secret API key of the gateway
A2H_TOrequired Where to reach you: mailto:you@example.com, tg:<chat_id> or an ntfy topic URL
A2H_PRINCIPALoptional Your principal ID on the gateway (optional)

Docker discovery passed

Requires Docker

Run in a terminal
claude mcp add a2h-gateway -e 'A2H_API_KEY=<A2H_API_KEY>' -e 'A2H_GATEWAY=<A2H_GATEWAY>' -e 'A2H_TO=<A2H_TO>' -- docker run -i --rm -e A2H_API_KEY -e A2H_GATEWAY -e A2H_TO ghcr.io/andreaacanfora/a2h-gateway:0.3.0 mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "a2h-gateway": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "A2H_API_KEY",
        "-e",
        "A2H_GATEWAY",
        "-e",
        "A2H_TO",
        "ghcr.io/andreaacanfora/a2h-gateway:0.3.0",
        "mcp"
      ],
      "command": "docker",
      "env": {
        "A2H_API_KEY": "<A2H_API_KEY>",
        "A2H_GATEWAY": "<A2H_GATEWAY>",
        "A2H_TO": "<A2H_TO>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "a2h-gateway": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "A2H_API_KEY",
        "-e",
        "A2H_GATEWAY",
        "-e",
        "A2H_TO",
        "ghcr.io/andreaacanfora/a2h-gateway:0.3.0",
        "mcp"
      ],
      "command": "docker",
      "env": {
        "A2H_API_KEY": "<A2H_API_KEY>",
        "A2H_GATEWAY": "<A2H_GATEWAY>",
        "A2H_TO": "<A2H_TO>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "A2H_API_KEY",
      "id": "a2h-api-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "A2H_GATEWAY",
      "id": "a2h-gateway",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "A2H_TO",
      "id": "a2h-to",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "a2h-gateway": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "A2H_API_KEY",
        "-e",
        "A2H_GATEWAY",
        "-e",
        "A2H_TO",
        "ghcr.io/andreaacanfora/a2h-gateway:0.3.0",
        "mcp"
      ],
      "command": "docker",
      "env": {
        "A2H_API_KEY": "${input:a2h-api-key}",
        "A2H_GATEWAY": "${input:a2h-gateway}",
        "A2H_TO": "${input:a2h-to}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.a2h-gateway]
command = "docker"
args = ["run", "-i", "--rm", "-e", "A2H_API_KEY", "-e", "A2H_GATEWAY", "-e", "A2H_TO", "ghcr.io/andreaacanfora/a2h-gateway:0.3.0", "mcp"]
env = { "A2H_API_KEY" = "<A2H_API_KEY>", "A2H_GATEWAY" = "<A2H_GATEWAY>", "A2H_TO" = "<A2H_TO>" }

For AI agents

  1. Ask the user for: A2H_GATEWAY, A2H_API_KEY, A2H_TO. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: ask_human, cancel_request, check_request, notify_human, request_approval.
  5. If it fails, check that the required runtime is installed (Docker) and that the values above are set.

Machine-readable: install.md · manifest.json