MailGate
v1.1.1Self-hosted Cloudflare Workers OTP and magic-link email inbox MCP server for E2E auth testing.
Values you need
| Variable | What it is | |
|---|---|---|
MAILGATE_URL | required | Base URL of your self-hosted MailGate Cloudflare Worker (e.g. https://mailgate.example.com) |
MAILGATE_ADMIN_TOKEN | optional 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 mcpAdd 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
- Ask the user for: MAILGATE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- 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.
- 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