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.
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.
// ~/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.
// .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).
// ~/.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 name | Description |
|---|---|
mailtobot_list_mailboxes | List all mailboxes in your workspace. |
mailtobot_create_mailbox | Create a new mailbox (with optional custom name on Pro). |
mailtobot_delete_mailbox | Permanently delete a mailbox and its messages. |
mailtobot_list_messages | List messages in a mailbox with optional pagination. |
mailtobot_get_message | Fetch a single message by ID, including attachments. |
mailtobot_send_message | Send a message from one mailbox to one or more recipients. |
mailtobot_delete_message | Delete a specific message from a mailbox. |
mailtobot_list_webhooks | List webhooks registered to a mailbox. |
mailtobot_create_webhook | Register 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:
CI / CD notifications
Use Cursor to wire up deployment notifications in a CI pipeline:
Multi-step setup in one 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
/mcpSSE connection first and include the returnedMcp-Session-Idheader 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