TempMail OTP MCP Server
Allows Hermes to generate temporary email addresses, list and read received emails, extract OTP codes, and extract links from emails.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TempMail OTP MCP Servergenerate a temp email and retrieve the OTP from incoming messages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TempMail OTP — Self-Hosted Temporary Email Generator
Receive-only temp email server with automatic OTP extraction for security research, QA automation, and disposable identity workflows.
Features
SMTP catch-all — accepts all inbound email on your domain (port 25, no auth)
Real-time inbox — SSE stream pushes new emails instantly to the browser
OTP extraction — automatic detection of verification codes (4–8 digit, alphanumeric)
Link extraction — parse all URLs from plain-text and HTML email bodies
REST API — authenticated endpoints for email generation, reading, OTP, and link extraction
MCP integration — stdio-based Model Context Protocol server for AI agents (Hermes, Claude, etc.)
Docker — multi-stage build, SQLite persistence, health check included
Dark/light mode — built with Tailwind CSS + shadcn/ui
DNS verification — built-in
/api/dns-checkendpoint validates MX, SPF, DMARC recordsMulti-key support — manage API keys via the web UI or
/api/keysendpoint
Related MCP server: SandMail — Disposable Email API for AI Agents
Prerequisites
Node.js 20+ (with
tsxfor MCP;npmfor package management)Domain name — configured with MX, SPF, and DMARC records
Port 25 access — required for SMTP receiving; unavailable on most home ISPs. Use a VPS (Oracle Cloud Free Tier, AWS EC2, DigitalOcean) or port forwarding if supported
Quick Start
1. Clone and install
git clone <repo-url> website-email
cd website-email
npm install2. Configure environment
cp .env.example .envEdit .env with your domain and a strong API key:
DOMAIN=mail.yourdomain.com
API_KEY=your-generated-api-keyGenerate a secure API key:
openssl rand -hex 323. Set up DNS records
Configure MX, SPF, and DMARC records for your domain. See the complete guide:
Quick verification after DNS propagates:
dig MX yourdomain.com +short
dig TXT yourdomain.com +short | grep spf
dig TXT _dmarc.yourdomain.com +short4. Start the servers
Terminal 1 — Next.js web UI + API:
npm run devTerminal 2 — SMTP server (receives mail):
npx tsx src/infrastructure/smtp/start.ts5. Open the app
http://localhost:3000Generate a temp email address, send a test email to it, and watch it appear in real-time.
Docker Deployment
1. Configure .env
Same as Quick Start — fill in DOMAIN and API_KEY.
2. Build and start
docker compose up -d3. Verify
curl http://localhost:3000/api/config
# {"success":true,"data":{"domain":"mail.yourdomain.com"}}
# Note: never returns API_KEY — paste API_KEY from .env into the UI when promptedNote: Docker Compose exposes port 3000 only (web UI + API). Run the SMTP server directly on the host for port 25:
npx tsx src/infrastructure/smtp/start.tsFor production, use a reverse proxy (nginx/Caddy) for TLS termination and run SMTP via a process manager (systemd, pm2).
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your domain for receiving email (e.g. |
| Yes | — | Secret key for API, MCP, and Cloudflare Worker (must match Worker secret) |
| No |
| Port for inbound SMTP |
| No |
| Bind address for SMTP server |
| No |
| SQLite database file path |
| No |
| Public URL of the application |
| No | (empty) | Cloudflare Worker base URL for cloud inbox fallback. Empty = local SQLite only. Example: |
Do not use legacy URLs such as
tempik.email1-f03.workers.dev. Current worker name isfreelancer-mail. Seecloudflare-email-worker/README.mdand rootAGENTS.md.
REST API
Most endpoints require an x-api-key header matching server API_KEY or an active key created via /api/keys.GET /api/config is public and returns { domain } only (never the secret).
Response format: { "success": true, "data": ... } or { "success": false, "error": "..." }.
npm test # unit tests (vitest)
npm run lint
npm run buildEmail Addresses
Method | Endpoint | Description |
|
| List all addresses |
|
| Generate new address (optional body: |
|
| Delete an address and its emails |
Emails
Method | Endpoint | Description |
|
| Generate address (shorthand) |
|
| List emails for an address |
|
| Read a specific email |
|
| Delete a specific email |
|
| Extract OTP from email |
|
| Extract links from email |
|
| SSE stream for real-time email events |
Misc
Method | Endpoint | Description |
|
| Get server domain only (no auth, no secrets) |
|
| Verify DNS records (MX, SPF, DMARC; requires API key) |
|
| List API keys |
|
| Create new API key |
Example: Full workflow
KEY="your-api-key"
DOMAIN="mail.example.com"
# Generate an address
curl -sH "x-api-key: $KEY" -X POST http://localhost:3000/api/emails/generate | jq
# List emails
curl -sH "x-api-key: $KEY" "http://localhost:3000/api/emails/temp-abc123@$DOMAIN" | jq
# Read email and extract OTP
curl -sH "x-api-key: $KEY" -X POST \
"http://localhost:3000/api/emails/temp-abc123@$DOMAIN/eml_xxx/otp" | jqMCP Integration
The MCP server exposes 5 tools for AI agents via stdio transport:
Tool | Description |
| Generate a new temporary email address |
| List emails for an address |
| Read a specific email by ID |
| Extract OTP/verification code from an email |
| Extract all links from an email |
Configuration and workflow documentation:
→ docs/hermes-integration.md — Hermes MCP configuration → docs/chrome-devtools-mcp.md — Browser automation with Chrome DevTools MCP → docs/workflow-examples.md — Copy-paste ready prompts
Quick test:
DOMAIN=mail.example.com API_KEY=your-key npx tsx src/infrastructure/mcp/start.tsArchitecture
Two independent inbound paths. App reads local SQLite first, then optionally pulls from the Worker.
Internet mail
/ \
v v
┌──────────────────┐ ┌────────────────────────────┐
│ Host SMTP :25 │ │ CF Email Routing (zone) │
│ smtp-server │ │ → Worker freelancer-mail │
│ → local SQLite │ │ → D1 freelancer-mail-db │
└────────┬─────────┘ └─────────────┬──────────────┘
│ │
│ GET /emails/:addr (x-api-key)
│ │
v v
┌────────────────────────────────────────────┐
│ Next.js app (UI + REST + SSE) │
│ getEmailsByAddress: local first, then │
│ CLOUDFLARE_WORKER_URL if set │
│ OTP/link extraction happens HERE only │
└──────────────────┬─────────────────────────┘
│
v
MCP stdio (npm run mcp)Domain is configurable: set app DOMAIN + Cloudflare Email Routing on that zone. Worker name is not the email domain.
Stack: Next.js 14 + TypeScript + Tailwind CSS + shadcn/ui + better-sqlite3 + smtp-server + mailparser + Cloudflare Workers/D1
Cloudflare Worker (optional cloud ingest)
Separate package: cloudflare-email-worker/.
Piece | Value |
Worker |
|
D1 |
|
Deploy |
|
App wire |
|
Dashboard | Email Routing catch-all → Send to Worker |
Details: cloudflare-email-worker/README.md, docs/deployment.md, AGENTS.md.
Additional Documentation
docs/README.md — Doc index
docs/architecture.md — Dual ingest + components
docs/api.md — REST + Worker HTTP
SECURITY.md — Reporting + secrets policy
AGENTS.md — AI / agent ground truth
openspec/ — Spec-driven requirements (
openspec/specs/)docs/dns-setup.md — MX, SPF, DMARC
docs/deployment.md — Production, Docker, Worker
docs/troubleshooting.md — Common issues
docs/hermes-integration.md — Hermes MCP
docs/chrome-devtools-mcp.md — Browser automation
docs/workflow-examples.md — End-to-end workflows
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for disposable email — create inboxes, receive emails, and extract OTP codes. Let your AI agent sign up for services, wait for verification emails, and extract codes autonomously.Last updated7921MIT
- AlicenseAqualityDmaintenanceCreate disposable email inboxes, extract OTP codes in 15 languages, and receive webhooks — all from your AI agent. One call: create inbox → wait for email → get the verification code. Supports 7 domains, email forwarding, and HMAC-signed webhooks with OTP included in payload. Free tier available.Last updated82MIT
- Alicense-qualityAmaintenanceEnables AI agents to create disposable email inboxes and automatically extract OTPs, magic links, and verification codes from incoming emails.Last updated19MIT
- AlicenseAqualityFmaintenanceEnables AI agents to create temporary email addresses, receive confirmation emails, and extract verification links, automating sign-up and email verification workflows without manual intervention.Last updated63256MIT
Related MCP Connectors
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Give an AI agent its own inbox — receive email as a webhook, send over a verified domain.
Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mifdlaldev/website-email'
If you have feedback or need assistance with the MCP directory API, please join our Discord server