outlook-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@outlook-mcp Draft a reply to the latest email from Sarah about the meeting agenda."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
outlook-mcp
An MCP server that gives AI agents structured access to a Microsoft Outlook mailbox through the Microsoft Graph API — with one deliberate constraint at its core:
Agents read and draft. Only humans send.
There is no send tool in this server, and the OAuth token it holds does not include the Mail.Send scope. Even a fully compromised or badly prompted agent cannot send email through it — the capability doesn't exist at the token level. Everything outbound lands in your Drafts folder for human review.
I built this to power an autonomous operations pipeline: scheduled headless agent sessions sweep the mailbox twice a day, reconcile every open commitment and follow-up into a dashboard, and queue reply drafts for review. It runs identically under Claude Code and OpenAI Codex — one integration layer, two vendors' agents.
Permission model
Capability | Agent | Notes |
List/search/read mail | ✅ | Full mailbox visibility |
Organize (folders, move, batch triage) | ✅ | Reversible operations only |
Create drafts / reply drafts | ✅ | Lands in Drafts, never sent |
Send email | ❌ | No tool, and no |
Delete email | ❌ | Not implemented |
Auth is MSAL Authorization Code Flow with PKCE through a localhost-only callback. Tokens cache to ~/.outlook-mcp/ with 0600 permissions.
Related MCP server: mailpouch
Tools (10)
Tool | Purpose |
| Folder tree with counts |
| Create a mail folder |
| Page through a folder (subject, sender, preview, unread) |
| KQL search across all folders ( |
| Full message body (HTML converted to clean text), recipients, attachments list |
| Move messages between folders |
| Bulk triage in one call |
| New outbound draft |
| Reply/reply-all draft on an existing thread |
| Folder statistics (volume, unread, top senders) |
Setup
1. Register a (free) app in Entra ID
Microsoft Entra admin center → App registrations → New registration:
Supported account types: your tenant only, or multi-tenant + personal accounts (then use
OUTLOOK_MCP_TENANT_ID=common)Redirect URI: platform Mobile and desktop applications → add
http://localhost:3847/auth/callbackAuthentication → enable Allow public client flows
API permissions → Microsoft Graph → Delegated →
Mail.ReadWrite,MailboxSettings.Read
No client secret is needed (public client + PKCE).
2. Build and authenticate
npm install
npm run build
export OUTLOOK_MCP_CLIENT_ID=<your app client id>
export OUTLOOK_MCP_TENANT_ID=<your tenant id or "common">
npm run auth # opens browser once; token cache persists at ~/.outlook-mcp/3. Connect an agent
Claude Code — .mcp.json in your project (or claude mcp add):
{
"mcpServers": {
"outlook": {
"command": "node",
"args": ["/path/to/outlook-mcp/dist/index.js"],
"env": {
"OUTLOOK_MCP_CLIENT_ID": "<client id>",
"OUTLOOK_MCP_TENANT_ID": "<tenant id>"
}
}
}
}OpenAI Codex — ~/.codex/config.toml:
[mcp_servers.outlook]
command = "node"
args = ["/path/to/outlook-mcp/dist/index.js"]
env = { OUTLOOK_MCP_CLIENT_ID = "<client id>", OUTLOOK_MCP_TENANT_ID = "<tenant id>" }Same server, same tools, either agent. That portability is the point of MCP.
Architecture
┌─────────────┐ stdio ┌──────────────┐ HTTPS ┌─────────────────┐
│ Claude Code │◄──────────────►│ │◄─────────────►│ Microsoft Graph │
├─────────────┤ JSON-RPC │ outlook-mcp │ REST v1.0 │ /me/messages │
│ OpenAI Codex│◄──────────────►│ (Node/TS) │ │ /me/mailFolders│
└─────────────┘ └──────┬───────┘ └─────────────────┘
│
┌──────┴───────┐
│ MSAL + PKCE │ Mail.ReadWrite only —
│ token cache │ no Mail.Send on the token
└──────────────┘Transport: stdio (JSON-RPC), one process per agent session
Auth: MSAL Auth Code Flow + PKCE, localhost callback, silent refresh from disk cache
Bodies: HTML mail converted to clean plain text before it reaches the model (token efficiency)
Validation: every tool input validated with zod before any Graph call
Development
npm run dev # tsc --watch
npm run inspect # MCP Inspector against the built serverLicense
MIT © Don Fournier
Available Tools
10 toolsbatch_move_emailsA
Search for emails matching a query and move ALL matches to a target folder. Supports dry_run to preview before moving. Auto-creates target folder if it does not exist.
Inputs: search_query (required), target_folder (required), dry_run, max_emails.
create_draftA
Create a draft email saved in the Drafts folder. Does NOT send the email — user must review and send manually in Outlook.
Inputs: to (required), body (required), subject (required), cc, +1 more.
create_folderB
Create a new mail folder. Optionally specify a parent folder (defaults to root mailbox level).
Inputs: name (required), parent_folder.
create_reply_draftA
Create a reply draft to an existing email. Does NOT send — user must review and send in Outlook.
Inputs: body (required), email_id (required), cc, reply_all.
list_emailsA
List emails in a folder with pagination. Returns subject, sender, date, preview.
Inputs: page, folder, page_size, unread_only.
list_foldersA
List all mail folders with item counts and unread counts
Inputs: no named parameters.
move_emailsC
Move one or more emails to a target folder by email IDs.
Inputs: email_ids (required), target_folder (required).
read_emailA
Read the full content of an email by ID. Returns plain text body, sender, recipients, and attachment list.
Inputs: email_id (required).
search_emailsB
Search emails across all folders. Supports KQL syntax: from:john subject:invoice, or plain text search.
Inputs: query (required), page_size.
summarize_folderA
Get a summary of a mail folder: top senders, subject clusters, date range, read/unread stats.
Inputs: folder, max_scan.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource-action pair: folder listing/creation, email listing/searching/reading, moving (single/batch), drafting (new/reply), and summarization. The only near-overlap is list_emails vs. search_emails, but their scopes (folder-scoped listing vs. cross-folder search) are explicitly described and easily distinguished.
All tools follow a consistent snake_case verb_noun pattern such as list_folders, create_folder, search_emails, and read_email. The batch_move_emails and create_reply_draft names add modifiers but remain predictable and readable.
Ten tools is a well-scoped set for an email assistant: folder management, reading/searching, moving, drafting, and summarization. Every tool earns its place without excessive granularity.
Core mailbox workflows are covered: browse, search, read, move, batch-move, draft, reply-draft, and summarize. Minor gaps include no explicit delete/trash tool, no mark-read/unread operation, and no delete/rename folder, though moving to Deleted Items can partially substitute for deletion.
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email for AI agents: send, receive with a safety verdict, reply and approve, as MCP tools.
Email inboxes for AI agents: read, search, send, reply, calendar invites. Hosted MCP with OAuth.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn open-source MCP server that provides AI agents with secure access to read, search, and manage emails via Microsoft 365 and Gmail. It features security-first defaults like recipient allowlists and markdown content conversion to facilitate safe agent interaction with mailboxes.7Apache 2.0
- AlicenseAqualityBmaintenanceAn MCP server that gives AI agents permission-gated, audit-logged access to private email providers (Proton Mail via Bridge and plain IMAP), running locally with OAuth-based authentication and human-controlled escalation for destructive operations.6617MIT
- AlicenseAqualityDmaintenanceAn MCP server that gives Claude Code and Codex full control of a personal Outlook.com mailbox and calendar via the Microsoft Graph API, enabling mail, draft, folder, and calendar operations through natural language.312MIT

RadMail MCPofficial
AlicenseAqualityBmaintenanceAn MCP server that provides an email operating system for AI agents, enabling inbox triage and reply drafting while enforcing un-bypassable safety constraints on sensitive actions like money transfers and banking changes.1273 npmMIT