# Give GitHub Copilot an email inbox over MCP

> Add the Trotta Mail MCP server to GitHub Copilot in VS Code with one config file, by sign-in or API key. The tools Copilot gets and the mail it never sees.

Source: https://trotta.email/integrations/github-copilot

Give GitHub Copilot an inbox of its own by adding Trotta Mail to ~/.copilot/mcp-config.json with the URL https://api.trotta.email/mcp. In a Copilot chat session, select Authenticate and sign in with Trotta Mail. Copilot can then wait for mail, read codes, send and reply, and every message it reads was screened before delivery.

Updated November 20, 2026

## What GitHub Copilot can do with the inbox

With the server added, Copilot in VS Code can handle mail as part of a coding task: check that a notification arrived, read a verification code, or send a note when a job is done. The [MCP docs](https://trotta.email/docs/mcp) list every tool.

| Tool | What it does |
| --- | --- |
| `list_messages` | Lists messages in an inbox. |
| `wait_for_message` | Waits for the next delivered message. Filters include `has_code`. |
| `read_message` | Reads one message in the safe view. |
| `thread_context` | Returns a thread as model-ready text with a trust level. |
| `send_message` | Sends a new message. With `send_at`, schedules it. |
| `reply_to_message` | Replies in the thread. |
| `create_draft` | Leaves a draft for a human to read and send. |
| `list_held` | Lists what is waiting on a human. |

## Set up Trotta Mail in GitHub Copilot

Copilot reads the server from `~/.copilot/mcp-config.json`. The address is `https://api.trotta.email/mcp`, exactly as written, with no slash at the end. You sign in with your Trotta Mail account, or Copilot sends an API key.

### Sign in with Trotta Mail

1. Add the server to `~/.copilot/mcp-config.json`.
2. In a Copilot chat session, select **Authenticate** on the server and sign in with Trotta Mail.
3. Pick the inboxes Copilot may use, and whether it may read, send or both. Then allow.

`~/.copilot/mcp-config.json`:

```json
{
  "mcpServers": {
    "trotta": {
      "type": "http",
      "url": "https://api.trotta.email/mcp",
      "tools": ["*"]
    }
  }
}
```

### Use an API key

1. Put your key in the `TROTTA_MAIL_API_KEY` environment variable. Copilot reads the key from your environment.
2. Add the server to `~/.copilot/mcp-config.json` with the header.

`~/.copilot/mcp-config.json`:

```json
{
  "mcpServers": {
    "trotta": {
      "type": "http",
      "url": "https://api.trotta.email/mcp",
      "headers": {
        "Authorization": "Bearer ${TROTTA_MAIL_API_KEY}"
      },
      "tools": ["*"]
    }
  }
}
```

These steps follow the [VS Code docs](https://code.visualstudio.com/docs/agents/reference/mcp-configuration), checked on 2026-11-20. For another editor, see [Cursor](https://trotta.email/integrations/cursor).

## What GitHub Copilot sees and what it never sees

Copilot sees the safe view of each message. Hidden text is removed, instructions aimed at a model are replaced by a note, and risky links are defanged, so the model gets what a human could see. Each message carries a verdict with the reason.

Copilot never sees held mail. A held message is withheld, with the reason and no content, until a human releases it. In a human's own mailbox, login codes, password resets and sign-in links are sealed, and Copilot starts with drafts that the human sends. In an inbox of its own, Copilot reads the codes it asked for.

An agent in your editor can change files and run tasks. In a human's everyday mailbox, a real-looking message can arrive with text written to [hijack an agent](https://trotta.email/threats/agent-hijacking). A Trotta Mail inbox screens each message before it is accepted. No filter catches everything, so uncertain mail waits for a human.

## Three things to try

- Send the invite email from the staging app to riley@trotta.email, wait for it and check the link points at staging.
- Reply to the latest message from Jordan Ellis with the fix and the commit it is in.
- List what is held in this inbox and why.

## Troubleshooting

- **The server answers 401.** No token was sent, or the token is not good. Select **Authenticate** again, or check that `TROTTA_MAIL_API_KEY` is set where VS Code starts.
- **Sending answers `403 agent_drafts_only`.** The inbox is a human's own mailbox, where an agent starts with drafts. Use `create_draft`, or pick an agent inbox.
- **Copilot cannot reach an inbox.** A signed-in agent reaches the inboxes you picked. Sign in again and pick the inbox.

## Questions

### Does Trotta Mail for GitHub Copilot work on the Free plan?

Yes. The Trotta Mail Free plan is $0 with 2 inboxes and 1,000 emails a month. MCP and every check are on every plan.

### Which file does GitHub Copilot read the server from?

Copilot reads it from ~/.copilot/mcp-config.json, under mcpServers, with type set to http and the URL https://api.trotta.email/mcp.

### Does GitHub Copilot need an API key for Trotta Mail?

No. Copilot can sign in with your Trotta Mail account when you select Authenticate. An API key is the other way, read from the TROTTA_MAIL_API_KEY environment variable.

### Is Trotta Mail a GitHub or Microsoft product?

No. Trotta Mail is an independent product that works with GitHub Copilot as an MCP server. It is not made or endorsed by GitHub or Microsoft.

## Sources

- [VS Code docs: MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration)
- [Trotta Mail guide for agents (llms.txt)](https://api.trotta.email/llms.txt)

## Related

- [Connect ChatGPT and Claude](https://trotta.email/docs/connect) Docs
- [MCP](https://trotta.email/docs/mcp) Docs
- [An email MCP server for any MCP client](https://trotta.email/integrations/mcp) Integrations
- [MCP email server](https://trotta.email/learn/mcp-email-server) Guides
- [Give Cursor an email inbox of its own](https://trotta.email/integrations/cursor) Integrations
- [Agent hijacking](https://trotta.email/threats/agent-hijacking) 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)
