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 MCPshow my unread emails from this week"
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 (personal account) on Cloudflare Workers
A remote MCP server that gives an MCP client (Claude, etc.) access to a personal Outlook.com mailbox and calendar through Microsoft Graph.
MCP client ──OAuth 2.1 + DCR──▶ this Worker ──OAuth (PKCE, confidential)──▶ Microsoft (consumers)
◀──Bearer token──── /mcp ──Graph API──▶ graph.microsoft.comThe Worker is its own OAuth authorization server (
@cloudflare/workers-oauth-provider), so MCP clients register dynamically and get tokens issued by you, not Microsoft.Microsoft tokens live only inside the grant's
props, which the provider encrypts in KV.Our access-token TTL tracks Microsoft's; when the client refreshes,
tokenExchangeCallbackrefreshes the upstream Microsoft token too (Microsoft rotates refresh tokens, so the new one is kept).An approval page is shown on every authorization (defends against a rogue registered client piggy-backing on your Microsoft session), and only accounts in
ALLOWED_EMAILScan complete sign-in.Clients may only redirect to an exact URI in
ALLOWED_REDIRECT_URIS(Claude's callbacks by default). Registration is open to anyone, so without this a phishing link could get your approval sent to an attacker's server. Addhttp://localhost:6274/oauth/callbackwhile using the Inspector, and take it out again afterwards.MCP transport: stateless Streamable HTTP via
createMcpHandlerfromagents/mcp/server(MCP SDK v2). No Durable Objects needed.
Tools
Tool | What it does |
| Signed-in account |
| Mail folders with counts |
| Recent messages in a folder (optionally unread only) |
| KQL full-text search across mail |
| Full message as plain text |
| Mark read/unread, flag/unflag |
| Move to a folder (archive, deleteditems, …) |
| Save a new draft |
| Send a new email |
| Reply / reply-all, as draft or sent |
| Calendar view between two times (recurrences expanded) |
| Create an event (invites attendees) |
| Delete an event |
Related MCP server: outlook-mcp
Setup
1. Register the app in Entra ID
Azure portal → Microsoft Entra ID → App registrations → New registration
Supported account types: Personal Microsoft accounts only (or "Any Entra ID tenant + personal accounts" — both work with the
/consumersauthority used here).Redirect URI: platform Web,
https://outlook-mcp.<your-subdomain>.workers.dev/callback(addhttp://localhost:8787/callbacktoo for local dev).Certificates & secrets → New client secret. Copy the value.
API permissions → Microsoft Graph → Delegated:
User.Read,Mail.ReadWrite,Mail.Send,Calendars.ReadWrite,offline_access,openid,profile,email. (No admin consent needed — you consent on first sign-in.)
Copy the Application (client) ID from the Overview page.
2. Configure the Worker
npm install
npx wrangler kv namespace create OAUTH_KV # paste the id into wrangler.jsoncEdit wrangler.jsonc vars: PUBLIC_URL, MS_CLIENT_ID, ALLOWED_EMAILS, TIMEZONE. Then:
npx wrangler secret put MS_CLIENT_SECRET
npx wrangler types --strict-vars=false # regenerate Env types after config changes
npm run deploy3. Connect
Claude app / claude.ai: Settings → Connectors → Add custom connector →
https://outlook-mcp.<your-subdomain>.workers.dev/mcpInspector:
npx @modelcontextprotocol/inspector→ Streamable HTTP → same URL.
You'll see the approval page, then Microsoft sign-in/consent, then you're connected.
Local dev
cp .dev.vars.example .dev.vars # put the client secret in it
npm run dev -- --var PUBLIC_URL:http://localhost:8787Notes / limits
ALLOWED_EMAILSis compared with Graph'smail(falling back touserPrincipalName) for the signed-in user. Use the address shown byGET /meif your account has aliases.Microsoft consumer refresh tokens expire after ~90 days of inactivity; our grant TTL matches (
refreshTokenTTL). After that, just reconnect.To revoke everything: delete the grant in KV (or rotate the client secret / remove app consent at https://account.live.com/consent/Manage).
Attachments aren't exposed yet —
GET /me/messages/{id}/attachmentsis the natural next tool.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Manage authorized OlaMail inboxes, messages, and email drafts through secure OAuth MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables to manage your Outlook mailbox via Microsoft Graph (write access) with delegated permissions, providing MCP tools to create, modify, and send emails, folders, categories, rules, and automatic replies.-
- AlicenseNot gradedqualityDmaintenanceMCP server providing full control over Outlook.com, Hotmail, Live, or Microsoft 365 email via Microsoft Graph API, enabling reading, searching, sending, and managing messages and folders securely.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables personal Outlook/Hotmail/Live account email management through Microsoft Graph, letting users list, search, read, and delete emails (with confirmation) via MCP.ISC
- FlicenseAqualityCmaintenanceLets MCP clients read and search mail, manage calendars and events, and check availability for personal Microsoft accounts, with per-account delegated authentication and human approval for sensitive writes.22-