MCP Integration Guide
Remote MCP server for AI agent email.
Give Claude Code, Claude Desktop, Cursor, Windsurf, OpenCode, or OpenClaw a dedicated @theagentmail.net mailbox over Streamable HTTP MCP. No local bridge, no npm install, no DNS setup.
1. Create an inbox & scoped API key
Sign in at theagentmail.net/app, claim your free 30-day mailbox, click API Key on that mailbox, and generate an account-scoped key (am_...).
2. Connect Claude Code in one command
claude mcp add --transport http agentmail https://api.theagentmail.net/mcp \
--header "Authorization: Bearer am_..."Or paste into Cursor / OpenCode / MCP JSON config
{
"mcpServers": {
"agentmail": {
"url": "https://api.theagentmail.net/mcp",
"headers": {
"Authorization": "Bearer am_..."
}
}
}
}Available MCP tools
| Tool | Scope | Description |
|---|---|---|
| get_mailbox | Account or Org | Inspect mailbox address, status, expiration, and quota usage. |
| list_messages | Account or Org | List recent inbound and outbound messages, newest first. |
| get_message | Account or Org | Read full plain-text/HTML body, threading headers, and attachment metadata. |
| send_email | Account or Org | Send email with threading headers (scanned in real time for spam/phishing). |
| get_attachment_url | Account or Org | Generate a 1-hour signed download URL for an attachment. |
| list_webhooks / create_webhook / delete_webhook | Account or Org | Manage real-time HMAC-signed email.received webhooks. |
| list_mailboxes / create_mailbox / get_balance | Org key only | Provision mailboxes and check prepaid balance. |
Why scoped per-mailbox keys matter
Incoming emails are untrusted input. Passing an account-scoped token to the remote MCP server guarantees your agent can only read and send from its own single mailbox. It cannot list neighboring inboxes, read billing details, or touch your personal Gmail.