Skip to main content

Integrate with Claude Desktop via MCP

The mailbot MCP server exposes inbox, message, thread, and compliance operations as structured tools. When connected to Claude Desktop (or any MCP client), Claude can read your inbox, send mail, and act on threads without you copying API responses by hand.

This guide focuses on Claude Desktop. The same server works with Claude Code, Cursor, and other MCP-compatible clients.

What you can do once connected

Once Claude Desktop has access to the mailbot MCP server, you can ask things like:

  • "Create a sandbox inbox called triage and tell me its address."
  • "List unread messages in support@mydomain.com from the last 24 hours."
  • "Reply to the most recent thread with this draft, but ask me to confirm first."
  • "Check whether mydomain.com is fully compliant for sending."

Claude will call the right MCP tool, show the structured result, and then take the next step in conversation.

Prerequisites

  • Claude Desktop installed
  • a mailbot API key from getmail.bot/dashboard
  • Node.js 20+ on the machine running Claude Desktop (the MCP server runs locally via npx)

Step 1: Get your API key

In the dashboard, go to API Keys and copy a key that starts with mb_. Treat it like any other secret. The MCP server runs on your machine, but the key is what authorizes calls against your account.

Step 2: Edit Claude Desktop's config

Open the Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the mailbot MCP server entry. If you already have other servers, add this alongside them:

{
"mcpServers": {
"mailbot": {
"command": "npx",
"args": ["mailbot-mcp"],
"env": {
"MAILBOT_API_KEY": "mb_your_api_key_here"
}
}
}
}

Save and quit Claude Desktop, then reopen. The mailbot tools should now appear in the tools menu inside any conversation.

Step 3: Confirm the connection

Open a fresh conversation and ask:

"List my mailbot inboxes."

Claude should call list_inboxes and return the structured list. If you see an authentication error, double-check the MAILBOT_API_KEY value in the config.

Available tools

The MCP server exposes:

ToolWhat it does
create_inboxCreate a new inbox (sandbox or custom domain)
list_inboxesList inboxes on your account
send_emailSend a message from an inbox
reply_to_emailReply to an existing message in the same thread
list_messagesList messages in an inbox
get_messageFetch a single message by ID
search_messagesFull-text search across an inbox
list_threadsList conversation threads
get_threadFetch a thread with all messages
check_complianceCheck SPF, DKIM, DMARC for a domain
get_engagement_statsOpen/click/bounce rates for an inbox
get_message_engagementEngagement timeline for one message
list_domainsList domains on the account
add_domainRegister a new sending domain
verify_domainRe-run DNS verification

Practical patterns

Triage with confirmation

Tell Claude to never send without you confirming:

"For any auto-reply you draft, show me the draft first and wait for me to say 'send'."

Claude will surface the draft, you approve, then it calls send_email or reply_to_email.

Daily summary

"Every morning, summarize unread mail across all my inboxes from the last 24 hours and tell me which threads need a reply."

Claude walks list_inboxeslist_messagesget_thread and produces a digest.

Drafting in voice

Give Claude a few past threads as samples and it will match your tone in drafts. The get_thread tool returns the full message history, so you can ask Claude to read the thread context before drafting.

Security notes

  • The MCP server runs locally. Your API key never leaves your machine.
  • Rotate the key in the dashboard if you suspect compromise. Update claude_desktop_config.json with the new value.
  • For shared machines, consider using a sandbox-only key with limited scope (a key tied to an account whose only inboxes are sandbox).
  • All calls Claude makes are visible in the audit log under your API key. Review periodically.

Troubleshooting

SymptomLikely causeFix
Tools missing from menuConfig not picked upQuit Claude Desktop fully and relaunch
401 UnauthorizedWrong or expired API keyRegenerate in dashboard, update config
429 rate limitBurst of tool calls in one turnAsk Claude to space calls or batch reads
Tool returns empty listInbox or domain filter mismatchCheck inbox_id value, list inboxes first