loading…
Search for a command to run...
loading…
Enables interaction with Microsoft Outlook for managing emails and calendars through OAuth2 delegated access. It provides a stateless, spec-compliant server tha
Enables interaction with Microsoft Outlook for managing emails and calendars through OAuth2 delegated access. It provides a stateless, spec-compliant server that allows users to authenticate and perform mail and calendar operations with their own Microsoft accounts.
A remote MCP server for Microsoft Outlook with proper OAuth2 and agent-optimized tools.
npm install
npm run build
npm start # Server at http://localhost:3000
Required environment:
MS365_MCP_CLIENT_ID=your-azure-ad-client-id
MS365_MCP_CLIENT_SECRET=your-azure-ad-client-secret
MS365_MCP_TENANT_ID=your-tenant-id # or 'common'
User.Read, Mail.Read, Mail.ReadWrite, Mail.Send, Calendars.Read, Calendars.ReadWrite, Calendars.Read.Shared, Place.Read.All, People.Read, offline_accesshttp://localhost:6274/oauth/callback (for MCP Inspector).envlist-mail-folders · list-mail-messages · search-mail · get-mail-message · send-mail · create-draft-mail · reply-mail · reply-all-mail · create-reply-draft · create-reply-all-draft · delete-mail-message · move-mail-message
list-calendars · list-calendar-events · search-calendar-events · find-meeting-times · get-calendar-event · get-calendar-view · create-calendar-event · update-calendar-event · delete-calendar-event
lookup-contact-email
For in-person meetings, find-meeting-times automatically:
Set isOnlineMeeting: false to enable room search. For online meetings (default: true), Teams meeting links are automatically generated.
Required scope: Place.Read.All (add to Azure AD app permissions)
| Variable | Default | Description |
|---|---|---|
MS365_MCP_CLIENT_ID |
required | Azure AD client ID |
MS365_MCP_CLIENT_SECRET |
- | Client secret (optional) |
MS365_MCP_TENANT_ID |
common |
Tenant ID |
MS365_MCP_PORT |
3000 |
Server port |
MS365_MCP_READ_ONLY_MODE |
false |
Disable write operations |
MS365_MCP_ENABLED_TOOLS |
all | Comma-separated tool allowlist |
MS365_MCP_CORS_ORIGIN |
* |
CORS origins |
MS365_MCP_RATE_LIMIT_REQUESTS |
30 |
Requests per window |
MS365_MCP_RATE_LIMIT_WINDOW_MS |
60000 |
Window size (ms) |
MS365_MCP_ALLOWED_TENANTS |
- | Restrict to specific tenants |
From GitHub Container Registry:
docker run -p 3000:3000 \
-e MS365_MCP_CLIENT_ID=xxx \
-e MS365_MCP_CLIENT_SECRET=xxx \
-e MS365_MCP_TENANT_ID=xxx \
ghcr.io/Leonine-Studios/useful-outlook-mcp:latest
Or build locally:
docker build -t useful-outlook-mcp .
docker run -p 3000:3000 \
-e MS365_MCP_CLIENT_ID=xxx \
-e MS365_MCP_CLIENT_SECRET=xxx \
-e MS365_MCP_TENANT_ID=xxx \
useful-outlook-mcp
| Endpoint | Description |
|---|---|
POST /mcp |
MCP protocol |
GET /health |
Health check |
GET /.well-known/oauth-protected-resource |
RFC 9728 |
GET /.well-known/oauth-authorization-server |
RFC 8414 |
GET /authorize |
OAuth (proxies to Microsoft) |
POST /token |
Token exchange (proxies to Microsoft) |
POST /register |
Dynamic client registration |
npm run dev
npx @modelcontextprotocol/inspector # Connect to http://localhost:3000/mcp
Legacy architecture: Built as stdio with HTTP bolted on. This is HTTP-native.
OAuth done wrong: Most servers store tokens server-side. This server is stateless—tokens passed per-request via Authorization header, never stored.
Tools without thought: Typical servers map API endpoints 1:1 without guidance. Agents fail in practical use because they don't know API quirks or multi-step workflows.
Every tool includes:
Example: find-meeting-times explains that email addresses are required (names don't work), how to find emails from names using search-mail, what OrganizerUnavailable means, and that isOrganizerOptional=true needs user confirmation.
eq on from/emailAddress/address is unreliable—uses startswith()$filter—must use $search$filter on organizer email returns 500—filtered client-sideMailboxConcurrency errors$search can't combine with $orderbyMIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"outlook-oauth-mcp-server": {
"command": "npx",
"args": []
}
}
}