Outlook MCP Starter
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Outlook MCP Starter
A small, independent Python MCP server for a single user's Microsoft-hosted Outlook mailbox. It connects an MCP client to Microsoft Graph through the official MCP Python SDK and Microsoft Authentication Library (MSAL).
Status: source starter, checked with offline unit tests and real local MCP protocol discovery. Microsoft sign-in and live mailbox operations still need to be tested with your own account. No Microsoft account is connected in this package.
Read the illustrated guide · Guide source
Included tools
Tool | Purpose | Default |
| Read a first page from Inbox or another known folder; optionally unread only | Enabled |
| Search by a Graph search expression, such as | Enabled |
| Read one message by ID, including body and reply-to information | Enabled |
| Save a new plain-text draft | Opt-in |
| Save a reply draft to an existing message | Opt-in |
The host AI summarizes the returned text and composes suggested replies. The MCP server supplies the mailbox access. This starter has no sending, deleting, attachment download, calendar, category-editing, or shared-mailbox tools.
Read tools request delegated Mail.Read. Draft mode requests delegated Mail.ReadWrite instead. Microsoft defines that write permission more broadly than drafts, although this server exposes only draft creation. Mail.Send is not requested. Microsoft permission definitions
Related MCP server: oauth-mail-mcp
Requirements
Python 3.11 or newer, on a computer with a browser.
An Outlook.com/Hotmail or Microsoft 365 mailbox.
Permission to register a Microsoft Entra application or an application registration supplied by your administrator.
An available OS credential store: Windows DPAPI, macOS Keychain, or an unlocked Linux Secret Service/libsecret session.
The mailbox must be hosted by Microsoft. Merely opening a Gmail or other IMAP account in the Outlook app does not make it accessible through these Microsoft Graph tools. Sovereign Microsoft clouds are outside this starter's scope. Outlook mail API overview
1. Register a Microsoft application
In Microsoft Entra admin center, open App registrations and create an app for this starter.
Choose the supported account audience. For a personal Outlook.com account, the registration must include personal Microsoft accounts. For an organization's own use, prefer that organization's tenant and policy.
In Authentication, add the Mobile and desktop applications platform with redirect URI
http://localhost.In API permissions, add Microsoft Graph delegated permission
Mail.Read.Copy the application's Application (client) ID into the local configuration below. This identifier is not a password.
Complete any consent required by your organization. This local public-client flow does not use a client secret.
The registration's audience and configured authority must agree. Use common for an app registered for work/school and personal accounts, consumers for personal accounts, or your tenant UUID for a single organization.
Sources: Microsoft account audiences, MSAL interactive sign-in and PKCE, PublicClientApplication.
2. Install locally
Clone this repository with Git, or download the source ZIP and extract it. Open a terminal in the project folder.
git clone https://github.com/shifawrites6-ai/outlook-mcp-starter.git
cd outlook-mcp-starterWindows PowerShell
py -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
Copy-Item config.example.json config.jsonmacOS or Linux
python3 -m venv .venv
.venv/bin/python -m pip install -e .
cp config.example.json config.jsonEdit config.json:
{
"client_id": "YOUR_APPLICATION_CLIENT_UUID",
"tenant_id": "common",
"enable_drafts": false
}The MCP SDK is deliberately pinned to the tested v1.29 maintenance release. Moving to SDK v2 requires a separate migration and test pass. SDK maintenance documentation
3. Sign in
On Windows:
.\.venv\Scripts\python.exe -m outlook_mcp login --config config.jsonOn macOS or Linux:
.venv/bin/python -m outlook_mcp login --config config.jsonSign in on the Microsoft page using the intended mailbox account. Tokens are kept in an encrypted local MSAL cache, separate for each client ID, tenant, and read/draft mode. The server never opens a sign-in prompt during a tool call; use this local command again when authorization needs renewal. Run under the same OS account and credential-store session as your MCP host.
If encrypted storage cannot initialize, setup stops. On a Linux server without an unlocked desktop keyring, this starter needs a different, reviewed secret-storage deployment rather than a plaintext cache fallback. Microsoft's encrypted persistence library
4. Connect a local MCP client
The server speaks stdio. Use an absolute Python executable and an absolute config path. For a client that accepts an mcpServers JSON configuration, a Windows example is:
{
"mcpServers": {
"outlook": {
"command": "C:/path/to/outlook-mcp-starter/.venv/Scripts/python.exe",
"args": ["-m", "outlook_mcp", "serve", "--config", "C:/path/to/outlook-mcp-starter/config.json"]
}
}
}On macOS/Linux, use /absolute/path/to/outlook-mcp-starter/.venv/bin/python and the corresponding config path. Client configuration formats vary. The example is not a JSON file you can upload directly into ChatGPT.
Suggested first requests:
“Show my latest 10 inbox messages.”
“Find emails from person@example.com.”
“Read the message I select and summarize what needs a reply.”
5. Enable draft creation when needed
Set enable_drafts to true, add the Microsoft Graph delegated Mail.ReadWrite permission to the app registration, and run login again. The separate draft-mode cache requires a new sign-in. Restart the MCP server and refresh tool discovery.
Two draft tools now appear. A draft call saves a draft in Outlook; it does not send it. Read the source message and inspect recipients before requesting a reply draft. Microsoft determines the reply recipient from the original message's reply-to/from fields. Repeating a draft call can create duplicates. Create draft, Create reply draft
Connect to ChatGPT
For this private local starter, a Secure MCP Tunnel can bridge its stdio process to ChatGPT. This requires a running tunnel client, a Platform tunnel ID, a runtime API key, appropriate tunnel permissions, and matching ChatGPT custom-MCP access. It is not connected automatically by downloading this package.
In the supported web interface, use Plugins → + → Add custom MCP server → Tunnel. Keep any tunnel connection limited to the owner of this signed-in mailbox: this starter is single-user and has no per-caller authorization layer for shared use.
Current OpenAI documentation lists full custom-MCP support for Business and Enterprise/Edu, and custom read/fetch access for Pro. Verify the options shown in the intended account before setting up hosting or a tunnel.
Sources: Custom MCP access, Secure MCP Tunnel.
Limits and validation
List/search tools return a bounded first page of up to 50 items. has_more and pagination_supported: false explicitly describe incomplete results; no mailbox-wide completeness claim is appropriate. Message bodies are capped at 20,000 characters, with truncation metadata. A single response is capped at 2 MiB.
The client blocks HTTP redirects and uses a fixed Microsoft Graph origin. It makes no automatic retries. If Microsoft does not confirm whether a draft was created, inspect Outlook Drafts before repeating the request. Email content is untrusted data, not instructions to execute tools.
Run offline tests with your virtual-environment Python:
python -m unittest discover -s tests -vThe tests use synthetic data and mock Graph responses, plus a real stdio MCP handshake and tool discovery. They do not prove that a specific tenant permits sign-in or that a live mailbox operation succeeds.
Public sharing
See PUBLIC_SHARING.md for source distribution, a hosted multiuser service, and public plugin submission. The included MIT license covers this project's source. Dependencies retain their own licenses. This is an independent project, not an official Microsoft or OpenAI product.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Email: search, read, fetch attachments; attach files when the MCP client supports inputs.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Your mailbox for MCP clients: search, read, draft, send, rules and notes. Sending is off by default.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables reading, sending, and managing Microsoft 365/Outlook emails through MCP tools with OAuth 2.1 authentication.-
- AlicenseNot gradedqualityCmaintenanceEnables authenticated MCP clients to list, search, read, flag, draft, and optionally send mail from one Gmail or Microsoft 365 mailbox using OAuth without app registration.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to manage multiple IMAP/SMTP mailboxes by listing folders, searching and reading messages, preparing Markdown drafts and replies, and sending only a draft the user has reviewed and confirmed.937 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to access a personal Outlook.com mailbox and calendar through Microsoft Graph, supporting email search, reading, drafting, sending, organization, and calendar event management.89 npmMIT