agmail

Email inboxes for AI agents, by the hour: an address of your choice, one call to wait for a message, the code or link extracted. No account, paid per call with x402 stablecoins.

Hosted MCP Server

npx add-mcp 'https://agmail.shveik.dev/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

What can I buy?

An address by the hour, and a way to keep it a little longer. Pay in stablecoins; the inbox is yours until it expires.

inboxes

An address of your own

Pay for an hour, four hours or a day and get name@agmail.shveik.dev with the name you pick (or a random one). Mail is accepted once the payment has settled. Wait for a message, list and read them, or ask only for the code.

POST /x402/inbox-1h
or POST /mpp/inbox-1h
{"name":"acme42"}

{
  "inbox_id": "ib_0123456789ab",
  "address": "acme42@agmail.shveik.dev",
  "secret": "agm_0123456789abcdef0123456789abcdef",
  "expires_at": "2026-10-06T13:00:00Z",
  "plan": "1h",
  "msg_cap": 50
}

renew

Keep it a little longer

Pay again to extend an inbox. It keeps its address and its mail. An inbox that is not extended stops at its expiry and its mail is deleted shortly after.

POST /x402/inbox-1h-renew
or POST /mpp/inbox-1h-renew
{"inbox_id":"ib_0123456789ab","secret":"agm_0123456789abcdef0123456789abcdef"}

{
  "inbox_id": "ib_0123456789ab",
  "plan": "1h",
  "status": "queued",
  "next": "The extension is applied once the payment has settled (a minute or so); GET /v1/inbox/{inbox_id} shows the new expires_at."
}

Try also agdata: Need data for your agent: pages as Markdown, search, social, maps, news and jobs? agdata does that, paid the same way.

Using your inbox

An order gives you an inbox id and a secret. Send the secret as a Bearer token to the inbox's free API.

RequestWhat it does
GET /v1/names/{name}Is this name free? No payment, no secret.
GET /v1/inbox/{id}/waitBlock until a message arrives (up to 55 s) and return it with its text, codes and links. 204 on timeout.
GET /v1/inbox/{id}/otpBlock until a message with a code or a verification link arrives, and return just those.
GET /v1/inbox/{id}/messagesList the messages; /messages/{mid} reads one, DELETE removes it.
POST /x402/inbox-1h-renewPay for more time before the inbox expires.

any HTTP clientshell

$ curl -H "Authorization: Bearer agm_SECRET" \
    "https://agmail.shveik.dev/v1/inbox/ib_ID/wait?timeout=30&from=github"
{"from":"noreply@github.com","subject":"Your code","codes":["482913"],"links":[…]}

Mail is received only; nothing can be sent. Links in mail are returned as text and never followed, attachments are listed but not kept, and mail is deleted shortly after the inbox expires. Use the inboxes within the rules of the services you sign up to: no spam or abuse. See privacy, terms and abuse.

MCP server

MCP Inboxes as MCP tools

The same routes are also an MCP server (streamable HTTP, stateless): paid tools carry the x402 payment inside the tool call, the others are free. Point a client at https://agmail.shveik.dev/mcp: it lists the tools and answers a call with the quote. create_inbox and extend_inbox are paid; wait_for_message, get_otp, list_messages, read_message, delete_inbox and check_name are free.

any MCP client that can payshell

$ mcpc connect https://agmail.shveik.dev/mcp @agmail --x402 exact
$ mcpc @agmail tools-list
$ mcpc @agmail tools-call create_inbox duration:=1h

Listing the tools and getting a quote works in any MCP client. Paying needs a client that can sign x402 payments: mcpc --x402, Cloudflare Agents, or the x402 MCP SDK. Claude Desktop, Claude Code and Cursor cannot sign payments themselves. Streamable HTTP, stateless, latest and earlier protocol versions.

Two protocols, every endpoint

Pay the way your agent already does. x402 on Base, Polygon and Solana or MPP on Base.

x402 · exact

The 402 carries a PAYMENT-REQUIRED header. Sign an exact-scheme stablecoin authorization and retry with PAYMENT-SIGNATURE.

Endpoints: /x402/<name>

MPP · evm charge

The 402 carries a WWW-Authenticate: Payment challenge (Machine Payments Protocol). Sign it and retry with Authorization: Payment.

Endpoints: /mpp/<name>

Both paths are the same endpoint with the same price: an unpaid request gets both challenges in one 402, and either credential is accepted on either path.

Why agents use it

No account, no card An unpaid request returns the quote, so you see the price before you sign anything. The inbox's key arrives with the receipt.

Your name is sold once The name is claimed before your payment settles, and a name that someone else got first is refused before you pay.

One call for the code Wait for the verification mail with a single request and get the code or the link back, without parsing a message.

By the hour One hour, four hours or a day per payment. Pay again to keep it, or let it go; nothing renews by itself.

How it works

  1. POST a small JSON body. You get 402 with an x402 PAYMENT-REQUIRED header and an MPP WWW-Authenticate: Payment challenge that quote the price for exactly what you asked.
  2. Sign either one with a stablecoin authorization (EIP-3009): x402 exact or MPP evm / authorization.
  3. Retry with PAYMENT-SIGNATURE or Authorization. An order answers with the address, an id and a secret; wait for mail with /v1/inbox/{id}/wait.

All endpoints

  1. **POST** /{x402|mpp}/inbox-1h Inbox for one hour
  2. **POST** /{x402|mpp}/inbox-1h-renew Extend by one hour
  3. **POST** /{x402|mpp}/inbox-4h Inbox for four hours
  4. **POST** /{x402|mpp}/inbox-4h-renew Extend by four hours
  5. **POST** /{x402|mpp}/inbox-24h Inbox for a day
  6. **POST** /{x402|mpp}/inbox-24h-renew Extend by 24 hours

Free for everyone: POST /feedback (also the MCP tool feedback) sends a note to the people who run this, whether a bug, an idea or a thanks. No payment, no account.