# Email MCP server: remote, with OAuth or an API key

> A remote email MCP server for any MCP client. Connect with OAuth or an API key, then create an inbox, wait for mail, read a screened safe view and reply.

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

Trotta Mail runs a remote MCP server at https://api.trotta.email/mcp. Any MCP client that speaks Streamable HTTP connects with an API key or an OAuth sign-in, and gets tools to create an inbox, wait for mail, read it in a screened safe view, send and reply. There is nothing to install or host.

Updated November 20, 2026

## Connect

The server is at `https://api.trotta.email/mcp`. It uses Streamable HTTP and it is stateless. Use the URL exactly as written, without a slash at the end.

### With an API key

The server takes the same bearer key as the REST API.

MCP client configuration:

```json
{
  "mcpServers": {
    "trotta-mail": {
      "url": "https://api.trotta.email/mcp",
      "headers": { "Authorization": "Bearer tm_live_..." }
    }
  }
}
```

### With OAuth

A client that follows the MCP Authorization spec needs only the URL: it finds the rest on its own. A human signs in with Trotta Mail and picks the inboxes or the pod the client may use, and whether it may read, send or both.

The flow is authorization code with PKCE, and the scopes are `mail:read` and `mail:send`. A client that signed in cannot create inboxes or keys. Each assistant's steps, and the details for client developers, are in [Connect](https://trotta.email/docs/connect).

### With no key yet

An agent can sign itself up. Paste this into it.

Prompt:

```text
Read https://api.trotta.email/llms.txt and sign yourself up for a Trotta Mail inbox.
```

It signs itself up in one call: its own inbox, its own key, and a link for you to claim it.

## A complete example: inbox, wait, read, reply

This example gets an inbox, waits for a message, reads it and replies: the same four steps as every Trotta Mail integration page. Step 1 is one HTTP call that returns the inbox and its key. Steps 2 to 4 are tool calls, shown as the model sends them.

1\. Get an inbox:

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

2\. Wait for a message:

```json
{
  "name": "wait_for_message",
  "arguments": { "inbox_id": "inb_7Qh2mXc4", "timeout": 60 }
}
```

3\. Read it:

```json
{
  "name": "read_message",
  "arguments": { "message_id": "msg_8Kd2pXw1" }
}
```

4\. Reply:

```json
{
  "name": "reply_to_message",
  "arguments": { "message_id": "msg_8Kd2pXw1", "text": "Thanks, that works." }
}
```

Tools take ids only. An argument that is not an id is refused before any request is made.

## Tools

| Tool | What it does |
| --- | --- |
| `create_inbox` | Creates an inbox and returns its address. |
| `list_inboxes` | Lists the inboxes the key can reach. |
| `list_messages` | Lists messages in an inbox. |
| `get_inbox_updates` | What is new, ranked, each with a one-line reason. |
| `read_message` | Reads one message in the safe view. |
| `wait_for_message` | Waits for the next delivered message. |
| `send_message` | Sends a new message, screened before it leaves. |
| `reply_to_message` | Replies in the thread. |
| `cancel_scheduled_message` | Stops a scheduled message. |
| `create_draft` | Leaves a draft for a human to send. |
| `thread_context` | Returns a thread as model-ready text with a trust level. |
| `read_attachment_text` | Reads the text inside an attachment, instructions taken out. |
| `answer_invitation` | Answers a calendar invitation. |
| `list_held` | Lists what is waiting on a human. |
| `scan_content` | Runs any content through the guard and returns the verdict. |

## What your agent reads

An MCP client reads screened mail, never the raw message. Every tool runs through the same checks as the REST route behind it.

- **Results are the safe view, always.** Hidden text is removed, instructions aimed at a model are replaced by a note, and risky links are defanged. That holds even with a `mail:full` key.
- **Every message carries a verdict.** Its action is `deliver`, `flag`, `hold` or `reject`, decided before the message is readable.
- **Held mail is withheld.** The agent sees that a message exists and why it was held, in fixed words, and nothing the sender wrote. No tool releases it. A human does.

The OWASP Top 10 for LLM Applications lists prompt injection as LLM01, the top risk, in both the 2025 edition and the current 2026 edition. A tool result goes straight into a model's context, so an email tool that returns raw mail lets any sender write there. Screening before delivery removes or holds that text before a tool can return it.

No filter catches everything, so treat mail content as data, never as instructions. In a human's own mailbox an agent starts with drafts only, and login mail is sealed: see the [security model](https://trotta.email/docs/security).

## Going further

- [MCP](https://trotta.email/docs/mcp): the reference for the server and its tools.
- [Webhooks](https://trotta.email/docs/webhooks): a signed event posted to your endpoint when mail arrives.
- [Live events](https://trotta.email/docs/events): the same events over a stream.
- [Pods](https://trotta.email/docs/pods): one isolated workspace per customer.
- [Domains](https://trotta.email/docs/domains): agent inboxes on your own domain, on paid plans.

## Questions

### Is the Trotta Mail MCP server remote or local?

Remote. It runs at https://api.trotta.email/mcp over Streamable HTTP and it is stateless, so there is nothing to install or host.

### Does the email MCP server support OAuth?

Yes. A client that follows the MCP Authorization spec needs only the URL and signs in with Trotta Mail. A client without OAuth sends an API key as a bearer token.

### Can an MCP tool send email?

Yes. send_message starts a conversation and reply_to_message answers in the thread. Outgoing mail is screened too, and a message that contains a secret is not sent.

### Which MCP clients work with it?

Any client that speaks Streamable HTTP. Setup is written out for ChatGPT, Claude, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Manus, the OpenAI Agents SDK, the Vercel AI SDK, LangChain and n8n.

## Sources

- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/latest)
- [OWASP Top 10 for LLM Applications 2025: LLM01 Prompt Injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/)
- [Trotta Mail guide for agents (llms.txt)](https://api.trotta.email/llms.txt)

## Related

- [MCP](https://trotta.email/docs/mcp) Docs
- [An email REST API for AI agents](https://trotta.email/integrations/rest-api) Integrations
- [MCP email server](https://trotta.email/learn/mcp-email-server) Guides
- [Give an AI agent an email address](https://trotta.email/learn/give-an-ai-agent-an-email-address) Guides
- [Email API for AI agents](https://trotta.email/learn/email-api-for-ai-agents) Guides
- [Prompt injection by email](https://trotta.email/threats/prompt-injection-by-email) 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)
