The Outlook Assistant MCP server enables AI-powered management of Outlook email, calendar, folders, and rules through natural language commands.
Email Management: List, search, and read emails across all folders with advanced filtering (sender, recipient, subject, attachments, unread status). Send emails with CC/BCC support, importance levels, and HTML/plain text body options. Mark emails as read/unread and move them between folders.
Calendar Management: Full event lifecycle management including listing upcoming events, creating events with attendees, accepting/declining invitations with optional comments, canceling, and deleting events.
Folder Organization: List folder hierarchy with item counts, create new folders (including nested structures), and move emails between folders.
Inbox Rules Automation: List existing rules with detailed conditions and actions, create new rules with conditions (sender, subject, attachments) and actions (move to folder, mark as read), and edit rule execution order/sequence.
Authentication & Status: OAuth 2.0 authentication with Microsoft Graph API, automatic token refresh for persistent access, check authentication status, and force re-authentication if needed.
Key Features: Automatic pagination for large result sets (up to 500 emails/events), configurable output formats (TOON or plain text), and searches across all folders by default.
Outlook MCP Server
Let AI manage your Outlook inbox, calendar, and rules — through natural language.
Built on Model Context Protocol · Powered by Microsoft Graph API
What is this?
This MCP server turns Claude into a full-featured Outlook assistant. Instead of clicking through the Outlook UI, just ask Claude:
"Show me unread emails from this week" "Schedule a meeting with Alice tomorrow at 3pm" "Create a rule to move all GitHub notifications to a folder"
Claude handles authentication, API calls, pagination, filtering — everything. You just talk.
Capabilities
Area | What Claude can do |
List, search, read (preview or full body), send, mark read/unread | |
Calendar | List upcoming events, create, accept, decline, cancel, delete |
Folders | List folder hierarchy, create folders, move emails between folders |
Rules | List inbox rules, create new rules, change rule execution order |
Auth | OAuth 2.0 with automatic token refresh — authenticate once, use forever |
Quick Start
Azure App Setup
You need an Azure app registration to connect to Microsoft Graph.
Click New registration
Name:
Outlook MCP Server(or anything you like)Account type: Accounts in any organizational directory and personal Microsoft accounts
Redirect URI: Web →
http://localhost:3333/auth/callbackClick Register
Copy the Application (client) ID → this is your
OUTLOOK_CLIENT_ID
Go to API permissions → Add a permission → Microsoft Graph → Delegated permissions, then add:
offline_accessUser.ReadMail.ReadMail.SendCalendars.ReadCalendars.ReadWriteContacts.Read
Go to Certificates & secrets → Client secrets → New client secret
Set description and longest expiration
Copy the secret VALUE (not the Secret ID!)
This is your
OUTLOOK_CLIENT_SECRET
Configuration
Environment Variables
Create .env in the project root:
Important: Always use the secret VALUE from Azure, not the Secret ID.
Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
Advanced
Edit config.js to customize server name, timezone, pagination limits, field selections, and response format (toon or text).
Authentication Flow
Step 1 — Start the auth server (must be running before authenticating):
Step 2 — Ask Claude to authenticate, open the URL, sign in, done.
Tokens persist in ~/.outlook-mcp-tokens.json and refresh automatically.
Project Structure
Available Commands
Command | Description |
| Install dependencies |
| Start the MCP server (stdio) |
| Start OAuth server on port 3333 |
| Launch MCP Inspector for interactive testing |
| Run Jest test suite |
| Print env vars and start server |
| Free port 3333 if occupied |
Troubleshooting
Run npm install first.
You're using the Secret ID instead of the Secret Value. Go to Azure Portal → Certificates & secrets → copy the Value column.
The auth server isn't running. Start it first with npm run auth-server, then retry.
Token may be expired or corrupted. Delete ~/.outlook-mcp-tokens.json and re-authenticate.
Verify the absolute path to
index.jsin your Claude Desktop configEnsure
OUTLOOK_CLIENT_IDandOUTLOOK_CLIENT_SECRETare setRestart Claude Desktop after config changes
Extending the Server
Adding a new tool is straightforward:
Create a handler file in the appropriate module directory
Export
{ name, description, inputSchema, handler }Add it to the module's
index.jsexportsIt's automatically registered via
index.jsat the root
See .cursor/rules/new-tool.mdc for the full checklist.