How to Connect Codex to Outlook, Calendar, Teams and Files on Windows
In short: Give Codex tools for classic Outlook (email, calendar and contacts), Microsoft Teams and the files on your PC through LMCP, a local MCP server for Windows. No Microsoft Graph app to register and no API keys.
Codex can read and answer your Outlook email on Windows once LMCP is installed. LMCP is a local MCP server for Windows: it talks to classic desktop Outlook on your PC, so Codex can search and read your mail, reply, send and file messages, check your calendar and look up contacts. With a work or school Microsoft 365 account it also reads and sends Teams messages, and it works with the files on your PC. No Graph API app to register and no API keys.
What Codex Can Do on Your PC
- Outlook email: list, search and read messages, reply, reply-all, forward and send, move messages, create folders and flag for follow-up (
outlook_list_emails,outlook_search_emails,outlook_read_email,outlook_reply_email,outlook_send_email,outlook_move_email) - Outlook calendar: list your calendars and events, create and delete events (
outlook_calendar_list_events,outlook_calendar_create_event) - Outlook contacts: list and search contacts (
outlook_contacts_list,outlook_contacts_search) - Teams: list chats and read them, read channels, search messages, check call history and send messages (
teams_list_chats,teams_read_chat_messages,teams_search_messages,teams_send_message) - Files: list, read, search and write files on your PC, the synced OneDrive folder included (
file_list,file_read,file_search,file_write)
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
- A Windows PC with Codex
- Classic desktop Outlook with a mail profile, opened at least once. The new Outlook app does not expose the interface LMCP uses
- For Teams: a work or school Microsoft 365 account
- LMCP, downloaded from local-mcp.com
Connect Codex to LMCP
1. Install LMCP
Download LMCP for Windows and run LMCP-Setup.exe; no admin rights needed. LMCP starts on its own, shows its icon in the system tray, and the installer configures your AI clients, Codex included. Quit Codex and open it again so it loads LMCP.
Or: the LMCP plugin for Codex
If Codex does not show LMCP, 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 does not replace the LMCP app: install it first, because the tools run there. More on the LMCP plugin for Codex.
2. Connect Teams (optional)
Ask Codex to run connect_m365_account and sign in with the code it shows you. The Teams desktop app does not need to be running.
Try It Out
Open a new Codex session and ask:
Show me my unread emails in Outlook and flag the urgent ones.
Find the email where the client described this bug and summarize the thread before you touch the code.
What meetings do I have tomorrow? Tell me when I have two hours without meetings.
Summarize what I missed in Teams this morning.
Troubleshooting
Codex does not list any LMCP tools
Quit Codex completely and reopen it. If the tools are still missing, install the plugin with the two commands above.
Outlook is installed but Codex cannot reach it
Use classic desktop Outlook: the new Outlook app does not register the COM interface LMCP uses. Open classic Outlook once so the mail profile exists, then ask Codex to run outlook_diagnose.
Teams channel messages fail
Reading channel messages can require an administrator of your organization to approve a permission; when that is the case, the answer says so.
Frequently Asked Questions
Does this work with the new Outlook app?
No. The new Outlook app does not expose the COM interface LMCP uses. You need classic desktop Outlook with a mail profile, opened at least once.
Does this work with a personal Outlook.com or Hotmail account?
Yes, when the account is set up in classic desktop Outlook: LMCP works with every account configured there, personal or work.
Can Codex read my Teams messages?
Yes, with a work or school Microsoft 365 account. Ask Codex to run connect_m365_account and sign in with the code it shows you. Personal Microsoft accounts do not have Teams. The sign-in asks only for permissions that do not require an administrator, except reading channel messages (ChannelMessage.Read.All); if your organization has turned off user consent, every permission needs an administrator.
Does my email go through LMCP’s servers?
No. Codex starts LMCP on your PC and talks to it directly, without the cloud relay. 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 reaches your PC through the Cloud Relay: follow Connect ChatGPT to Outlook on Windows. This page is for Codex, which runs LMCP locally.
Related Guides
Comments
Questions and experiences welcome — comments are reviewed before they appear.