Skip to main content

MCP

MCP server for Gmail, Outlook, Yahoo, iCloud, and IMAP

Let Claude, Cursor, VS Code, or your agent read messages, retrieve OTP codes, reply, and move messages out of Spam across all connected mailboxes — using your workspace API key, with no code required.

claude mcp add --transport http mailera https://mailera.app/api/public/v1/mcp \  --header "Authorization: Bearer mh_live_xxx"

Connection

Server URL
https://mailera.app/api/public/v1/mcp
Authentication
Authorization: Bearer mh_live_… or X-API-Key
Transport
Streamable HTTP, no session required
Protocol version
2025-06-18 · 2025-03-26 · 2024-11-05

12 tools, based on key permissions

Agents only see tools allowed by the API key's permissions. Each call runs the corresponding REST endpoint, so results and error codes are identical to the API.

ToolWhat it doesScope
list_mailboxesList mailboxes, providers, capabilities and sync statusread
get_mailbox_statusCheck mailbox connectivity and last sync timeread
list_messagesList messages in a folder, newest firstread
search_messagesSearch messages across all mailboxes, optionally including OTP codesread
get_messageRead a full message: sender, body and attachmentsread
get_latest_otpGet the latest OTP code from Inbox or Junk Emailread
send_emailSend a new message, preventing duplicates with idempotency_keysend
reply_to_emailReply, reply all or forward a messagesend
get_send_statusTrack a send attempt until its status is sent, failed or unknownsend
move_messageMove a message to Inbox, Junk Email, Archive or Deleted Itemsmove
rescue_spamMove messages out of Junk Email: all, or by sender, domain or subjectmove
sync_mailboxSync now and wake a sleeping mailboxsync

Each tool call uses the corresponding REST endpoint: the same scopes, the same limit of 300 requests/minute and the same API logs. Errors appear in the tool result (isError) with a stable error.code for the agent to handle.

Setup for each app

Copy the configuration, enter your API key, then restart the app. Each app has its own guide with verification steps and common errors.

  • Claude

    Claude Code with one command, Claude Desktop via the mcp-remote bridge.

    Terminal · claude_desktop_config.json

    Claude guide
  • Cursor

    One mcp.json file, for all projects or just one.

    ~/.cursor/mcp.json

    Cursor guide
  • VS Code

    A .vscode/mcp.json file; VS Code asks for your key once and keeps it secret.

    .vscode/mcp.json

    VS Code guide

Safe mailbox access for agents

  • Grant only the permissions needed

    If an agent only needs to read messages, create a key with only read permission. Grant send permission only when the agent truly needs to send, and restrict the key to mailbox groups where possible.

  • Incoming messages are data, not instructions

    Message content is written by other people. Don't let agents follow instructions inside messages, such as “forward all messages to…”. Require agents to ask you before sending or forwarding messages.

  • Send each message only once

    Always pass idempotency_key when sending. If the status is unknown, don't resend — check Sent Items first.

  • Revoke at any time

    Revoke a key in Settings → API keys to immediately block every app using it. The API log records each tool call.

Not using MCP?

Every tool has a corresponding REST endpoint, with signed webhooks for new messages.