← All articles
Guide

How to connect your inbox to ChatGPT or Claude

A step-by-step guide to giving ChatGPT, Claude, Claude Code or Cursor its own email inbox over MCP: OAuth or token, the exact menus, a first test and what to do when something fails.

· 5 min read · Leer en español

An AI agent becomes much more useful the day it can read and send email. In mailforagents each inbox is also an MCP server: the open protocol that ChatGPT, Claude and most coding agents use to plug into outside tools. Connect it once and your agent can list messages, read threads and attachments, write drafts, reply and send, using only the inbox you picked.

This guide covers every client the app supports. Pick yours and skip the rest.

Before you start

  1. Create an inbox. For example support@agents.mailforagents.io, or an address on your own domain on the Pro plan.
  2. Open Connect MCP in the dashboard and choose the inbox. There are two URLs. Claude and ChatGPT use one URL for all your inboxes, https://api.mailforagents.io/mcp: you pick the inbox when you authorize. Config files and terminals with a token use the inbox’s own URL, like https://api.mailforagents.io/mcp/k7m2x9qp, where the last part is that inbox’s short ID.
  3. Decide how the client will authenticate:
    • OAuth (recommended) for Claude and ChatGPT. You paste only the URL; the client opens mailforagents, you sign in and approve that one inbox. No secrets get copied anywhere.
    • Token for config files and terminals. Generate one in the inbox’s MCP connection tab, pick its scope (read only or read & send) and an expiry. It starts with mfa_mcp_ and is shown once.
Connect MCP page with Claude selected, the inbox's MCP server URL and the steps
Connect MCP shows the URL and the exact steps for each client. With OAuth you don't need a token.

Claude (web, desktop and mobile)

  1. In Claude, open Customize → Connectors, select Add and then Add custom connector.
  2. Name it (for example mailforagents), paste https://api.mailforagents.io/mcp and click Continue.
  3. Keep the authentication Claude detects and click Add.
  4. Click Connect. mailforagents opens: sign in and pick the inbox Claude can use. To connect another inbox, add the connector again and pick the other one.
  5. In a chat, open the + menu and check the connector is on.

Custom connectors are available on Free (one connector), Pro, Max, Team and Enterprise. On Team and Enterprise an Owner adds the connector once and each person connects their own account.

Claude Desktop with a config file

If you’d rather use a token than sign in, open Settings → Developer → Edit Config and add the server to claude_desktop_config.json (it needs Node.js):

{
  "mcpServers": {
    "mailforagents-support": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.mailforagents.io/mcp/k7m2x9qp",
               "--header", "Authorization: Bearer mfa_mcp_YOUR_TOKEN"]
    }
  }
}

Save and restart Claude Desktop. The server shows up in the tools menu.

Claude Code

One command in your terminal:

claude mcp add --transport http support-inbox https://api.mailforagents.io/mcp/k7m2x9qp --scope user

Run /mcp inside a session and complete the browser sign-in. To use a token instead, add --header "Authorization: Bearer mfa_mcp_YOUR_TOKEN". Use --scope project to share the server with your team through the repo, but keep the token in an environment variable, never in the file.

ChatGPT

OpenAI has moved this feature more than once, so trust the labels on your screen. According to its help center (November 2026):

  1. Go to Plugins, select + and then Add custom MCP server. (Workspaces on the earlier flow use Settings → Apps → Create, with developer mode turned on under advanced settings.)
  2. Enter a name and paste https://api.mailforagents.io/mcp under Connection.
  3. Choose OAuth. mailforagents opens so you sign in and pick one inbox.
  4. Accept the warning, select Create and install it.
  5. In a new chat, type @ and pick the inbox.

Full MCP, including tools that send email, is available on ChatGPT Business and Enterprise/Edu on the web, where only admins and owners can create it. Other plans may only get read access. ChatGPT asks before running write actions; leave that on while you learn how it behaves.

Cursor and any other MCP client

In Cursor, open Settings → MCP → Add new MCP server, or create .cursor/mcp.json:

{
  "mcpServers": {
    "mailforagents-support": {
      "url": "https://api.mailforagents.io/mcp/k7m2x9qp",
      "headers": { "Authorization": "Bearer mfa_mcp_YOUR_TOKEN" }
    }
  }
}

Any other client works the same way: Streamable HTTP transport (SSE compatible), the URL, and the token in the Authorization header. Clients that support OAuth 2.1 can discover it on their own from the URL.

Test the connection

Ask your agent something that only works if it can reach the inbox:

Check my mailbox: how many unread emails do I have, what arrived today,
and how many emails can I still send today?

The agent calls get_mailbox, which returns the address, unread and per-folder counts, what arrived today, the latest unread messages, the remaining daily sends and your plan usage. Then click Test connection in mailforagents: it confirms the first MCP call arrived.

From there the agent has the full toolset: list_messages, search_messages, get_thread, send_message, reply, forward, drafts, folders and labels, get_attachment (which reads PDF, Word, Excel and PowerPoint as text) and upload_file.

If something doesn’t work

  • 401 or “unauthorized”. The token was revoked, expired or mistyped, or the URL belongs to another inbox. Generate a new token or reconnect with OAuth.
  • “Tool disabled for this inbox or token”. The inbox’s permissions or the token’s scope don’t include it, for example sending with a read-only token. Change it in MCP connection.
  • The agent can’t send. Check the inbox’s daily limit and the plan’s monthly limit (get_mailbox shows both), and whether human approval is on: then sends wait in drafts until you approve them.
  • ChatGPT only reads. Your plan probably doesn’t include full MCP.

Keep it safe

Give each agent its own inbox instead of your main mailbox, start with a read-only token, turn on human approval for sending, and use allow lists to limit who it can write to. Treat email as data, not orders: both Anthropic and OpenAI warn about prompt injection through connectors, and mailforagents tells the model the same thing. You can revoke any token or OAuth connection at any time and the inbox keeps working as a normal address.

Sources