outlook-mcp
outlook-mcp
Let Cursor, Claude Desktop, or OpenCode read and send your Outlook mail — locally on Windows.
This is a small MCP server. It talks to the Outlook app already on your PC (COM/MAPI).
It does not use Microsoft Graph, Azure, or cloud APIs.
Windows + Outlook Desktop only. macOS/Linux are not supported.
What you get
After setup, your AI can:
list mailboxes and folders
summarize the inbox (unread + recent)
search, open, reply, forward, and send mail
mark, move, delete messages
save attachments to disk
Typical flow the model should use:
list_mailboxes— see accountsinbox_summary— quick overviewget_mail/search_mail— detailsreply_mailorsend_mail— act
Requirements
Need | Notes |
Windows | Required |
Outlook Desktop | Signed in with your mailbox |
Node.js 18+ |
Outlook may show a security prompt the first time another app accesses mail — allow it.
Install
git clone https://github.com/YOUR_USER/outlook-mcp.git
cd outlook-mcp
npm install
npm run buildOptional: set a default mailbox (otherwise Outlook’s default account is used):
$env:OUTLOOK_MAILBOX = "you@example.com"Quick check (Outlook only, no AI)
powershell -NoProfile -STA -ExecutionPolicy Bypass `
-File .\powershell\Invoke-Outlook.ps1 `
-Action list_mailboxesIf you see JSON with "ok": true and your accounts, the bridge works.
Connect an AI client
Build the project (
npm run build).Copy an example from
examples/.Replace
C:\\ABS\\PATH\\TO\\outlook-mcpwith your real folder path.Restart the client.
Use the full path to node.exe and dist\\server.js (recommended on Windows).
Cursor
Settings → MCP, or project file .cursor/mcp.json — see examples/cursor.mcp.json.
Claude Desktop
Edit claude_desktop_config.json:
Often:
%APPDATA%\Claude\claude_desktop_config.jsonMSIX/Store installs may instead use:
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json
Template: examples/claude_desktop_config.json.
Fully quit Claude Desktop (tray icon too), then start it again.
OpenCode CLI
Project or global opencode.json — see examples/opencode.json.
opencode mcp listYou want outlook-mcp = connected.
Tools (cheat sheet)
Tool | When to use it |
| First call — which accounts exist? |
| Where can mail go? |
| Fast unread + recent overview |
| List messages with filters |
| Find by text / from / to / subject / date |
| Full body of one message ( |
| Same thread |
| New email |
| Save without sending |
| Reply (optional |
| Forward |
| Read / unread / categories |
| Move to a folder |
| Delete |
| Write attachments to a folder |
| Debug: which bridge actions are loaded |
How it works
AI client → outlook-mcp (Node, stdio) → PowerShell → Outlook COM/MAPI → mailboxNothing is sent to Azure for mail access. The AI host only starts this local process.
Project layout
src/ Node MCP server
mcp/tools.ts ← add new MCP tools here
powershell/
Invoke-Outlook.ps1 loader + shared helpers
lib/*.ps1 ← add new Outlook actions here
examples/ client config templatesAdd your own feature
Create e.g.
powershell/lib/60-myfeature.ps1and register an action.Add a matching tool in
src/mcp/tools.ts.Run
npm run build.
Details: CONTRIBUTING.md.
Troubleshooting
Problem | What to try |
Bridge JSON error / Outlook COM unavailable | Start Outlook once, sign in, retry |
Wrong mailbox | Set |
Claude MCP not loading | Edit the MSIX config path above; restart completely |
| Use |
Tools timeout | Increase client timeout (OpenCode example uses |
Empty inbox results | Confirm the account appears in |
Security
Local stdio only — do not publish this as an open network server without auth.
send_mail,delete_mail, andsave_attachmentshave real side effects.Prefer drafts (
create_draft, orsend: falseon reply/forward) while testing.
More: SECURITY.md.
License
MIT — see LICENSE.