MailBridge MCP
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., "@MailBridge MCPfind emails from John about the Q3 report"
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.
MailBridge MCP
MailBridge is a self-hosted ChatGPT App and MCP server for working with multiple
IMAP mailboxes from one conversation. It can search selectable folders, read
messages without setting \Seen, inspect threads and attachments, and expose
an optional, policy-gated Safe Send workflow.
This repository contains the software, not a hosted MailBridge service. It contains no mailbox credentials, operator data, shared OAuth tenant or public production endpoint. Each user or organization deploys and secures its own connector.
MailBridge is an independent open-source project by Gexiro Global Enterprises Ltd. It is not affiliated with, endorsed by or sponsored by OpenAI, Google, Microsoft or any email provider.
Capabilities
multiple user-scoped IMAP accounts, with metadata in SQLite and credential envelopes encrypted by a key stored outside the database;
TLS certificate and hostname verification, with no insecure fallback;
11 read-only tools for mailboxes, health, folders, recent mail, native IMAP search, cross-mailbox search, messages, threads and attachments;
IMAP
EXAMINEandBODY.PEEKfor non-mutating reads;attachment retrieval bounded to 25 MiB and treated as untrusted content;
an Apps SDK settings widget that never returns a stored password;
OAuth resource-server validation for remote deployments;
an optional 14-tool Safe Send layer with encrypted drafts, bounded outgoing attachments, idempotency, persistent rate limits, recipient-domain policy, explicit confirmation and independently gated Sent-copy receipts;
synthetic read-only and Safe Send demos that open neither IMAP nor SMTP.
Read tools never call STORE, APPEND, MOVE, COPY or EXPUNGE. SMTP tools
are not registered unless both the process-wide feature gate and the selected
mailbox policy enable them. The optional Sent-copy component is not an MCP tool:
after SMTP acceptance it can append only the exact accepted MIME bytes to the
server-discovered special-use \\Sent folder, after a read-only Message-ID
duplicate check and only for an explicit mailbox allowlist.
“Read-only” describes operations on mailbox messages and flags. Adding,
replacing, disabling or deleting an account intentionally changes the user's
connector configuration and requires the separate mail.settings.write scope.
Related MCP server: Outlook MCP Server
Choose a deployment path
1. Synthetic evaluation from a source checkout
Use this first. It requires no mailbox account and makes no external mail connection.
Requirements: Node.js 24 and npm 11.
npm ci --ignore-scripts
npm run check
npm run start:localIn a second terminal:
npm run smokeThe demo listens only on 127.0.0.1:3091 and is visibly marked synthetic.
2. Local connector from a source checkout
npm ci --ignore-scripts
npm run setup
npm run build
npm run doctor
npm startnpm run setup is idempotent. It creates a loopback-only development
configuration, independent application-key files and runtime/data without
printing key values or overwriting existing secrets. Review
config/mailboxes.yaml and require npm run doctor to report ready: true
before connecting an account.
This path is for local evaluation and private single-host use. Its
disabled_dev authentication mode must never be exposed to a network or run as
production. For ChatGPT Developer Mode, connect /mcp through a supported
private tunnel. See Connect to ChatGPT.
3. Production Docker deployment
Production is a separate, fail-closed path. It requires a stable HTTPS origin, an external OAuth 2.1 authorization server, an exact audience and subject allowlist, persistent private storage, mounted secrets and a reverse proxy.
Do not reuse the local mailboxes.yaml development configuration. Follow the
preflight and exact commands in Deployment. The production
template intentionally contains invalid placeholders and must not be considered
ready until the production doctor passes.
On the first production Compose start, the network-disabled one-shot
mailbridge-secret-init service copies the host's 0700/0600 secret files into
a private named volume as UID/GID 10001 with file mode 0400. The long-running
MailBridge container stays non-root and mounts that volume read-only. Do not make
host secrets world-readable to work around container permissions.
Add mailbox accounts
Open MailBridge in ChatGPT and use its settings widget to enter the mailbox label, email address, IMAP hostname, port, TLS mode, login and an app-specific password. The connector tests TLS and authentication before saving the encrypted credential. Stored passwords cannot be displayed; they can only be replaced or deleted with the mailbox account.
Provider account policy differs. Use only credentials authorized by the mailbox provider and deployment operator. Never use a normal Google account password. MailBridge does not claim support for every provider or every provider-specific OAuth onboarding flow.
Safe Send is opt-in
The default is read-only:
MAILBRIDGE_ALLOW_SEND=falseTo enable sending, an administrator must separately configure SMTP for a
mailbox, select a Safe Send policy and set MAILBRIDGE_ALLOW_SEND=true.
Draft-only mode requires preview, validation, a short-lived one-time confirmation
and the exact draft version. Direct send remains rejected unless that mailbox
explicitly uses direct_allowed. Outgoing attachments are encrypted with the
draft and limited to 10 files, 10 MiB each and 18 MiB total; executable file
extensions are rejected.
A copy in the mailbox's Sent folder is independently fail-closed. It requires
MAILBRIDGE_SAVE_SENT_COPY=true and the exact mailbox ID in
MAILBRIDGE_SENT_COPY_MAILBOX_IDS. The receipt distinguishes SMTP acceptance
from provider_saved, imap_appended, failed and disabled states; it never
claims recipient delivery or read status.
See Safe Send. Enabling Safe Send creates an external side effect: the operator remains responsible for recipients, content, authorization and provider limits.
Important boundaries
Secure MCP Tunnel provides private MCP connectivity; it is not a general browser-route proxy. The Settings API still needs a browser-reachable, CSP-allowed HTTPS origin for cross-device configuration.
The supported embedded state store is single-node SQLite. Horizontal replicas need a shared database and shared settings-session storage.
MailBridge is not an OAuth authorization server, hosted SaaS, email provider, backup product, compliance certification or guarantee against model error.
The Apache-2.0 source code is free to use under LICENSE. Hosting, domains, OAuth services, ChatGPT plans and mailbox-provider charges are not included and may cost money.
A self-hosted custom MCP connection is not the same as a reviewed listing in the ChatGPT app directory. This repository does not claim directory approval.
Documentation
Contributing and support
Start with synthetic data, follow CONTRIBUTING.md, and never post credentials or real mailbox content. Use GitHub private vulnerability reporting for security reports and GitHub Issues for reproducible non-security defects.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
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 Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
- PO6 MailboxOAuthcom.po6
Give AI agents secure access to your email via private aliases with dedicated mailbox storage.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to read, search, and manage emails via IMAP with secure, read-only access to email accounts.6-
- FlicenseNot gradedqualityDmaintenanceProvides programmatic access to Microsoft Outlook mailboxes, enabling AI assistants to search, analyze, and extract insights from emails in personal and shared mailboxes.-
- FlicenseNot gradedqualityCmaintenanceEnables AI clients to search IMAP mailboxes with live access and a full-text index covering email bodies and attachments (PDF, DOCX, XLSX, text).-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs and MCP clients to read, search, and manage Microsoft Outlook emails through a standardized interface.-
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/gexiro-global/mailbridge-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server