Click on "Install 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 Serversearch for emails from my manager about the quarterly report"
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.
Modular Outlook MCP Server
A modular MCP (Model Context Protocol) server that connects Claude with Microsoft Outlook through the Microsoft Graph API using app-only (client credentials) authentication — no browser sign-in required.
Certified by MCPHub https://mcphub.com/mcp-servers/ryaker/outlook-mcp
Directory Structure
Features
App-only Authentication: Uses client credentials flow — no browser sign-in or user interaction required
Email Management: List, search, read, send, mark as read
Categories Management: Get master categories and set categories on emails
Archive & Delete: Archive emails to archive folder, soft/hard delete
Calendar Management: List upcoming events (recurring-aware), create, accept, decline, cancel, delete
Folder Management: List, create, move emails between folders
Inbox Rules: List, create, reorder rules
Mailbox Permission Restrictions: Configurable per-mailbox access control
Multi-mailbox: Access multiple mailboxes via the
mailboxparameter on each toolTest Mode: Simulated responses for testing without real API calls
TypeScript: Fully typed codebase with strict mode
Quick Start
Install dependencies:
bun installAzure setup: Register app in Azure Portal with Application permissions (see below)
Configure environment: Copy
.env.exampleto.envand add your Azure credentialsConfigure Claude: Update your Claude Desktop config with the server path
Start using: No auth server needed — credentials are loaded automatically from env
Installation
Prerequisites
Bun runtime — fast JavaScript/TypeScript runtime
Azure account for app registration
Bun natively supports TypeScript and auto-loads .env files, so no additional tooling is needed.
Azure App Registration & Configuration
This server uses app-only (client credentials) authentication. The app acts on behalf of your organization, not on behalf of a specific signed-in user. This requires admin consent for Application permissions.
1. App Registration
Open Azure Portal
Go to App registrations → New registration
Enter a name (e.g., "Outlook MCP Server")
Select Accounts in this organizational directory only (single tenant)
No redirect URI needed — client credentials flow has no browser redirect
Click Register
Copy the Application (client) ID → this is your
MS_CLIENT_IDCopy the Directory (tenant) ID from the Overview page → this is your
MS_TENANT_ID
2. Application Permissions
⚠️ These are Application permissions (not Delegated). They require admin consent.
Go to API permissions → Add a permission → Microsoft Graph → Application permissions
Add the following permissions:
Permission | Purpose |
| Read emails |
| Move, archive, update emails |
| Send emails |
| Read and modify calendar events |
| Read and manage inbox rules |
Click Add permissions
Click Grant admin consent for [your organization] — this is required for Application permissions
3. Client Secret
Go to Certificates & secrets → Client secrets → New client secret
Enter a description and select the longest expiration available
Click Add
⚠️ Copy the secret Value (not the Secret ID) immediately — it won't be shown again
Configuration
Environment Variables
Create a .env file in the project root:
Edit .env:
Important: Use the secret Value, not the Secret ID.
Claude Desktop Configuration
Copy from claude-config-sample.json and update paths and credentials:
Authentication Flow
No browser sign-in or auth server is required. The server automatically fetches an access token using your app credentials when needed:
Claude starts the MCP server
Server reads
MS_TENANT_ID,MS_CLIENT_ID,MS_CLIENT_SECRETfrom environmentOn first API call, a token is fetched via
POST /oauth2/v2.0/token(client credentials)Token is cached in memory and refreshed automatically when it expires
You can verify credentials are working using the authenticate tool in Claude.
Mailbox Parameter
All tools that access Outlook data require a mailbox parameter specifying which mailbox to operate on (e.g., chi@desertservices.net). This is how the server knows which user's data to access in app-only mode.
Example: "List my last 10 emails from chi@desertservices.net"
Mailbox Permissions
Write operations (send, archive, delete, create/modify rules, move emails, create events) are restricted to specific mailboxes to prevent accidental modifications.
Allowed Mailboxes (Full Access)
Configured in config/mailbox-permissions.ts:
contracts@desertservices.netchi@desertservices.netdustpermits@desertservices.net
All other mailboxes are read-only. Attempting write operations from an unlisted mailbox returns an error.
Development
Test Mode
Troubleshooting
Authentication Errors
"Missing credentials" on startup
Set all three env vars: MS_TENANT_ID, MS_CLIENT_ID, MS_CLIENT_SECRET
"Invalid client secret" (AADSTS7000215)
You used the Secret ID instead of the Secret Value. Go to Azure Portal → Certificates & secrets and copy the Value column.
403 Forbidden on API calls
Admin consent has not been granted for Application permissions. Go to Azure Portal → API permissions → Grant admin consent.
403 on rules operations
Ensure MailboxSettings.ReadWrite Application permission is granted (not just Mail.ReadWrite).
"Sending is not allowed from this mailbox"
The mailbox is not in the canSend list in config/mailbox-permissions.ts. Add it or use an allowed mailbox.
API Errors
"cpim_sts_Unsupported_endpoint"
You have a stale version of the server — this error means me/ endpoints were used. Update to the latest version.
400 on search with attachments filter
This was a known bug in older versions — $search and $filter cannot be combined. Fixed in v2.1.0.
Extending the Server
Create new module directories (e.g.,
contacts/)Implement tool handlers in separate
.tsfiles with proper TypeScript typesExport tool definitions from module
index.tsfilesImport and add tools to
TOOLSarray inindex.tsAdd any shared types to
types.tsat the project rootInclude a
mailboxrequired parameter in all tool schemas that make API calls