Documentation menu
Get started
Connect an AI agent (MCP)
Let your coding agent test the emails it builds: create an inbox, trigger a sign-up, wait for the email and follow its link.
Connect
MailBench runs a remote MCP server at https://app.mailbench.dev/mcp. It authenticates with the same API keysas the REST API: create one on the API keys page in the dashboard. Every plan includes it.
claude mcp add --transport http mailbench https://app.mailbench.dev/mcp \
--header "Authorization: Bearer $API_KEY"{
"mcpServers": {
"mailbench": {
"url": "https://app.mailbench.dev/mcp",
"headers": {
"Authorization": "Bearer sbx_api_…"
}
}
}
}Then ask your agent, for example: “Sign up a test user in the app and confirm the email address using the link MailBench receives.”
Tools
| Tool | What it does | Key scope |
|---|---|---|
list_inboxes | Lists the workspace’s inboxes and the SMTP server to send test email to. | read |
create_inbox | Creates an inbox and returns its SMTP credentials, to configure the app under test. | read_write |
list_messages | Lists messages in an inbox, newest first, filtered by text, sender, recipient, subject or time. | read |
wait_for_message | Waits up to 30 seconds for a matching email and returns it with its text and links. | read |
get_message | Returns one message: headers, plain text, links and attachment details. HTML on request. | read |
check_message | Runs the HTML compatibility, link or spam check on a message. | read |
clear_inbox | Deletes every message in an inbox. | read_write |
delete_message | Deletes one message. | read_write |
A read key can use every tool that only looks; the others answer forbidden. Give the agent aread key unless it needs to create or clear inboxes.
Email content is untrusted
Anyone can send an email that says “ignore your instructions”. MailBench hands message bodies to the agent marked as untrusted data, tells it never to follow instructions found in an email, and offers no tool that sends mail or changes account settings. Bodies are cut to 20,000 characters and HTML is only returned when asked for.
Limits
Each MCP request counts as one API request against your plan. On Free that is 1,000 a day and 2 a second; Pro and Team have no daily cap. A connection costs a few requests and each tool call one. See Errors and limits.

