outlook-mcp
outlook-mcp
A Model Context Protocol (MCP) server for sending and managing Microsoft Outlook email via the Microsoft Graph API.
Features
Send email — To, CC, BCC, plain text or HTML body, file attachments (max 3 MB each)
Save draft — Save a message to Drafts without sending
Update draft — Partially edit a saved Draft (only supplied fields change)
Send draft — Transmit a saved Draft to its recipients
List mail folders — Discover all folders including custom ones
List messages — Browse any folder with full-text search or OData filter
Get message — Read full message body (plain text or HTML) + attachment metadata
Reply / Forward — Reply to or forward an existing message
Mark message — Mark as read or unread
Delete message — Move to Deleted Items (recoverable)
List contact folders — Browse personal contact lists (folders) and their contacts
List contacts — Search personal Outlook address book
List M365 Group members — Find everyone in a Microsoft 365 Group
List distribution groups — Find mail-enabled distribution lists in the organisation
List users — Search or browse Azure AD users across the organisation
Authentication
Uses OAuth 2.0 Device Code Flow — no browser redirect required. Tokens are stored locally at .access-token.txt and refreshed automatically.
auth_start → visit the URL, enter the code → auth_pollNote:
auth_startshould only be called when another tool returns an authentication error. Do not call it proactively — all tools load the stored token automatically.
Setup
1. Install dependencies and build
npm install
npm run build2. Register in Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"outlook": {
"type": "stdio",
"command": "node",
"args": ["C:\\Users\\staff\\Documents\\mcp\\outlook-mcp\\build\\index.js"]
}
}
}3. Authenticate
Call auth_start once, follow the instructions, then call auth_poll to complete login.
Tools
Authentication
Tool | Description |
| Start the Microsoft authentication flow |
| Complete authentication after signing in |
Sending & Drafts
Tool | Description |
| Send an email immediately |
| Save an email as a draft |
| Partially edit a saved draft (only supplied fields change) |
| Send a previously saved draft by its ID |
Reading Mail
Tool | Description |
| List all mail folders including custom ones |
| List messages from any folder; supports search and filter |
| Read full message content (body + attachment metadata) |
Mail Actions
Tool | Description |
| Reply to a message (thread history preserved) |
| Forward a message to new recipients |
| Mark a message as read or unread |
| Move a message to Deleted Items |
Address Book & Directory
Tool | Description |
| List personal contact folders; pass |
| List personal Outlook contacts (supports search) |
| List members of a Microsoft 365 Group |
| List mail-enabled distribution groups in the org |
| Search or list Azure AD users in the organisation |
send_email / save_draft Parameters
Parameter | Type | Required | Description |
|
| ✅ | Recipient email addresses |
|
| ✅ | Email subject |
|
| ✅ | Email body content |
|
| — | CC recipients |
|
| — | BCC recipients |
|
| — | Body format (default: |
|
| — | Local file paths to attach (max 3 MB each) |
Scopes
This MCP requests the following Microsoft Graph permissions:
Mail.Send— Send emailMail.ReadWrite— Save draftsGroup.Read.All— List group members and distribution groupsGroupMember.Read.All— Read group membershipDirectory.Read.All— Browse the directoryContacts.Read— Read personal contactsUser.Read.All— Search/list organisation usersoffline_access— Keep the session alive with a refresh token
Token Storage
Tokens are stored at outlook-mcp/.access-token.txt (excluded from git via .gitignore).
Attachment Limits
Attachments are encoded inline (base64). Files larger than 3 MB are rejected with a clear error before any API call is made. For larger files, share a link instead.