How to Connect Codex to Apple Mail, Calendar, Contacts and Reminders on Mac
In short: Give the Codex app, CLI or IDE extension tools for Mail.app, Calendar, Contacts and Reminders on your Mac through LMCP, a local MCP server. Works with Gmail, Outlook, iCloud and any IMAP account set up in Mail. No API keys.
Yes, Codex can read and answer your email on a Mac: install LMCP and Codex gets tools for Apple Mail, Calendar, Contacts and Reminders. LMCP is a local MCP server for macOS. It talks to Mail.app through native macOS APIs, so every account already set up there (iCloud, Gmail, Outlook, Exchange, any IMAP) is available to Codex, which can then summarize your inbox, search across accounts, draft replies, check your calendar and add reminders. No email API key and no OAuth into your mail provider.
What Codex Can Do on Your Mac
- Mail: list accounts and messages, search by sender, subject, date or content, read a thread, reply, send, move messages and save attachments (
list_email_accounts,list_emails,search_emails,read_email,reply_email,send_email,move_email,save_attachment) - Calendar: list events across your calendars, create, update and delete events (
list_calendar_events,create_calendar_event,update_calendar_event,delete_calendar_event) - Contacts: list and search your contacts and read a contact card (
list_contacts,search_contacts,get_contact) - Reminders: list reminders, create them and mark them done (
list_reminders,create_reminder,complete_reminder)
Preview and confirmation behavior depends on the tool, platform and AI client. Check the tool requirements and review the intended action before authorizing a real call.
What You Will Need
- macOS 13+ with Mail.app configured (at least one account)
- Codex: the desktop app, the CLI or the IDE extension
- LMCP, downloaded from local-mcp.com
Connect Codex to LMCP
1. Install LMCP
Download LMCP, open the LMCP-Installer.dmg and double-click LMCP Installer inside it. It installs LMCP and configures the AI clients it recognizes, Codex included. Quit Codex completely and open it again so it loads LMCP.
2. If Codex does not show LMCP: add it by hand
Add this block to ~/.codex/config.toml:
[mcp_servers.local-mcp]
command = "npx"
args = ["-y", "local-mcp@latest"]
[mcp_servers.local-mcp.env]
LMCP_ORIGIN = "manual"Keep the name local-mcp: it is the one LMCP’s own setup and uninstall look for, so a block under a different name would end up as a duplicate. Restart Codex afterward.
Or: the LMCP plugin for Codex
Run these two commands in a terminal, then restart Codex:
codex plugin marketplace add colibird-ai/local-mcp-releases
codex plugin add local-mcp@local-mcpThe plugin adds LMCP and skills for email, calendar and messages. It does not replace the LMCP app: install it first, because the tools run there. More on the LMCP plugin for Codex.
3. Allow access on your Mac
The first time Codex reads your mail, calendar, contacts or reminders, macOS asks whether LMCP may access them. Allow it. If you missed a prompt, turn LMCP on in System Settings > Privacy & Security: Automation (Mail), Calendars, Contacts and Reminders.
Try It Out
Open a new Codex session and ask:
Summarize my unread emails and flag the urgent ones.
Find the email where the client described this bug and summarize the thread before you touch the code.
What is on my calendar tomorrow? Tell me when I have two hours without meetings.
Look up Sarah’s email address in my contacts and remind me on Friday to send her the report.
Which Email Providers Work?
Any account configured in Mail.app: if you can see it in Mail.app, Codex can use it.
- Gmail, personal and Google Workspace
- Outlook.com / Hotmail and Microsoft Exchange / Office 365
- iCloud Mail
- Any IMAP provider: Fastmail, Yahoo, custom domains
Where Your Email Goes
Codex connects to LMCP over local stdio: LMCP runs as a process on your Mac and talks to Codex directly, not through LMCP’s cloud relay. What Codex reads still becomes part of the conversation with OpenAI’s model, under OpenAI’s terms. LMCP executes local tools on your device; local execution on its own does not establish GDPR or CCPA compliance.
Troubleshooting
Codex does not list any LMCP tools
Quit Codex completely and reopen it. If the tools are still missing, check that ~/.codex/config.toml has the [mcp_servers.local-mcp] block above, or install the plugin.
Codex does not show any emails
Confirm Mail.app has the account configured, and that LMCP has Automation access to Mail in System Settings > Privacy & Security > Automation.
Events or reminders are missing
Turn LMCP on in System Settings > Privacy & Security > Calendars (or Reminders), then ask again.
Frequently Asked Questions
Can Codex read my Apple Mail?
Yes, once LMCP is installed and added to Codex. LMCP is a local MCP server that reads Mail.app, so every account set up there (iCloud, Gmail, Outlook, Exchange or any IMAP account) is available to Codex, which can list, search, read, reply to and move your messages.
Does Codex need an API key or OAuth for my email?
No. LMCP uses the accounts already configured in Mail.app, so there is no Gmail API key and no OAuth screen for your mail provider. Codex itself still signs in to OpenAI the way it always does.
Is the Codex app different from the Codex CLI here?
No. The Codex CLI, desktop app and IDE extension all read the same ~/.codex/config.toml file, so LMCP is configured once and shows up in all three.
Does my email go through LMCP’s servers?
No. Codex connects to LMCP over local stdio, a direct process-to-process connection on your Mac, with no cloud relay in between. What Codex reads still goes to OpenAI’s model as part of the conversation, under OpenAI’s terms.
I use ChatGPT on the web, not Codex. Which guide do I follow?
ChatGPT on the web adds LMCP as an app through the Cloud Relay: follow Connect ChatGPT to Mail on Mac. This page is for the Codex app, CLI and IDE extension, which run LMCP locally.
Related Guides
Comments
Questions and experiences welcome — comments are reviewed before they appear.