microsoft-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., "@microsoft-outlook-mcp show 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.
microsoft-outlook-mcp
MCP (Model Context Protocol) server exposing Microsoft 365 surfaces — Outlook email, calendar, and OneDrive — over Microsoft Graph. Supports both personal Microsoft accounts (consumer) and business/school (365) work accounts.
Transport: JSON-RPC 2.0 over stdio (streamable-HTTP can be added later)
Auth: MSAL public client; device code flow by default (headless), loopback redirect for local development
License: MIT — see LICENSE
Requirements
Python 3.12+
A public-client Microsoft app registration (no client secret) for each mode you intend to use
An account: personal Microsoft account, or a work/school account (business)
Related MCP server: Microsoft Graph MCP Server
Install
pip install -e . # runtime dependencies
pip install -e ".[dev]" # plus lint/test toolingStart the server:
microsoft-outlook-mcpConfiguration
One environment variable shape covers both auth modes.
Variable | Required | Default | Meaning |
| yes | — |
|
| in personal mode | — | app registration client id |
| in business mode | — | app registration client id |
| no |
| tenant id (business mode only) |
| no |
| token cache directory |
| no |
|
|
| no |
| loopback redirect port |
Scopes requested in both modes: Mail.ReadWrite, Calendars.ReadWrite,
Files.ReadWrite, offline_access.
Authentication
Both modes use the MSAL device code flow by default, which is friendly to headless sidecars:
Start the server and call the
authenticatetool.The device code message (URL + code) is printed to stderr.
On any device, open the URL, enter the code, sign in, and accept the consent prompt.
Tokens are persisted to a per-
(mode, client id)cache file with0600permissions underOUTLOOK_MCP_CACHE_DIR.
check-auth-status reports whether a cached silent token currently works.
authenticate with force: true deletes the cache and re-runs the flow.
Tools
Email (19): about, authenticate, check-auth-status, list-emails,
search-emails, read-email, send-email, draft-email, mark-as-read,
delete-email, list-folders, create-folder, move-emails, list-rules,
create-rule, edit-rule-sequence, list-attachments, read-attachment,
download-attachment.
Calendar (7): list-events, create-event, update-event, delete-event,
cancel-event, decline-event, check-availability.
OneDrive (8): onedrive-list, onedrive-search, onedrive-download,
onedrive-upload, onedrive-upload-large, onedrive-share,
onedrive-create-folder, onedrive-delete.
Security
Token and refresh tokens are stored on disk as JSON under
OUTLOOK_MCP_CACHE_DIRwith0600permissions. Restrict access to that directory accordingly; encrypted-at-rest caching is a follow-up.All token/credential diagnostics are written to stderr only. The MCP wire is stdout and is never polluted with secrets.
read-emailstrips HTML to visible text by default; raw HTML is only returned when explicitly requested.
Development
Gate for every commit (all must pass):
ruff check .
mypy src
pytestTests are unit tests against a mocked Graph client; no live credentials are used anywhere in the test suite.
Available Tools
19 toolsaboutAboutARead-only
Returns information about this M365 Assistant server.
Inputs: no named parameters. Returns: result
authenticateAuthenticateC
Authenticate with Microsoft Graph API to access Outlook data.
Inputs: force. Returns: result
check-auth-statusCheck auth statusARead-only
Check the current authentication status with Microsoft Graph API.
Inputs: no named parameters. Returns: result
create-folderCreate folderC
Creates a new mail folder
Inputs: name (required), parentFolder. Returns: result
create-ruleCreate ruleC
Creates a new inbox rule
Inputs: name (required), sequence, isEnabled, markAsRead, +4 more. Returns: result
delete-emailDelete emailA
Deletes an email by moving it to Deleted Items (trash). Use permanent=true to hard delete.
Inputs: id (required), permanent. Returns: result
download-attachmentDownload attachmentB
Downloads an email attachment to a local file
Inputs: id (required), outPath (required), attachmentId (required). Returns: result
draft-emailDraft emailB
Creates and saves an email draft in Outlook
Inputs: cc, to, bcc, body, +2 more. Returns: result
edit-rule-sequenceEdit rule sequenceC
Changes the execution order of an existing inbox rule
Inputs: ruleName (required), sequence (required). Returns: result
list-attachmentsList attachmentsBRead-only
Lists the attachments of a specific email
Inputs: id (required). Returns: result
list-emailsList emailsCRead-only
Lists recent emails from your inbox
Inputs: count, folder. Returns: result
list-foldersList foldersCRead-only
Lists mail folders in your Outlook account
Inputs: includeChildren, includeItemCounts. Returns: result
list-rulesList rulesBRead-only
Lists inbox rules in your Outlook account
Inputs: includeDetails. Returns: result
mark-as-readMark as readC
Marks an email as read or unread
Inputs: id (required), isRead. Returns: result
move-emailsMove emailsC
Moves emails from one folder to another
Inputs: emailIds (required), targetFolder (required), sourceFolder. Returns: result
read-attachmentRead attachmentARead-only
Reads an attachment from an email. Text content is returned as text; binary content is returned base64-encoded.
Inputs: id (required), attachmentId (required). Returns: result
read-emailRead emailARead-only
Reads the content of a specific email. HTML bodies are sanitized to visible text unless includeRawHtml is true.
Inputs: id (required), includeRawHtml. Returns: result
search-emailsSearch emailsCRead-only
Search for emails using various criteria
Inputs: query (required), to, from, count, +4 more. Returns: result
send-emailSend emailC
Composes and sends a new email. Supports plain text and HTML.
Inputs: to (required), body (required), subject (required), cc, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools target a distinct resource+action (read-email, send-email, draft-email, list-folders, create-folder, mark-as-read), so selection is usually clear. The one genuinely confusable pair is read-attachment vs download-attachment, which both retrieve the same attachment and differ only in output destination; list-attachments vs read-attachment is also close but separable.
There is a predictable kebab-case verb-noun convention (list-emails, create-rule, delete-email, move-emails) used consistently across the bulk of the surface. Minor deviations are 'about' (no verb/object) and 'authenticate'/'check-auth-status', which don't fit the verb-noun pattern but remain readable.
19 tools is on the high side, but the surface spans four sub-domains (auth, mail, folders, rules, attachments) and each tool maps to a real operation rather than a duplicate. A couple of tools (about, download-attachment) are marginal, but none feel gratuitous.
Core email lifecycle is covered: list/search/read/send/draft/delete/move, plus folders, rules, and attachments. However, reply and forward are missing (agents must compose a fresh email and lose threading), and the rules and folder surfaces are asymmetric — rules can be created and resequenced but not deleted or edited, and folders can be created but not renamed or deleted.
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Read email/chat conversations, messages, contacts and teams; draft, send and update threads.
Gmail, Outlook, Drive, OneDrive and calendars for AI agents. Many accounts, one endpoint, audit log.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Microsoft Graph API services including Outlook email, Calendar events, OneDrive files, and Contacts. Supports multiple Microsoft accounts with unified search across all services.-
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with Microsoft 365 services (users, mail, calendar, files) via Microsoft Graph API.27 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables multiple users to securely connect their own Microsoft 365 account and use natural language to manage Outlook mail, Teams, and SharePoint/OneDrive files through Microsoft Graph, with support for shared mailboxes and admin governance.MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Microsoft 365 and Office services through the Microsoft Graph API, including email, calendar, files, Teams, SharePoint, and more.MIT