outlook-mcp-server
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-server find emails from Amazon with invoices"
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-server
A lightweight Model Context Protocol (MCP) server for personal Microsoft Outlook / Hotmail accounts. It connects Claude (or any MCP-compatible AI) to your inbox via the Microsoft Graph API, using OAuth 2.0 device-code flow — no service account or admin consent required.
Tools
Tool | Parameters | Description |
|
| Search your inbox using KQL (Keyword Query Language). Supports filtering by sender, subject, date, attachment presence, and more. |
|
| Fetch the full body (plain text + HTML) and headers of a specific email. |
|
| List all attachments on an email, including their IDs, names, sizes, and content types. |
|
| Download an attachment and save it to a local file path. |
|
| Mark an email as read or unread. |
|
| Move an email to a folder by well-known name (e.g. |
These tools compose naturally for email-automation workflows — for example: search by sender → read body → download attachments → mark read → move to archive.
Related MCP server: Outlook Email MCP Server
Setup
1. Azure App Registration (one-time)
Personal Microsoft accounts still require an Azure App Registration to call Graph.
Go to https://portal.azure.com → Microsoft Entra ID → App registrations → New registration.
Name:
outlook-mcp-server(or anything).Supported account types: choose "Personal Microsoft accounts only".
Redirect URI: leave blank for now.
After creation, copy the Application (client) ID — this is your
OUTLOOK_MCP_CLIENT_ID.Open Authentication → enable "Allow public client flows" = Yes → Save.
Open API permissions → Add a permission → Microsoft Graph → Delegated permissions → check
Mail.ReadWrite→ Add. (No admin consent needed for personal accounts.)
2. Install
git clone https://github.com/dhtim135/outlook-mcp-server
cd outlook-mcp-server
uv sync3. Authenticate (one-time)
export OUTLOOK_MCP_CLIENT_ID="<your-client-id>"
uv run python login.pyFollow the device code prompt — visit the URL in any browser, enter the code, sign in
with your Hotmail/Outlook.com account, and approve the Mail.ReadWrite permission.
The token is cached at ~/.config/outlook-mcp/token-cache.json (mode 0600). Refresh
tokens are rotated automatically as long as the server is used at least every ~90 days.
4. Register with Claude Code
claude mcp add outlook \
--env OUTLOOK_MCP_CLIENT_ID="<your-client-id>" \
-- uv --directory /path/to/outlook-mcp-server run python server.pyOr add manually to your MCP config:
{
"mcpServers": {
"outlook": {
"command": "uv",
"args": [
"--directory", "/path/to/outlook-mcp-server",
"run", "python", "server.py"
],
"env": {
"OUTLOOK_MCP_CLIENT_ID": "<your-client-id>"
}
}
}
}KQL search examples
from:amazon.com
subject:invoice
from:receipts@uber.com received>=2026-01-01
hasattachment:yes from:doordash.comMultiple terms are AND-ed. Quote phrases with spaces.
Re-authentication
If you see Token refresh failed, just re-run uv run python login.py.
Available Tools
6 toolsdownload_attachmentB
Download an attachment to save_path (absolute path; parent dirs auto-created).
Returns {path, bytes_written, name}.
Inputs: message_id (required), attachment_id (required), save_path (required).
list_attachmentsB
List attachments on a message. Returns list of {id, name, contentType, size}.
Inputs: message_id (required). Returns: result
mark_as_readA
Mark a message as read (default) or unread. Returns {id, isRead}.
Inputs: message_id (required), read.
move_emailA
Move a message to a folder.
folder = well-known name (archive, inbox, deleteditems, junkemail, sentitems, drafts) or a folder ID returned by another Graph call. Returns {id, parentFolderId}.
Inputs: message_id (required), folder (required).
read_emailB
Read full body + headers of one message.
Returns {id, subject, from, to, received, body, body_type, hasAttachments}.
Inputs: message_id (required).
search_emailsA
Search emails using Graph KQL syntax.
Examples: 'from:amazon.com', 'subject:invoice', 'from:receipts@x.com received>=2026-01-01'.
Returns list of {id, subject, from, received, snippet, hasAttachments, isRead}.
Inputs: query (required), max_results. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct operation (downloading, listing, marking, moving, reading, searching) with no overlap. The resource (email or attachment) and action are clearly separated.
All tools follow a consistent verb_noun pattern in snake_case (download_attachment, list_attachments, etc.), making it predictable and easy to navigate.
6 tools is a well-scoped number for an email client MCP server. It covers the essential operations without being bloated or too sparse.
The set covers reading, searching, moving, marking read, and attachment handling. Missing send/compose and delete operations, which are common but not critical for a read-focused server.
Maintenance
Related MCP Connectors
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
MCP server for Nylas — read email, calendars, events and contacts, and send email or create events.
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.
MCP server for MailTempo's public free temporary email inboxes.
Related MCP Servers
- AlicenseBqualityDmaintenanceLightweight MCP server that enables AI agents to manage Microsoft Outlook email, calendar, and files using PKCE authentication with only a Client ID.46MIT
- FlicenseAqualityCmaintenanceAn MCP server that enables reading and managing Microsoft 365 / Outlook emails through Microsoft Graph API, allowing users to list, search, send, draft, and authenticate using device code flow.17-
- FlicenseAqualityCmaintenanceLocal MCP server for personal Outlook.com/Hotmail/Live accounts, enabling email triage, folder management, bulk operations, and newsletter unsubscribe via Microsoft Graph.211-
- AlicenseAqualityDmaintenanceA local stdio MCP server that enables reading, sending, and searching emails, as well as listing calendar events via Microsoft Graph API, using device-code authentication.1086 npmMIT