Outlook MCP Server
A Model Context Protocol (MCP) server that gives AI assistants full access to Microsoft Outlook emails, calendar, and contacts via the Microsoft Graph API.
README
Outlook MCP Server
A Model Context Protocol (MCP) server that gives AI assistants (Claude, Cursor, etc.) full access to your Microsoft Outlook — emails, calendar, and contacts — via the Microsoft Graph API.
Features
| Category | Operations |
|---|---|
| List, read, search, send, reply, reply-all, forward, create draft, send draft, delete, move, mark read/unread, flag | |
| Mail Folders | List folders, create folder |
| Calendar | List calendars, list events (with date range), get event, search, create, update, delete, accept/decline/tentative |
| Contacts | List, get, search, create, update, delete, list folders |
| Auth | Device code flow with persistent token cache, sign out |
Prerequisites
- Node.js 18+ (tested with v22)
- A Microsoft 365 or Outlook account
- An Azure AD (Entra ID) app registration (free, takes ~5 minutes)
Step 1: Register an Azure AD Application
-
Go to the Azure Portal → Microsoft Entra ID → App registrations → New registration
-
Fill in:
- Name:
Outlook MCP(or any name) - Supported account types: Choose based on your setup:
- Personal Microsoft accounts only → for @outlook.com / @hotmail.com
- Accounts in any organizational directory and personal accounts → for work + personal
- Redirect URI: Leave blank (we use device code flow)
- Name:
-
Click Register. Copy the Application (client) ID — this is your
OUTLOOK_CLIENT_ID. -
Copy the Directory (tenant) ID if you're using a work/school account — this is your
OUTLOOK_TENANT_ID. For personal accounts useconsumers. -
Go to API permissions → Add a permission → Microsoft Graph → Delegated permissions. Add:
Mail.ReadWriteMail.SendCalendars.ReadWriteContacts.ReadWriteMailboxSettings.ReadWriteUser.Readoffline_access
-
Click Grant admin consent (if you're an admin) or ask your admin to do so.
-
Go to Authentication → Enable Allow public client flows → Yes → Save.
Step 2: Build the Server
cd outlook-mcp
npm install
npm run build
Step 3: Configure in Cursor (or Claude Desktop)
Cursor
Add to your Cursor MCP config (~/.cursor/mcp.json or via Settings → MCP):
{
"mcpServers": {
"outlook": {
"command": "node",
"args": ["/absolute/path/to/outlook-mcp/dist/index.js"],
"env": {
"OUTLOOK_CLIENT_ID": "YOUR_CLIENT_ID_HERE",
"OUTLOOK_TENANT_ID": "common"
}
}
}
}
Use
"common"for multi-tenant,"consumers"for personal accounts (@outlook.com / @hotmail.com), or your specific tenant ID for work/school accounts.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"outlook": {
"command": "node",
"args": ["/absolute/path/to/outlook-mcp/dist/index.js"],
"env": {
"OUTLOOK_CLIENT_ID": "YOUR_CLIENT_ID_HERE",
"OUTLOOK_TENANT_ID": "common"
}
}
}
}
Step 4: First-Time Authentication
The first time a tool is called, the server uses Device Code Flow:
- A message will appear in the MCP client (or stderr) like:
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ABCD1234 to authenticate. - Open that URL in your browser, enter the code, and sign in with your Microsoft account.
- The token is cached at
~/.outlook-mcp-token-cache.json(permissions 600) and refreshed automatically. - You won't need to authenticate again until the refresh token expires (~90 days of inactivity).
Available Tools
Auth
| Tool | Description |
|---|---|
outlook_get_profile |
Get your account name, email, and mailbox settings |
outlook_sign_out |
Clear cached tokens |
| Tool | Key Parameters |
|---|---|
email_list |
folder, top, skip, filter, orderBy |
email_get |
messageId |
email_search |
query (KQL), top |
email_send |
to[], subject, body, cc[], bcc[], importance |
email_reply |
messageId, comment, replyAll |
email_forward |
messageId, to[], comment |
email_create_draft |
to[], subject, body, cc[], bcc[] |
email_send_draft |
messageId |
email_delete |
messageId |
email_move |
messageId, destinationFolderId |
email_mark_read |
messageId, isRead |
email_flag |
messageId, flagStatus (flagged/complete/notFlagged) |
email_list_folders |
— |
email_create_folder |
displayName, parentFolderId |
Calendar
| Tool | Key Parameters |
|---|---|
calendar_list_calendars |
— |
calendar_list_events |
calendarId, startDateTime, endDateTime, top |
calendar_get_event |
eventId |
calendar_search_events |
query, top |
calendar_create_event |
subject, startDateTime, endDateTime, timeZone, attendees[], isOnlineMeeting |
calendar_update_event |
eventId, + any fields |
calendar_delete_event |
eventId |
calendar_accept_event |
eventId, sendResponse, comment |
calendar_decline_event |
eventId, sendResponse, comment |
calendar_tentative_event |
eventId, sendResponse, comment |
Contacts
| Tool | Key Parameters |
|---|---|
contacts_list |
top, skip, filter, orderBy |
contacts_get |
contactId |
contacts_search |
query |
contacts_create |
displayName, emailAddresses[], businessPhones[], etc. |
contacts_update |
contactId, + any fields |
contacts_delete |
contactId |
contacts_list_folders |
— |
Development
# Run directly with tsx (no build step)
OUTLOOK_CLIENT_ID=xxx npm run dev
# Rebuild after changes
npm run build
Troubleshooting
"OUTLOOK_CLIENT_ID environment variable is required" → Make sure you've set the env var in your MCP config.
"AADSTS50011: The redirect URI ... was not found" → Enable Allow public client flows in Azure Portal → App Registration → Authentication.
"Insufficient privileges"
→ Add the missing Graph API permissions and re-grant admin consent. Then run outlook_sign_out and re-authenticate.
Token keeps expiring
→ Make sure offline_access is in your API permissions.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.