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
triageand tell me its address." - "List unread messages in
support@mydomain.comfrom the last 24 hours." - "Reply to the most recent thread with this draft, but ask me to confirm first."
- "Check whether
mydomain.comis 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:
| Tool | What it does |
|---|---|
create_inbox | Create a new inbox (sandbox or custom domain) |
list_inboxes | List inboxes on your account |
send_email | Send a message from an inbox |
reply_to_email | Reply to an existing message in the same thread |
list_messages | List messages in an inbox |
get_message | Fetch a single message by ID |
search_messages | Full-text search across an inbox |
list_threads | List conversation threads |
get_thread | Fetch a thread with all messages |
check_compliance | Check SPF, DKIM, DMARC for a domain |
get_engagement_stats | Open/click/bounce rates for an inbox |
get_message_engagement | Engagement timeline for one message |
list_domains | List domains on the account |
add_domain | Register a new sending domain |
verify_domain | Re-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_inboxes → list_messages → get_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.jsonwith 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
| Symptom | Likely cause | Fix |
|---|---|---|
| Tools missing from menu | Config not picked up | Quit Claude Desktop fully and relaunch |
401 Unauthorized | Wrong or expired API key | Regenerate in dashboard, update config |
429 rate limit | Burst of tool calls in one turn | Ask Claude to space calls or batch reads |
| Tool returns empty list | Inbox or domain filter mismatch | Check inbox_id value, list inboxes first |