Give Cline an email inbox with a remote MCP server

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

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
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
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
{
  "mcpServers": {
    "trotta": {
      "type": "streamableHttp",
      "url": "https://api.trotta.email/mcp",
      "headers": {
        "Authorization": "Bearer tm_live_..."
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Two traps in that file

If youWhat happensDo this
Leave out typeCline treats it as legacy SSE and the connection fails with a 405Set "type": "streamableHttp"
Write ${env:TROTTA_MAIL_API_KEY} or ${TROTTA_MAIL_API_KEY} in the headerIt is not filled in, and Cline reports that the header was rejectedPut 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
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
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.

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

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