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 docsBefore you start
- Create a free workspace and connect at least one mailbox.
- Go to Settings → API key, create a key, and select permissions. The read permission is enough to get started.
- Copy the key as soon as you create it — Mailera only shows the full key once.
Setup
- Create .vscode/mcp.json in your workspace, or run MCP: Open User Configuration to use it across all workspaces.
- Paste the configuration below. On the first run, VS Code asks for your Mailera API key and stores it as a secret.
- 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 guidanceCommon 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.
Other apps
Use Mailera in VS Code
Go to Settings → API key, create a key, and select permissions. The read permission is enough to get started.

