Give GitHub Copilot an email inbox over MCP

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

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 list every tool.

ToolWhat it does
list_messagesLists messages in an inbox.
wait_for_messageWaits for the next delivered message. Filters include has_code.
read_messageReads one message in the safe view.
thread_contextReturns a thread as model-ready text with a trust level.
send_messageSends a new message. With send_at, schedules it.
reply_to_messageReplies in the thread.
create_draftLeaves a draft for a human to read and send.
list_heldLists 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
{
  "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
{
  "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, checked on 2026-11-20. For another editor, see 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. 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

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