MailGate

v1.1.1
io.github.Dicka18/mailgate Checked 3 days ago Published 8 days ago

Self-hosted Cloudflare Workers OTP and magic-link email inbox MCP server for E2E auth testing.

Values you need

VariableWhat it is
MAILGATE_URLrequired Base URL of your self-hosted MailGate Cloudflare Worker (e.g. https://mailgate.example.com)
MAILGATE_ADMIN_TOKENoptional secret Optional admin token enabling create_inbox, clear_messages, and simulate_email tools

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mailgate -e 'MAILGATE_URL=<MAILGATE_URL>' -- npx -y --package=mailgate-sdk@1.1.1 mailgate-mcp mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mailgate": {
      "args": [
        "-y",
        "--package=mailgate-sdk@1.1.1",
        "mailgate-mcp",
        "mcp"
      ],
      "command": "npx",
      "env": {
        "MAILGATE_URL": "<MAILGATE_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mailgate": {
      "args": [
        "-y",
        "--package=mailgate-sdk@1.1.1",
        "mailgate-mcp",
        "mcp"
      ],
      "command": "npx",
      "env": {
        "MAILGATE_URL": "<MAILGATE_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "MAILGATE_URL",
      "id": "mailgate-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mailgate": {
      "args": [
        "-y",
        "--package=mailgate-sdk@1.1.1",
        "mailgate-mcp",
        "mcp"
      ],
      "command": "npx",
      "env": {
        "MAILGATE_URL": "${input:mailgate-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mailgate]
command = "npx"
args = ["-y", "--package=mailgate-sdk@1.1.1", "mailgate-mcp", "mcp"]
env = { "MAILGATE_URL" = "<MAILGATE_URL>" }

For AI agents

  1. Ask the user for: MAILGATE_URL. 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: mailgate_health, mailgate_wait_for_otp, mailgate_wait_for_email, mailgate_list_messages, mailgate_create_inbox, mailgate_clear_messages, mailgate_simulate_email.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json