AI agents (MCP)
Connect the fake-email.pro MCP server to Claude Code, Cursor, VS Code or an agent in CI, so it can create a mailbox, sign up with it and read the verification email on its own. What it is and why: MCP server.
Server
| URL | https://api.fake-email.pro/mcp |
| Transport | Streamable HTTP |
| Sign-in | Authorization: Bearer fep_… – the same key as REST, from Settings → API keys |
| Quota | Each mailbox the agent creates counts towards your monthly API quota, as it does over REST (Limits). |
Connect your client
claude mcp add --transport http fake-email https://api.fake-email.pro/mcp \
--header "Authorization: Bearer $FAKE_EMAIL_API_KEY" Claude Code expands $FAKE_EMAIL_API_KEY once, when you add the server, and keeps the key itself. A Cursor started from the Dock does not see your shell's variables, so its file holds the key. In VS Code the file can go into the repository: the key is asked for once and kept in VS Code's secret storage, not in the file.
In CI
Commit .mcp.json to the repository and store the key as a CI secret named FAKE_EMAIL_API_KEY: the client fills in ${FAKE_EMAIL_API_KEY} from the environment. Claude Code reads the file from the project root, or pass it with --mcp-config.
{
"mcpServers": {
"fake-email": {
"type": "http",
"url": "https://api.fake-email.pro/mcp",
"headers": {
"Authorization": "Bearer ${FAKE_EMAIL_API_KEY}"
}
}
}
}Tools
create_mailbox | Creates a disposable mailbox that receives email for 24 hours. |
list_mailboxes | Lists your active mailboxes. |
get_mailbox | One mailbox: when it expires and how many messages it has. |
delete_mailbox | Deletes a mailbox and its messages right away. |
wait_for_message | Waits up to 50 seconds for an email and returns it with the verification code and confirmation link already extracted. |
list_messages | The messages of a mailbox, newest first. |
get_message | One message: its text, codes, links and the list of attachments. |
delete_message | Deletes one message with its attachments. |
list_domains | The domains a new mailbox can use. |
get_limits | Your API quota and rate limits. |
Troubleshooting
401 Unauthorizedwithmissing or invalid API keyin the body – the key is missing, mistyped or revoked. If an agent cannot connect in CI, check the secret first.400from a client you wrote yourself – sendAccept: application/json, text/event-streamwith every request: the server answers as an event stream and rejects a request without this header.
Untrusted content
Emails are written by outside senders, so the server hands them to the model as untrusted data: the extracted code and link first, then the email text wrapped in markers that tell the model not to follow instructions in it. Still, review what your agent does with mail from senders you don't know.