SuperAPIAI Directory

multi-mail-mcp

github.com · AI developer platforms

multi-mail-mcp is an open-source server based on the MCP protocol that can connect to multiple Gmail accounts simultaneously, supporting searching, reading, drafting, and sending emails, and can be used with Claude Desktop, Claude Code, and ChatGPT. It offers two transport modes, stdio and Streamable HTTP, uses a user-created Google OAuth client, and email data is transmitted only locally and between the user and Google. Default permissions are read-only and compose; it does not provide the ability to delete emails or modify settings; calendar and label features must be enabled separately per account, and it also supports a drafts-only mode to prohibit sending.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

multi-mail-mcp is an MCP server for multiple Gmail accounts, used to search, read, compose, and send emails in clients such as Claude Desktop, Claude Code, and ChatGPT. The project is under the MIT license, runs via npx, and requires no separate installation.

Purpose and positioning: It addresses the need to manage multiple Gmail mailboxes simultaneously within AI clients. Each user uses their own Google OAuth client, so no Google app verification is required, and emails do not pass through third-party servers—they are transmitted only between the local machine and Google.

Main capabilities:

  • Multi-account management: The account parameter accepts a full email address, an alias, or the part before @; it can be omitted when only one account is connected; MULTI_MAIL_DEFAULT can set the default account.
  • Email operations: search, read, draft, and send emails; reply_to_message_id can place a reply in the correct thread and automatically fill in the recipient and subject, and reply_all will add all recipients of the original email.
  • Permission control: By default, only gmail.readonly and gmail.compose are requested; the server cannot delete emails, move them to trash, or change settings.
  • Calendar (optional): Enabled per account via add --calendar, adding calendar.readonly and calendar.events permissions, allowing reading events and free/busy information and creating events on your own calendar, but it cannot invite others, and there are no tools to modify or delete events.
  • Labels (optional): Enabled per account via add --labels, adding gmail.modify permission, but the server has no trash tool and rejects the TRASH and SPAM labels.
  • Drafts-only mode: When started with --drafts-only or when MULTI_MAIL_SEND=off is set, send_email and send_draft are not registered, and the model can only read, search, and compose drafts; emails must be sent manually by the user in Gmail.

Usage:

  1. Requires Node.js 20 or later.
  2. Create a project in Google Cloud Console and enable the Gmail API (if using Calendar, you also need to enable Google Calendar API), configure the OAuth consent screen and publish the app, create an OAuth client of type Desktop app and download the JSON.
  3. Use npx -y @yybd/multi-mail-mcp add <account> to connect mailboxes one by one, using a different alias for each mailbox; the browser will show that the app is unverified, which is normal for your own app.
  4. Manage accounts through commands such as list, check, alias, and remove.
  5. Claude Desktop and Claude Code use stdio transport (dist/server.js); ChatGPT only supports remote HTTPS, so you need to run HTTP mode (dist/http.js) and expose it through a tunnel, with the api_key carried in the URL or a Bearer token used. The HTTP server only listens on 127.0.0.1, and an MCP_AUTH_TOKEN of at least 24 characters must be set for it to start.

Use cases: unified handling of multiple mailboxes, automated email sorting, scheduled tasks, read-only or draft workflows that need to restrict sending permissions, and cross-account email retrieval in Claude and ChatGPT.

Limitations: adding attachments to outgoing emails is not yet supported; there is no ability to delete emails, move them to trash, or modify settings; calendar tools only appear when at least one account has calendars enabled; connecting ChatGPT requires you to set up an HTTPS tunnel yourself; the full URL of HTTP mode is equivalent to a password, so the token should be rotated if it leaks.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools