Skip to main content

MCP

Use Mailera in VS Code

Add Mailera to .vscode/mcp.json so Copilot Chat in Agent mode can access your mailboxes. VS Code asks for your API key on first use and stores it as a secret, keeping the key out of your configuration file.

Official VS Code docs

Before you start

  1. Create a free workspace and connect at least one mailbox.
  2. Go to Settings → API key, create a key, and select permissions. The read permission is enough to get started.
  3. Copy the key as soon as you create it — Mailera only shows the full key once.

Setup

  1. Create .vscode/mcp.json in your workspace, or run MCP: Open User Configuration to use it across all workspaces.
  2. Paste the configuration below. On the first run, VS Code asks for your Mailera API key and stores it as a secret.
  3. Open Chat in Agent mode and click the tools icon: mailera's tools should appear in the list.
.vscode/mcp.json
{  "inputs": [    {      "type": "promptString",      "id": "mailera-api-key",      "description": "Mailera API key",      "password": true    }  ],  "servers": {    "mailera": {      "type": "http",      "url": "https://mailera.app/api/public/v1/mcp",      "headers": {        "Authorization": "Bearer ${input:mailera-api-key}"      }    }  }}

The file contains no key, so you can commit it for the whole team to share; each person enters their own key.

Check the connection

Ask the agent: “List my Mailera mailboxes”. The agent calls list_mailboxes and returns your mailboxes with their sync status. Then try: “Find the latest email message from noreply@… and extract the OTP”.

Tool list and safety guidance

Common errors

401 unauthorized
The key is invalid, has been revoked, or is missing Bearer. The header must be Authorization: Bearer mh_live_…
Can't find send_email or rescue_spam
The key lacks the required permissions (send, move). Mailera only shows tools matching its permissions — create a new key with the permissions you need.
The agent can't find any mailboxes
The key is restricted to a group with no mailboxes, or the workspace has no connected mailboxes.
429 rate_limited
This key has exceeded 300 requests per minute. Wait the number of seconds specified in Retry-After, then try again.

Use Mailera in VS Code

Go to Settings → API key, create a key, and select permissions. The read permission is enough to get started.