multi-mailbox-gmail
Allows connecting and searching multiple Gmail and Google Workspace accounts by aliases, with read-only access to messages and per-result source mailbox attribution.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@multi-mailbox-gmailSearch @personal and @work for recent invoices from the last 90 days."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Multi Mailbox Gmail for Codex
An open-source Codex plugin for connecting and searching multiple Gmail and Google Workspace accounts by friendly aliases such as @personal and @work.
It extends Codex with a local MCP server and mailbox-aware instructions, so a request such as Search @personal and @work for recent invoices searches both selected accounts and identifies the source mailbox for every result. Mail access is read-only.
Release status
Capability | Current status |
Public GitHub repository and Codex installation | Available |
Codex on Windows | Supported |
Codex on macOS | Experimental — uses macOS Keychain |
Codex on Linux | Experimental — requires Secret Service and |
Search multiple named Gmail accounts | Available after OAuth setup |
Bring your own Google Desktop OAuth client | Available |
One-click | Not live yet — shared public OAuth client and Google verification are pending |
The repository is public, but it is currently a developer preview. Until the shared OAuth client is added, an outside user can install the Codex plugin but must supply their own Google Desktop OAuth credentials before connecting a mailbox.
Related MCP server: multi-gmail-mcp-server
Install in Codex
npx codex-marketplace add pkforge/multi-mailbox-gmail --pluginStart a new Codex task after installation so the plugin's skill and MCP tools are loaded.
Connect mailboxes in chat
Once the shared public OAuth client is live, users will start a new Codex task and say:
Connect @personal
Connect @workEach command opens Google's account chooser. Pick the account that should own that alias and approve read-only Gmail access. Repeat for as many accounts as you need.
The planned public build will use one shared Google Desktop app identity so end users do not need a Google Cloud account or developer setup. OAuth happens directly between this local plugin and Google: there is no publisher backend, database, analytics, or telemetry. The plugin requests only https://www.googleapis.com/auth/gmail.readonly. Refresh tokens are encrypted for the current Windows user with DPAPI; aliases and account email addresses are stored as local metadata under %LOCALAPPDATA%\MultiMailboxGmail.
Current setup: use your own OAuth client
Organizations that prefer their own Google Cloud project can create a Desktop OAuth client, enable the Gmail API, and either pass its downloaded JSON to the CLI or set MULTI_MAILBOX_GMAIL_OAUTH_CLIENT_FILE.
npm.cmd install
npm.cmd run mailbox -- add personal C:\path\to\oauth-client.json
npm.cmd run mailbox -- add work C:\path\to\oauth-client.json
npm.cmd run mailbox -- listEach add command opens Google sign-in. Choose the account that should own that alias.
Remove locally stored credentials with:
npm.cmd run mailbox -- remove workThis removes the local encrypted token. You can separately revoke the app from the Google Account security page if desired.
Use in chat
Search @personal and @work for invoices from the last 90 days.Search @finance for unread mail with attachments.Search all mailboxes for subject:renewal newer_than:1y.
The plugin returns each message with its source alias, so identical messages remain attributable to the correct mailbox.
Public release work remaining
Before non-developers can use Connect @alias without Google Cloud setup, the project owner must:
Finish the Google OAuth consent-screen configuration.
Create and publish the installed-app OAuth client identity.
Test the end-to-end Codex connection flow with multiple accounts.
Submit the restricted Gmail read-only scope for Google's public-app verification.
During review, Google may show an unverified-app warning and enforce its unverified-user cap. The source code and bring-your-own-client path remain usable.
This is an independent community project and is not affiliated with or endorsed by Google or OpenAI.
See Privacy, Security, and the Google verification package.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityBmaintenanceConnects AI assistants to multiple Gmail accounts simultaneously, enabling search, read, draft, send, and reply operations with per-account permission controls.54
- AlicenseNot gradedqualityCmaintenanceEnables searching and summarizing emails across multiple Gmail accounts simultaneously through Claude.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables read and compose access to three Gmail accounts simultaneously, with tools for searching, viewing threads and messages, and drafting or sending replies.
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to access multiple Gmail/Google Workspace accounts for searching and reading mail, calendars, and attachments.
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Email OS for agents - real-inbox search, triage, commitments, and a verifiable BEC hard-stop.
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pkforge/multi-mailbox-gmail'
If you have feedback or need assistance with the MCP directory API, please join our Discord server