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

ToolScopeDescription
get_mailboxAccount or OrgInspect mailbox address, status, expiration, and quota usage.
list_messagesAccount or OrgList recent inbound and outbound messages, newest first.
get_messageAccount or OrgRead full plain-text/HTML body, threading headers, and attachment metadata.
send_emailAccount or OrgSend email with threading headers (scanned in real time for spam/phishing).
get_attachment_urlAccount or OrgGenerate a 1-hour signed download URL for an attachment.
list_webhooks / create_webhook / delete_webhookAccount or OrgManage real-time HMAC-signed email.received webhooks.
list_mailboxes / create_mailbox / get_balanceOrg key onlyProvision 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.