# Email MCP server

Give your AI agent an inbox it can read and reply from. Connect Robotomail’s email MCP server to Claude, Codex, OpenClaw, Hermes or another compatible client, then test a complete conversation.

## Connect your agent

Robotomail hosts a remote Model Context Protocol (MCP) server. Connect it to your agent, sign in to Robotomail and approve access to your mailboxes. Authentication uses OAuth; you do not need to create or paste a Robotomail API key.

```MCP server URL
https://robotomail.com/mcp
```

1. [Create a Robotomail account](https://robotomail.com/sign-up) and verify your email, or sign in to your existing account.
2. Open [Connections](https://robotomail.com/connections) and choose your agent. For clients with setup instructions, use **Copy prompt** and give the prompt to your agent, or follow **Manual setup**.
3. Approve the requested permissions in your browser, then ask your agent to list your Robotomail mailboxes.

Your existing mailbox and plan limits apply. You can use the same mailbox through MCP, the [REST API](https://robotomail.com/docs/quickstart) and the [Robotomail CLI](https://robotomail.com/docs/cli).


## Claude

In Robotomail [Connections](https://robotomail.com/connections), choose **Connect to Claude**. This opens Claude's custom connector setup with the Robotomail server URL. Add the connector, connect your account and approve access in the Robotomail window.

You can also add a custom connector in Claude using `https://robotomail.com/mcp`. Choose OAuth if Claude asks for an authentication method. After connecting, enable Robotomail for your conversation. Claude Code has separate terminal instructions below.


## Claude Code

Run these commands in your terminal, then approve access in your browser. If Robotomail is already added, run only the login command. You can also authenticate from /mcp inside Claude Code. Use the browser profile where you are signed in to Robotomail.

```shell
claude mcp add --transport http --scope user robotomail 'https://robotomail.com/mcp'
claude mcp login robotomail
```

[Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)


## Codex

Run these commands with an up-to-date Codex CLI, then approve access in your browser. If Robotomail is already added, run only the login command. Use the browser profile where you are signed in to Robotomail. In the Codex IDE extension, you can also add this URL under MCP servers and select Authenticate.

```shell
codex mcp add robotomail --url 'https://robotomail.com/mcp'
codex mcp login robotomail
```

[Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)


## Cursor & Grok Bot

For Cursor, merge the following `robotomail` entry into your MCP configuration. For Grok Bot, ask it to add a custom MCP connection with these settings. Preserve your other servers and reuse an existing Robotomail entry if you already have one.

```json
{
  "mcpServers": {
    "robotomail": {
      "url": "https://robotomail.com/mcp",
      "auth": {
        "CLIENT_ID": "https://robotomail.com/api/mcp/clients/grok-bot",
        "scopes": [
          "mail:read",
          "mail:send",
          "offline_access"
        ]
      }
    }
  }
}
```

Choose **Authenticate** and approve access in your browser. Leave the client secret empty; this public client uses PKCE. In Grok Bot, attach Robotomail to your conversation with `@`.

The [Robotomail Cursor plugin](https://github.com/robotomail/cursor-plugin) packages the MCP configuration with agent instructions. If you install the plugin, reuse its connection instead of adding a second server.


## OpenClaw

Run these commands where OpenClaw is installed, then approve access in your browser.

```shell
openclaw mcp set robotomail '{"url":"https://robotomail.com/mcp","transport":"streamable-http","auth":"oauth","oauth":{"scope":"mail:read mail:send offline_access","redirectUrl":"http://127.0.0.1:8989/oauth/callback","clientMetadataUrl":"https://robotomail.com/api/mcp/clients/openclaw"}}'
openclaw mcp login robotomail
```

[OpenClaw MCP documentation](https://docs.openclaw.ai/cli/mcp)


## Hermes Agent

Run these commands in an up-to-date Hermes CLI, then sign in to Robotomail in your browser.

```shell
hermes mcp add --url 'https://robotomail.com/mcp' --auth oauth robotomail
hermes mcp login robotomail
```

[Hermes Agent MCP documentation](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)


## Hermes on a remote or SSH host

On your SSH host, merge this entry into the mcp_servers section of your active Hermes profile’s config.yaml. Replace an existing robotomail entry instead of adding a duplicate. Run the login command below, open the displayed URL on any device, and approve the matching code.

```yaml
mcp_servers:
  robotomail:
    url: "https://robotomail.com/mcp"
    auth: oauth
    oauth:
      flow: device
      client_id: "https://robotomail.com/api/mcp/clients/hermes-device"
      token_endpoint_auth_method: none
      scope: "mail:read mail:send offline_access"
```

```shell
hermes mcp login robotomail --flow device
```

[Hermes Agent MCP documentation](https://hermes-agent.nousresearch.com/docs/reference/mcp-config-reference#device-authorization-flow-sshheadless)


## ChatGPT

Open [Connections](https://robotomail.com/connections) and choose Connect in ChatGPT, or visit the [Robotomail plugin listing](https://chatgpt.com/plugins/plugin_asdk_app_6aa3c6a073ac8191b8eab4d39499c9eb). Install the plugin, connect your Robotomail account, and approve access. Then ask ChatGPT to read your first email.

Custom MCP setup uses the same server URL, `https://robotomail.com/mcp`, with OAuth. Custom app creation depends on the features and permissions available in your ChatGPT account or workspace.


## Try your first email conversation

Start with your own email address so the complete test works on Free.

1. Ask the agent to list your Robotomail mailboxes and select the address you want to use.
2. From your verified account email, send that mailbox a message with the subject **Project check-in** and the question **What do you need from me next?**
3. Give the agent the instruction below. Review its proposed reply, then tell it to send.
4. Check your personal inbox. Reply to the agent's email with a new detail, then ask the agent to read the conversation again.


```text
Find my latest received email with the subject Project check-in.
Show me the sender, subject and a short summary.
Draft a reply asking for the project deadline.
Wait for my approval before sending it as a reply to that message.
```


You have a working connection when the agent can read the incoming message, send the approved reply and read your follow-up. Sending tools act immediately when called; the request to wait is an instruction to your agent.

1 mailbox, 10 sends and 10 receives per month. Exchange mail only between your agent and your verified email address. Upgrade to email anyone. No credit card, no expiry. Allowances reset on the first of each month (UTC). Upgrade for higher limits or a custom domain.
## Troubleshooting your connection

- **No email tools:** finish browser approval, enable the connection and reload the MCP client or start a new session.
- **The CLI is still waiting:** keep its login process running until the browser callback completes. On a remote Hermes host, use [device login](#device-flow).
- **Sending to someone else fails on Free:** test with your verified account email, or [choose a paid plan](https://robotomail.com/pricing).
- **A send timed out:** check sent messages before retrying, so you do not send the same message twice.
- **Incoming mail does not wake your agent:** MCP provides tools when the agent calls them. Use a running client with polling, a [Claude Code channel](https://robotomail.com/docs/guides/claude-code-channel) or an [event-driven application](https://robotomail.com/docs/guides/receive-and-reply) for automatic handling.


## Available tools

The server publishes tool descriptions, input and output schemas, and permission requirements through MCP. Your client discovers them using `tools/list` after authentication.

- `list_mailboxes` (`mail:read`): list your mailbox IDs, email addresses and display names.
- `search_messages` (`mail:read`): list or search messages in a mailbox by text, direction or date. Returns summaries; use `read_message` for the body.
- `read_message` (`mail:read`): read a message's plain-text body. Large bodies can be read in parts.
- `send_email` (`mail:send`): send a plain-text email from a selected mailbox, with recipients, optional CC, subject and body.
- `reply_to_email` (`mail:send`): reply to the sender of a received message and preserve the conversation thread.
- `set_mailbox_display_name` (`mail:send`): set the friendly From name for future emails, or clear it with an empty string.

MCP currently supports plain-text mail without attachments or reply-all. Use the [REST API](https://robotomail.com/docs/api/mailboxes) or [CLI](https://robotomail.com/docs/cli) for mailbox creation, and the REST API for HTML email, attachments, webhooks and domain management.


## Permissions & disconnecting

- `mail:read` allows the connected app to list and read the account's mailboxes and messages.
- `mail:send` allows sending, replying and changing mailbox display names.
- `offline_access` allows the client to refresh its authorization without a new browser approval each time.

Review the app and permissions on the consent screen. To revoke access, open [Connections](https://robotomail.com/connections), find the connected app and choose **Disconnect**, then confirm. That app must receive a new approval before it can use your mailboxes again. Your API keys and other connected apps continue to work.


## Other MCP clients & OAuth discovery

Use Streamable HTTP at `https://robotomail.com/mcp` with OAuth. Compatible clients can discover the authorization server from the protected resource metadata. Robotomail supports authorization code with PKCE, refresh tokens and the OAuth device authorization grant.

- [Protected resource metadata](https://robotomail.com/.well-known/oauth-protected-resource/mcp): `https://robotomail.com/.well-known/oauth-protected-resource/mcp`
- [Authorization server metadata](https://robotomail.com/.well-known/oauth-authorization-server/api/auth): `https://robotomail.com/.well-known/oauth-authorization-server/api/auth`

The OAuth resource is `https://robotomail.com/mcp`. Public clients use a hosted Client ID Metadata Document (CIMD) or a client registration arranged with Robotomail. Dynamic client registration is disabled. Configure the scopes your client needs: `mail:read`, `mail:send` and `offline_access`.

Device login lets a remote agent display a verification URL and code while you approve in any browser. The protocol is available to compatible clients; among the setup options above, Hermes exposes this flow. Other clients use their browser-based OAuth setup.

For terminal clients, a final `localhost` or `127.0.0.1` callback is expected: it delivers the approval to the waiting CLI process. Keep that process running until it confirms login. On an SSH host, use device login when your client supports it.

The [OpenAPI specification](https://robotomail.com/openapi.json) describes the REST API. MCP tools and their schemas are discovered from the MCP server. This guide is also available as [Markdown for agents](https://robotomail.com/docs/mcp.md).


---

Previous: [Authentication](https://robotomail.com/docs/authentication.md) | Next: [SDKs](https://robotomail.com/docs/sdks.md)
