Codex and IMAP/SMTP: connect any mailbox to Codex
Codex reaches Gmail on its own through its Gmail plugin. For GMX, Yahoo or your web host, Andock connects the mailbox: enter your email address and email password on andock.app, then add https://mcp.andock.app/mcp in Codex under "Settings" › "MCP servers" and sign in. That needs ChatGPT Plus or higher. Andock is free.
Codex is OpenAI's coding agent. It runs in the ChatGPT desktop app, in the Codex CLI and in the IDE extension, and all three read the same list of servers. Codex has a plugin for Gmail. A mailbox at a web host, at an internet provider or at GMX, WEB.DE, Yahoo or Bluewin has none. Andock connects your mailbox to your AI assistant, even when the assistant can't reach it on its own. Codex can then look up a mail while you work and save replies as drafts.
Where things stand: on 8 November 2026, signing in to Andock from Codex worked. A full question and answer in Codex is not confirmed yet. The steps below are the ones OpenAI documents for any server that has a web address, and Andock is such a server.
Steps
- Create a free account at andock.app.
- Enter your email address. Andock knows the settings of many providers and walks you through what yours needs, such as a switch or an app password. Then enter your email password. Andock tries the login at once.
- In the ChatGPT desktop app, open "Settings", then select "MCP servers" and "Add server".
- Name the server "Andock", choose "Streamable HTTP" and enter https://mcp.andock.app/mcp as the URL. Save, then select "Restart".
- Select "Authenticate" next to Andock in the server list and sign in with your Andock account on andock.app.
- Working in the terminal instead? Run "codex mcp add andock --url https://mcp.andock.app/mcp", then "codex mcp login andock". In the IDE extension, the same "MCP servers" list is under the gear menu.
- Type "/mcp" to see that Andock is connected, then ask: "Which mails from today still need an answer from me?"
Common errors
- Codex has no "MCP servers" section, or your plan offers no way to add a server.
- OpenAI's Codex plan table lists servers for Plus, Pro, Business, Enterprise and Edu and for API keys, but not for Free or Go. On those plans, use Andock in Claude instead, where Claude Free allows one custom connector.
- Andock shows up in the list, but Codex can't use its tools.
- Codex can add a server before you have signed in. Select "Authenticate" next to Andock, or run "codex mcp login andock" in the terminal, then restart Codex.
- You work on a machine without a browser, for example over SSH.
- Run "codex mcp login andock --no-browser". Open the link it prints in a browser on another device and sign in to Andock. Paste the full address you land on back into the terminal, even if that page doesn't load.
- Andock works in Codex, but ChatGPT on the web doesn't know it.
- ChatGPT on the web doesn't read the Codex server list. There, Andock is added under "Plugins", which needs ChatGPT Business, Enterprise or Edu. The steps are in ChatGPT and IMAP/SMTP.
- Your provider rejects the password even though it is right.
- GMX and WEB.DE only let mail apps in after you turn on IMAP access in the mailbox settings. Yahoo and iCloud Mail need an app password instead of your normal password. Then connect the mailbox again in your Andock dashboard.
What you can ask
Which mails from today still need an answer from me?
Find the mail where Lena confirmed the release date.
Draft a reply to the client: the fix ships on Thursday.
Questions
- Does Andock cost anything?
- No. Andock is free and needs no card. Codex itself needs a ChatGPT plan that includes servers in Codex: according to OpenAI, Plus, Pro, Business, Enterprise or Edu.
- Which mailboxes does Codex reach without Andock?
- As of 19 November 2026, OpenAI's plugin docs name a Gmail plugin for Codex in the ChatGPT desktop app and in the CLI. The IDE extension has no plugins. For Gmail, use that plugin and you don't need Andock. The Codex docs name no plugin for Outlook or other mail providers.
- Is there an IMAP connector for Codex?
- Yes, Andock works as one in Codex. Andock opens your mailbox over IMAP on port 993 to read and sends over SMTP on port 465, or with STARTTLS on 143 and 587. A mailbox that only offers POP3 can't be connected. Mail at web hosts like Hostpoint or IONOS and at GMX or WEB.DE works.
- Does Andock already work in Codex?
- Partly confirmed. On 8 November 2026, signing in to Andock from Codex worked. A full question and answer in Codex is not confirmed yet. In Claude, Andock is confirmed end to end. If a step looks different for you, the Help page shows how to reach Andock.
- Do the Codex app, the CLI and the IDE extension each need their own setup?
- No. According to OpenAI's Codex docs on servers, as of 19 November 2026 the ChatGPT desktop app, the Codex CLI and the IDE extension share one configuration in the file ~/.codex/config.toml. Add Andock once, and the other two see it as well.
- Can Codex see my calendar and contacts too?
- Yes, if your provider has a calendar or an address book. In the Andock dashboard you add them after your mailbox, also from a different provider than your mail, for example iCloud. Codex can then look up appointments, free times and contacts. Andock reads your calendar and contacts, and adds appointments when you ask.
- Can Codex send mail without asking me?
- No. With Andock, Codex saves replies as drafts in your Drafts folder first. Nothing is sent until you approve it in Andock. In Codex you can also set the Andock server to ask you before any tool that changes something, with default_tools_approval_mode = "writes" in the config file.