SandMail — Disposable Email API for AI Agents
# SandMail MCP Server
Give AI agents their own disposable email inboxes with OTP extraction.
Works with **Claude Code**, **Cursor**, **Windsurf**, and any MCP-compatible AI tool.
## Install
```bash
npm install -g sandmail-mcp
```
## Setup
### Claude Code / Claude Desktop
Add to your MCP config (`~/.claude/claude_desktop_config.json`):
```json
{
"mcpServers": {
"sandmail": {
"command": "sandmail-mcp",
"env": {
"SANDMAIL_API_KEY": "sk_live_your_key"
}
}
}
}
```
### Cursor
Add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"sandmail": {
"command": "sandmail-mcp",
"env": {
"SANDMAIL_API_KEY": "sk_live_your_key"
}
}
}
}
```
## Available Tools
| Tool | Description |
|------|-------------|
| `create_inbox` | Create a disposable email inbox |
| `wait_for_otp` | Wait for an email and extract the OTP code |
| `get_otp` | Extract OTP from the latest email |
| `get_emails` | List all emails in an inbox |
| `wait_for_email` | Wait for any new email to arrive |
| `delete_inbox` | Delete an inbox |
| `list_inboxes` | List all active inboxes |
| `get_quota` | Check API usage |
## Example Usage
Ask your AI agent:
> "Create a temporary email, sign up for example.com, and get me the verification code"
The agent will:
1. Call `create_inbox` → gets `test123@tempyx.com`
2. Use the email to sign up on the website
3. Call `wait_for_otp` → waits for the verification email
4. Return the OTP code to you
## Get API Key
Get your free API key at [sandmail.dev](https://sandmail.dev)
TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose with no overlap. For example, create_inbox and delete_inbox handle inbox lifecycle, get_emails and get_otp focus on email retrieval vs. code extraction, and wait_for_email vs. wait_for_otp differentiate between general waiting and OTP-specific waiting. The descriptions reinforce these distinctions.
All tools follow a consistent verb_noun naming pattern (e.g., create_inbox, delete_inbox, get_emails). There are no deviations in style or convention, making the set predictable and easy to understand at a glance.
With 8 tools, this server is well-scoped for its disposable email API purpose. Each tool earns its place by covering distinct aspects like inbox management, email retrieval, OTP handling, and quota checking, without being overly sparse or bloated.
The tool surface provides complete coverage for the disposable email domain. It includes CRUD operations for inboxes (create, list, delete), email retrieval (get_emails, wait_for_email), OTP-specific utilities (get_otp, wait_for_otp), and quota management (get_quota), with no obvious gaps for typical agent workflows.