MCP
Written for the AI assistant: what these disposable mailboxes are for, and how to drive them.
This page is written for the AI assistant on the other side of the connection: what this service is good for, when not to use it, and how to drive it. If you are a human setting things up, you only need this:
Endpoint (Streamable HTTP, JSON-RPC 2.0): https://temp.cl4.ru/mcp
Claude Code: claude mcp add --transport http tempmail https://temp.cl4.ru/mcp
Claude Desktop: Settings → Connectors → Add custom connector → paste the URL
mcp.json: { "mcpServers": { "tempmail": { "type": "http", "url": "https://temp.cl4.ru/mcp" } } }
stdio-only client: npx mcp-remote https://temp.cl4.ru/mcpNo install, no API key, no account. Everything below is addressed to the assistant.
What this service is
TempMail hands out disposable mailboxes on @cl4.ru that receive mail. You create one in a single call, get its address instantly, and read whatever arrives — including the confirmation code, which the server extracts for you into a code field so you never have to parse the body yourself. Nothing is registered, nothing is paid for, and the mailbox is yours until you delete it.
Use it for
| Signing up somewhere | A site the user wants to try but not hand their real inbox to. Create a mailbox, use the address in the form, take the code or activation link out of the mail that follows. |
| One-time codes & magic links | Any flow that mails a code, an OTP, or a login link — wait_for_message hands you the code field directly. |
| Testing your own email | Send from the app you are building to the mailbox and read the delivered message back: subject, text, HTML, attachments. A real end-to-end check that mail actually leaves your system and renders. |
| QA of signup funnels | Run the same registration repeatedly with a fresh address each time, without polluting anyone's inbox. |
| Downloads behind an email wall | Trials, whitepapers, one-off confirmations you will never need again. |
Do not use it for
Anything the user would mind losing. Messages are deleted automatically after about a week and idle mailboxes disappear, so this is the wrong place for a real account, for password-recovery mail, for banking, or for anything that must be readable next month. It cannot send mail — there is no such tool and no such feature. And do not use it to evade a ban, to mass-register accounts, or to sign someone else up for anything.
How to use it
The normal task — «register me somewhere and confirm the address» — is three calls:
1 create_mailbox()
-> { address: "sunnyowl42@cl4.ru", token: "a1b2…", password: "…" }
2 … fill the signup form with that address, submit it …
3 wait_for_message({ token: "a1b2…" })
-> { from, subject, body_text,
code: "481920",
activation_url: "https://site.example/activate?k=…" }Then type the code into the form, or open activation_url — whichever the site asked for. If the mail has not arrived yet the call returns timed_out: true together with a since_id; call it again with that since_id and you will not re-read the mail you already saw.
Two variations worth knowing:
Reuse an earlier mailbox: login_mailbox({address, password}) -> token
Only mail from one sender: wait_for_message({token, from_contains: "site.example"})
Browse what is there: list_messages({token}) -> ids -> get_message({token, id})
Clean up when done: wipe_mailbox({token, confirm: true})Tools
list_domains | — | Domains currently accepting mail. Rarely needed: create_mailbox picks one for you. |
create_mailbox | local_part?, domain_id?, password? | Creates a mailbox. Returns address, token, password. The token authorizes every other call — keep it for the whole task. |
login_mailbox | address, password | Returns the token of a mailbox you already created earlier. |
list_messages | token, limit?, unseen_only? | Newest first: id, from, subject, preview, is_seen, has_attachments. Does not mark anything read. |
get_message | id, token, format?, max_chars?, peek? | Full message plus code (confirmation code the server already extracted) and activation_url. |
wait_for_message | token, timeout_sec?, since_id?, from_contains? | Blocks up to 25 s and returns the first new message in full. The main tool — do not poll list_messages in a loop. |
get_attachment | id, token | One attachment inline, base64, up to 2 MB. |
delete_message | id, token | Deletes one message. |
wipe_mailbox | confirm, token | Deletes the mailbox and everything in it. |
list_my_mailboxes | — | Only with a Telegram account session token in the Authorization header: every mailbox of that account. |
Pass token on every call, or send it once as Authorization: Bearer <token> and omit the argument. A Telegram account session token works in that header too; then address picks which mailbox of the account you mean.
Rules that will bite you
| Wait, don't poll | wait_for_message already blocks for up to 25 s. Calling list_messages in a tight loop is slower and gets you rate-limited. |
| One mailbox per task | Creating mailboxes is limited to a handful per 15 minutes per IP. Reuse the address you already have instead of making a new one per attempt. |
| The token is a secret | It grants full access to the mailbox. Keep it in your own state; never type it into a web form or paste it into a page you are filling in. |
| Read the error text | Failures come back as tool results with isError and a sentence telling you what to do next (create a mailbox, pass a token, wait). Follow it rather than retrying the same call. |
| Mail can be slow | Some senders take a minute. Two or three wait_for_message calls in a row are normal; tell the user you are waiting rather than giving up after one. |
| Limits | 80 MB per mailbox, ~7 days of retention, 20 MB per message, attachments over 2 MB must go through the REST API. |
Also available
The same operations exist as a plain REST API — see API — and what the service stores is listed under Privacy. Humans can use the very same mailboxes in the browser at temp.cl4.ru with the address and password from create_mailbox.