msoutlook-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
msoutlook-mcp
An MCP server for classic Outlook on Windows through COM, with polling-based MCP Events. TypeScript on Bun, shipped as one executable.
It is a port of Astral0/outlook-com-mcp (Python, MIT). The tool inventory, the write-guardrail model and the documented Outlook gotchas follow that project. It drives the already-authenticated Outlook desktop client, so it needs no app registration and no Microsoft Graph permissions.
Status: v0.1.1 released, awaiting Windows verification. The COM bridge, CLI/daemon, lifecycle, all 27 tools and
new_mailare implemented. Real Outlook, Task Scheduler and OpenCode behaviour still need the manual Windows checklist; see the tracking issue.
Idea
Same safety model as the original: drafts first, recipient allowlist re-checked at send time, sending off by default.
Events: a
new_mailevent by polling the Inbox, so an agent can wake when mail arrives. Thin payload, no body, persisted cursor.One executable:
setup,doctor,install,uninstall,upgrade,serve,config,version.A local daemon, not stdio: loopback HTTP with a bearer token, so the poller keeps running between client sessions.
No addon: a persistent PowerShell process owns the COM objects. A stuck call is killed and replaced.
Related MCP server: outlook-mcp
Requirements
Windows 10 or 11
Outlook Classic (the new Outlook has no COM surface)
No Node, Python or Bun runtime for the released executable
Minimize Outlook; don't close it. Closing Outlook stops the connection. The daemon reconnects when Outlook is back, but tools fail while it is gone. To keep Outlook out of the way, right-click its notification-area icon and enable Hide When Minimized.
Install
mise
mise use -g github:t128n/msoutlook-mcp@0.1.1
msoutlook-mcp setupmise install github:t128n/msoutlook-mcp installs the latest release. The
Windows x64 asset is the supported build; the macOS and Linux assets are
development builds.
Direct download
Download msoutlook-mcp-x86_64-pc-windows-msvc.zip from the
releases page and run
msoutlook-mcp.exe.
First run
Run
msoutlook-mcp setup. It asks for the port (default 28471), the recipient allowlist and the send switch, writes the config and token, and prints an MCP client entry. For scripts, pass the port with--port <n>; if it is busy, setup picks the next free port.Run
msoutlook-mcp install. No admin rights; it copies the exe to%LOCALAPPDATA%\msoutlook-mcp\binand registers a Task Scheduler logon task.Run
msoutlook-mcp doctorif anything does not work. Every line says what to fix.
Start Outlook, sign in, and minimize it. The daemon waits for Outlook and reconnects on its own.
Let your agent set it up
Paste this into OpenCode (or another coding agent) on the Windows machine:
Set up
msoutlook-mcpfor OpenCode on this Windows machine with classic Outlook, not the new Outlook.
Install the latest release with
mise use -g github:t128n/msoutlook-mcp(or downloadmsoutlook-mcp-x86_64-pc-windows-msvc.zipfrom https://github.com/t128n/msoutlook-mcp/releases). Confirmmsoutlook-mcp version.Ask me for my recipient allowlist (recommended: my own domain), whether to allow sending (default no), and whether to start Outlook minimized at log on (recommended yes). Do not enable sending unless I explicitly say yes.
Run
msoutlook-mcp setup --non-interactive --port 28471 --allow "<list>"with--allow-sendonly if I agreed, and--outlook-logonor--no-outlook-logonper my answer. If 28471 is busy, setup picks the next free port and prints it. Then runmsoutlook-mcp installandmsoutlook-mcp doctor.Add a remote MCP server named
outlookto my global OpenCode config using the V2mcp.serversshape: URLhttp://127.0.0.1:28471/mcp,"oauth": false,"protocol": "auto", and the headerAuthorization: Bearer <token>. Read the token from%LOCALAPPDATA%\msoutlook-mcp\token. Prefer settingMSOUTLOOK_MCP_TOKENin my user environment and referencing{env:MSOUTLOOK_MCP_TOKEN}; keep the token out of any public repo.Run
opencode mcp list, confirmoutlookis connected, then callwhoamiandhealth_checkandlist_mailwithlimit: 3. Do not send mail, create drafts, or change Outlook data during setup.Tell me to minimize Outlook; do not close it. If a check fails, report the exact
doctorline and its fix.
The OpenCode config it should produce:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"outlook": {
"type": "remote",
"url": "http://127.0.0.1:28471/mcp",
"oauth": false,
"headers": {
"Authorization": "Bearer {env:MSOUTLOOK_MCP_TOKEN}"
},
"protocol": "auto"
}
}
}
}setup also prints a generic mcpServers snippet with the token. Use the
OpenCode shape above for OpenCode, or the printed snippet for a client that uses
mcpServers. The default port is 28471; setup picks the next free port if
that one is in use.
Tools
All 27 tools are available: read mail and calendar, health_check, whoami,
guardrails_status, attachments and free/busy; the guarded writes (drafts,
send_draft, reply_mail, moves, flags, event drafts/invites, meeting
responses); rules; and contacts. See docs/tools.md for the
inventory, arguments, guardrails and differences from the original.
Safety
Sending is off by default. Every state-changing call creates a draft or needs
confirm=true.The recipient allowlist is re-checked at send time, so a draft edited by hand cannot bypass it.
The daemon listens on
127.0.0.1only, requires a bearer token, and rejects a foreignHostorOrigin.Mail bodies, subjects and tokens are never logged.
Documentation
docs/cli.md: commands, files, config keys, Task Scheduler, endpoints.
docs/tools.md: the 27 tools, phases and argument differences.
docs/events.md:
new_mail, cursors, push streams and limits.docs/smoke.md: the manual smoke test against a real test mailbox.
docs/spike-com.md: why the PowerShell bridge, what was verified.
docs/windows-checklist.md: the manual test list for a real Windows machine.
docs/release.md: release assets, tagging and mise installs.
Development
bun install
bun test
bunx tsc --noEmit
bun run build:windows
# against a running daemon and a real test mailbox:
bun scripts/smoke.tsserve runs on macOS and Linux for development; install, uninstall and upgrade are Windows-only. Tests use a fake COM bridge, so no Outlook is needed.
License
MIT. See LICENSE and NOTICE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your own AI reads, searches and drafts in your mailbox, on your Windows computer.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Email, calendar and contacts for AI agents: Gmail, Microsoft 365 and IMAP accounts behind one API.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Microsoft Outlook emails, calendar events, contacts, and folders via COM automation.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read, send, and manage Outlook mail locally on Windows via COM/MAPI, without cloud APIs.1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to securely read, search, draft, and send Outlook emails, manage calendar events, and access mailbox folders through a local MAPI connection to Windows Outlook, with human-in-the-loop safeguards.91MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Desktop to read, draft, and send emails through legacy Outlook installations via Windows COM automation, using the locally configured Outlook profile without needing Microsoft Graph, OAuth, or server credentials.MIT