MCP Integration

Give Claude Desktop, Cursor, or Windsurf direct access to your Mailto.Bot mailboxes. With one config change your AI assistant can create mailboxes, send messages, read inboxes, and manage webhooks — no copy-pasting required.

Last updated: March 25, 2026

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external services using typed function calls. Instead of pasting API responses into a chat window, MCP lets Claude or Cursor call Mailto.Bot directly and act on the results.

Mailto.Bot exposes an MCP server at https://mailto.bot/mcp that speaks the MCP Streamable HTTP transport (spec 2025-03-26). Any MCP-compatible client can connect using a Bearer token.

Get an API token

All MCP methods require a Bearer token. Session cookies are not supported for MCP — you must use an API token.

  1. 1
    Sign inGo to Dashboard.
  2. 2
    Create a tokenNavigate to Tokens and click New Token. Give it a descriptive name like claude-desktop.
  3. 3
    Copy the valueThe full token is shown once only. Copy it now — you will paste it into your client config below.

Claude Desktop

Requires Claude Desktop 0.9+ and Node.js 18+ (for npx).

Edit your Claude Desktop config file and add the mailtobot server entry. Replace YOUR_API_TOKEN with the token you created above.

JSON
// ~/Library/Application Support/Claude/claude_desktop_config.json  (macOS)
// %APPDATA%\Claude\claude_desktop_config.json                        (Windows)
{
  "mcpServers": {
    "mailtobot": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mailto.bot/mcp"],
      "env": {
        "MAILTOBOT_TOKEN": "YOUR_API_TOKEN"
      }
    }
  }
}

After saving, restart Claude Desktop. You should see mailtobot listed in the MCP servers panel (Settings → Developer).

Cursor

Requires Cursor 0.43+.

Create or edit .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global access). Cursor sends the Authorization header directly on every MCP request.

JSON
// .cursor/mcp.json  (project root, or ~/.cursor/mcp.json for global)
{
  "mcpServers": {
    "mailtobot": {
      "url": "https://mailto.bot/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Reload the window (Cmd+Shift+P → Reload Window). Cursor will show a green dot next to Mailto.Bot in the MCP panel.

Windsurf

Requires Windsurf 1.6+.

Edit ~/.codeium/windsurf/mcp_config.json (created automatically when you first open MCP settings).

JSON
// ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mailtobot": {
      "serverUrl": "https://mailto.bot/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Open Windsurf Settings → MCP and click Refresh to pick up the new server.

Available tools

Once connected, your AI assistant has access to the following Mailto.Bot tools:

Tool nameDescription
mailtobot_list_mailboxesList all mailboxes in your workspace.
mailtobot_create_mailboxCreate a new mailbox (with optional custom name on Pro).
mailtobot_delete_mailboxPermanently delete a mailbox and its messages.
mailtobot_list_messagesList messages in a mailbox with optional pagination.
mailtobot_get_messageFetch a single message by ID, including attachments.
mailtobot_send_messageSend a message from one mailbox to one or more recipients.
mailtobot_delete_messageDelete a specific message from a mailbox.
mailtobot_list_webhooksList webhooks registered to a mailbox.
mailtobot_create_webhookRegister a new webhook URL for a mailbox.

Example workflows

Automated e2e email testing

Ask your assistant to spin up a fresh mailbox per test run, send a verification email, and assert it arrives with the expected content:

> Create a mailbox called test-run-{uuid}.
> Send a welcome email to it from notifications@my-app.com.
> Fetch the latest message and confirm the subject starts with "Welcome".
> Delete the mailbox when done.

CI / CD notifications

Use Cursor to wire up deployment notifications in a CI pipeline:

> I need a deploy-alerts mailbox. Create it if it does not already exist.
> Register a webhook pointing to https://my-alerting-service.com/hooks.
> Write a GitHub Actions step that sends a message to deploy-alerts
whenever a production deploy completes.

Multi-step setup in one prompt

Prompt
# Example prompt to Claude Desktop / Cursor / Windsurf:

"Create a mailbox called staging-alerts and register a webhook
 pointing to https://my-server.com/alerts. Then send a test message
 with subject 'Alert system online' to that mailbox."

# Claude will call:
#   mailtobot_create_mailbox({ name: "staging-alerts" })
#   mailtobot_create_webhook({ mailboxName: "staging-alerts",
#                              url: "https://my-server.com/alerts" })
#   mailtobot_send_message({ ... })

MCP authentication notes

  • MCP requests use Bearer token auth only — session cookies are not forwarded.
  • Stateless requests (single POST) are supported without an SSE session. For streaming server-to-client notifications, open a GET /mcp SSE connection first and include the returned Mcp-Session-Id header in subsequent POSTs.
  • Sessions are in-memory with a 5-minute TTL. Clients should reconnect if they receive a 404 on a session-based POST.

Continue reading