Connect ChatGPT to Your Email: Yahoo, iCloud, Outlook, IMAP
Step by step: connect Gmail, Outlook, iCloud, Fastmail or any IMAP inbox to ChatGPT with a custom MCP connector, and to OpenAI Codex with a scoped key. No email stored.
ChatGPT cannot reach a mailbox on its own. It needs an MCP server in front of your email, and MCPEmails is that server: connect an inbox once, point ChatGPT at a single URL, and it gets the same email tools whether the mail lives in Gmail, Outlook or Microsoft 365, iCloud, Fastmail, Yahoo, Zoho or a self-hosted IMAP server.
Two OpenAI surfaces are involved, and they authenticate differently. ChatGPT runs an OAuth flow in the browser, so there is no API key to paste. OpenAI Codex runs in your terminal and uses a scoped bearer key instead. Same endpoint, same tools.
Jump to: ChatGPT setup · OpenAI Codex · Troubleshooting
What you need
- ChatGPT Go or a paid plan, on the web. OpenAI lets Go and paid plans add custom MCP servers on chatgpt.com. You cannot add one in the mobile app. On Business and Enterprise, an admin or owner may need to add it for the workspace.
- A free MCPEmails account. Create one here. The free plan holds one connected inbox and needs no card.
- One mailbox. Gmail, Outlook or Microsoft 365, iCloud, Fastmail, Yahoo, Zoho, Yandex, or anything that speaks IMAP and SMTP.
If your ChatGPT plan cannot add a custom MCP server, the same inbox and URL already work in Claude, Cursor, VS Code and the other supported clients.
Step 1: Connect your inbox to MCPEmails
In the MCPEmails dashboard, open Inboxes, then Connect Inbox, then pick your provider.
Gmail and Google Workspace
Gmail connects with a Google app password over IMAP. Turn on 2-Step Verification, create the app password at myaccount.google.com/apppasswords, and paste the 16 letters in with your full Gmail address; your normal Google password will not work. A Google Workspace admin can switch app passwords off for the domain, so ask them if the option is missing. The Gmail walkthrough has the steps.
iCloud, Fastmail, Yahoo and Zoho
These want an app-specific password, not the password you type on the web. Create one at the provider, pick the provider in MCPEmails, and paste it in. The iCloud, Fastmail and IMAP guide has the exact steps.
Outlook and Microsoft 365
Outlook connects with Sign in with Microsoft, not an app password: choose Outlook, click Connect with Microsoft, and approve. Personal Outlook.com, Hotmail, Live and MSN accounts connect straight away. Work or school Microsoft 365 accounts may need an IT admin to approve the app once for the whole organisation first; the dashboard gives you a link to send them. The Outlook and Microsoft 365 guide has the details.
Any other IMAP mailbox
Choose IMAP and enter the address and app password. Common settings are detected automatically; a custom domain may need the host, port and security mode from your provider. The provider matrix lists what each one supports, and there is a page per provider under connect, including Gmail, Outlook, Microsoft 365, iCloud and generic IMAP.
Connect more than one mailbox if your plan allows it. ChatGPT discovers them with inbox_list, so you never paste a mailbox id into a prompt.
Step 2: Add the connector in ChatGPT
- On chatgpt.com, open Plugins, then Personal, and click Add at the top right.
- Choose Add custom MCP server and name it MCPEmails.
- Under Connection, paste this URL:
https://mcpemails.com/api/mcp
- Choose OAuth, tick I understand and want to continue, and click Create as a plugin.
- Sign in with MCPEmails and approve.
- In a chat, type @ and pick MCPEmails. The pick applies to that message, so @mention MCPEmails again when a follow-up needs your email.
Pick OAuth, not "no authentication". This server refuses anonymous calls, so a connector created without authentication looks fine at setup and then fails on its first tool call, which is the confusing way round. With OAuth, ChatGPT registers itself and completes an authorization code flow with PKCE: no client id to create, no client secret anywhere. OpenAI moves these menus from time to time, so check the ChatGPT setup page for the current path.
Step 3: Approve only the scopes you need
The consent screen is ours, not OpenAI's. The first consent starts at read:email, which is enough for triage, summarizing and finding things, and takes every irreversible action off the table while you decide how far to go. The other scopes are send:email, search:email and manage:automations.
Granting too little is recoverable: a call that needs a scope your token lacks comes back as a 403 with an insufficient-scope error, so the client can re-consent for that scope and retry. An inbox owner can also require human approval in the dashboard, which holds every send, reply, forward, draft send and scheduled send until a person releases it.
Step 4: Give ChatGPT a safe first task
Start read-only:
Summarize my three newest unread emails and flag anything that needs a reply today. Do not send, move or delete anything.
ChatGPT finds the inbox first, then reads only the messages it needs. Once that works, try:
- "Find the invoice from Stripe from last month and tell me the amount."
- "Draft a reply to the latest message from Alex, but leave it as a draft."
- "Show me newsletters from this week I could archive, and wait for my confirmation."
For repeatable routines, start from the inbox triage playbook or the workflow prompt collection.
What ChatGPT can do once it is connected
MCPEmails hands ChatGPT focused tools rather than a password or a raw IMAP socket:
- Read and search:
email_readcovers list, read, read_batch, search and attachment. Search uses structured fields such as sender, subject, date and unread state, and Gmail labels show up as folders. - Send, reply and forward:
email_composesends through your own provider and address. - Organize:
email_organize,email_search_and_moveandemail_delete. - Drafts, folders and scheduling:
draft,draft_list,folder,folder_list,scheduleandschedule_list. - The rest:
contact_search,signature_get,signature_set, plusautomationandautomation_readfor recurring rules.
One limit to plan around: MCPEmails is poll-based. There are no webhooks and no server-initiated events, so ChatGPT checks for new mail when you ask it to rather than the moment a message lands.
OpenAI Codex in the terminal
Codex is a different surface from ChatGPT connectors, and the browser OAuth flow is not the path there. A terminal client authenticates with a bearer token instead:
- In the dashboard, open API Keys and create a key, ticking only the scopes this agent needs.
- Copy it immediately. The key looks like
mcpe_followed by 64 hex characters and is shown once. - Register
https://mcpemails.com/api/mcpas a streamable HTTP MCP server in Codex's own MCP configuration, passing the key as anAuthorization: Bearerheader.
Key and OAuth connections hit the same endpoint and see the same tool catalogue. The only difference is where the token came from. To sanity-check the endpoint first, the raw HTTP guide has a one-line tools/list call, and OAuth vs API keys explains when each path is right.
Scope the key tightly. Read-only is usually correct for a coding agent: one that can summarize a support thread is useful, one that can send mail unattended is a different risk category.
Troubleshooting
- No option to add a custom MCP server. Custom MCP servers are added on chatgpt.com in a browser, not in the mobile app, and need Go or a paid plan. On a Business or Enterprise workspace, an admin or owner may need to add it.
- The connector fails on its first tool call. It was probably created with no authentication. Delete it and recreate it with OAuth.
- The connector is created, but ChatGPT answers without touching your mail. MCPEmails was not picked for that message. Type @, pick MCPEmails, and ask again.
- The provider rejects your password. Use a provider-generated app password, not your web sign-in password. Some providers only issue one once two-factor authentication is on.
- A custom IMAP connection times out. Confirm the host, port and TLS mode. Port 993 normally uses implicit TLS; port 143 normally uses STARTTLS.
- ChatGPT connects but sees no mail. Check the inbox is active in the dashboard, confirm the connection holds
read:email, and ask ChatGPT to callinbox_listfirst.
FAQ
Can ChatGPT read and send my email? Through a custom MCP connector, yes: reading, searching, sending, replying, forwarding, organizing and scheduling, all limited to the scopes you approve at setup.
Do I need an API key for ChatGPT? No. Choose OAuth and ChatGPT registers itself and completes the flow. API keys are for clients that cannot run a browser flow, such as Codex and scripts.
Is Codex set up the same way? No. Codex is a terminal surface, so it uses a scoped API key on an Authorization: Bearer header instead of the browser OAuth flow. Same endpoint, same tools.
Is my email stored on your servers? No. Every message is fetched live from your provider for the request that asked for it, then discarded. Only the encrypted provider credential is retained. Why never storing email matters explains the reasoning.
What does it cost? Free covers one connected inbox and 150 billable email actions per UTC calendar month, with the first 3 days uncounted. That monthly allowance applies to workspaces created on or after 2026-09-13; workspaces created earlier are exempt. Paid plans add inboxes and unlimited email actions: see pricing.
Next step
Start free, connect an inbox, add https://mcpemails.com/api/mcp to ChatGPT, and ask it to summarize your unread mail. The ChatGPT setup page has the current click path; the documentation has the full tool reference.