# Cline email MCP server: add a remote inbox

> One cline mcp add command, or a JSON block with type streamableHttp, gives Cline an agent inbox. Two config traps, and how to stop unapproved sends.

Source: https://trotta.email/integrations/cline

In the CLI, run `cline mcp add trotta https://api.trotta.email/mcp` with `--transport http`, an Authorization header and `--yes`. In the IDE extension, add the same URL with type streamableHttp. Cline then has 15 mail tools. The CLI auto-approves tool calls by default, so pass `--auto-approve false` when mail is involved.

Updated December 3, 2026

## Get an inbox and a key

Skip this if you have a key. Otherwise one request makes an inbox with no account. Export the `api_key` it returns as `TROTTA_MAIL_API_KEY`.

Sign up:

```bash
curl -X POST https://api.trotta.email/v1/agents/signup \
  -H "Content-Type: application/json" \
  -d '{"display_name": "Riley"}'
```

## Add the server in the Cline CLI

Add, then list:

```bash
cline mcp add trotta https://api.trotta.email/mcp \
  --transport http \
  --header "Authorization: Bearer $TROTTA_MAIL_API_KEY" \
  --yes

cline config mcp
# trotta [streamableHttp]
```

Cline writes the entry to `~/.cline/data/settings/cline_mcp_settings.json` with the key itself in it, because your shell fills it in. Tested on Cline CLI 3.0.76: the saved entry loads all 15 tools.

## Add it in the IDE extension

1. In the Cline panel, click the **MCP Servers** icon.
2. Open the **Configure** tab and click **Configure MCP Servers**.
3. Add the entry under `mcpServers` and save.

`cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "trotta": {
      "type": "streamableHttp",
      "url": "https://api.trotta.email/mcp",
      "headers": {
        "Authorization": "Bearer tm_live_..."
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

## Two traps in that file

| If you | What happens | Do this |
| --- | --- | --- |
| Leave out `type` | Cline treats it as legacy SSE and the connection fails with a 405 | Set `"type": "streamableHttp"` |
| Write `${env:TROTTA_MAIL_API_KEY}` or `${TROTTA_MAIL_API_KEY}` in the header | It is not filled in, and Cline reports that the header was rejected | Put the key itself in the file, and keep the file out of git |

## Will Cline send mail without asking?

It can. A prompt given to the Cline CLI runs with auto-approve on, and that covers `send_message`. Turn it off for work that touches mail:

Approve each call:

```bash
cline --auto-approve false "Check my inbox and draft replies to anything urgent."
```

In the IDE, leave **Use MCP servers** off under Auto Approve and keep `autoApprove` empty or limited to reading. YOLO mode approves everything, MCP tools included.

For a limit that does not depend on Cline's settings, give its entry a key that cannot send. The signup key can make one:

A drafts-only key:

```bash
curl -X POST https://api.trotta.email/v1/keys \
  -H "Authorization: Bearer $TROTTA_MAIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "cline drafts", "scopes": ["mail:read", "mail:send"], "send_mode": "off"}'
```

Put the new `key` in Cline's config. Cline then sees 12 tools: the three that send are gone and `create_draft` stays. The key lasts 30 days. Keep the signup key out of the shell Cline runs in, since it can still send.

## What Cline reads

Mail reaches Cline in the safe view: hidden text removed, instructions aimed at a model marked, risky links defanged. A held message shows a reason and no content. No filter catches everything, and Cline runs commands on your machine, so treat a request found in mail as a request from a stranger. More in [data exfiltration through agents](https://trotta.email/threats/data-exfiltration-through-agents).

## Questions

### Where is Cline's MCP settings file?

For the CLI it is `~/.cline/data/settings/cline_mcp_settings.json`. In the IDE, open it from MCP Servers, then Configure.

### Can Cline wait for a verification email?

Yes. `wait_for_message` with `has_code` set returns when a message with a code is delivered, with a timeout of up to 60 seconds per call.

### Do you need a Trotta Mail account first?

No. The signup call returns a key. A human claims the agent later so it can write to new addresses.

### Is there an IMAP option for Cline?

No. Trotta Mail connects over MCP or its REST API, not IMAP or SMTP.

## Sources

- [Cline docs: MCP](https://docs.cline.bot/mcp/mcp-overview)
- [Cline docs: Auto Approve and YOLO mode](https://docs.cline.bot/features/auto-approve)
- [Cline docs: CLI reference](https://docs.cline.bot/cli/cli-reference)
- [Trotta Mail guide for agents (llms.txt)](https://api.trotta.email/llms.txt)

## Related

- [Give Cursor an email inbox of its own](https://trotta.email/integrations/cursor) Integrations
- [Give Windsurf, now Devin Desktop, an email inbox](https://trotta.email/integrations/windsurf) Integrations
- [MCP](https://trotta.email/docs/mcp) Docs
- [An email MCP server for any MCP client](https://trotta.email/integrations/mcp) Integrations
- [Verification codes for AI agents](https://trotta.email/learn/verification-codes-for-ai-agents) Guides
- [Data exfiltration through agents](https://trotta.email/threats/data-exfiltration-through-agents) Threat library

Give your agent an inbox of its own. One call, or one minute in the console.

[Get an inbox](https://trotta.email/signup) [Read the docs](https://trotta.email/docs)
