outlook-mcp

by @ryaker

Outlook MCP Server

Connect Claude Desktop or Claude Code to Outlook email, calendar, mail folders, inbox rules, OneDrive files, and Power Automate flows via Microsoft Graph and Flow APIs. Built in modular Node.js (14.0.0+) by ryaker, outlook-mcp runs locally over stdio with Azure OAuth 2.0 authentication.

Server facts

outlook-mcp

GitHub stars

462

Last commit

Mar 30, 2026

Runtime

node

License

—

Tech

Runtime
node
Transports
stdio
Remote access
No
Authentication
Microsoft Azure AD OAuth 2.0 (Graph API + optional Power Automate Flow API)

Activity

GitHub stars
462
Last commit
Data as of

Overview

Microsoft 365 users configuring an `outlook mcp` bridge in Claude Desktop or Claude Code can self-host `ryaker/outlook-mcp` (titled M365 Assistant MCP Server) locally in Node.js (`14.0.0` or higher) over `stdio`. Setup involves installing dependencies (`npm install`), registering an Azure Portal application with redirect URI `http://localhost:3333/auth/callback` and delegated Microsoft Graph scopes spanning Mail (`Mail.Read`, `Mail.ReadWrite`, `Mail.Send`), Calendars (`Calendars.Read`, `Calendars.ReadWrite`), OneDrive Files (`Files.Read`, `Files.ReadWrite`), `User.Read`, and `offline_access`, launching `npm run auth-server`, and invoking the `authenticate` tool to persist OAuth 2.0 tokens at `~/.outlook-mcp-tokens.json`. Be careful with env naming: `.env` uses `MS_CLIENT_ID`, `MS_CLIENT_SECRET`, and `MS_TENANT_ID`, while `claude_desktop_config.json` expects `OUTLOOK_CLIENT_ID` and `OUTLOOK_CLIENT_SECRET` (always pasting the secret VALUE, never the Secret ID).

Rather than stopping at basic inbox reading, the repository organizes tools across Microsoft 365 productivity suites: Outlook email and calendar management (search, read, send, mark read, folders, rules, event creation, accept/decline/delete), OneDrive file operations (list, search, download links, `<4MB` simple uploads, `>4MB` chunked uploads, sharing links), and optional Power Automate controls (list environments and flows, trigger manual flows, inspect run history, toggle flows using the separate Flow API scope). Developers can also verify tool behavior safely without live API calls via `USE_TEST_MODE=true` (`npm run test-mode`) or MCP Inspector (`npm run inspect`).

Install & configure

Requirements

  • Node.js 14.0.0 or higher with npm or yarn
  • Azure Portal App Registration with redirect URI `http://localhost:3333/auth/callback` and delegated Microsoft Graph permissions (Mail, Calendars, Files, User.Read, offline_access)
  • Optional Azure AD Flow API scope (`https://service.flow.microsoft.com//.default`) for Power Automate tools
Documented launch / install command
npm install

Clone `ryaker/outlook-mcp`, run `npm install`, copy `.env.example` to `.env` with `MS_CLIENT_ID`, `MS_CLIENT_SECRET` (the secret VALUE), and `MS_TENANT_ID` (for single-tenant apps), point Claude Desktop to `node /path/to/outlook-mcp/index.js` with `OUTLOOK_CLIENT_ID` and `OUTLOOK_CLIENT_SECRET`, start `npm run auth-server`, and run the `authenticate` tool.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "m365-assistant": {
      "command": "node",
      "args": [
        "/path/to/outlook-mcp/index.js"
      ],
      "env": {
        "USE_TEST_MODE": "false",
        "OUTLOOK_CLIENT_ID": "your-client-id",
        "OUTLOOK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "m365-assistant": {
      "command": "node",
      "args": [
        "/path/to/outlook-mcp/index.js"
      ],
      "env": {
        "USE_TEST_MODE": "false",
        "OUTLOOK_CLIENT_ID": "your-client-id",
        "OUTLOOK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "m365-assistant": {
      "type": "stdio",
      "command": "node",
      "args": [
        "/path/to/outlook-mcp/index.js"
      ],
      "env": {
        "USE_TEST_MODE": "false",
        "OUTLOOK_CLIENT_ID": "your-client-id",
        "OUTLOOK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "m365-assistant": {
      "command": "node",
      "args": [
        "/path/to/outlook-mcp/index.js"
      ],
      "env": {
        "USE_TEST_MODE": "false",
        "OUTLOOK_CLIENT_ID": "your-client-id",
        "OUTLOOK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "m365-assistant": {
      "type": "stdio",
      "command": "node",
      "args": [
        "/path/to/outlook-mcp/index.js"
      ],
      "env": {
        "USE_TEST_MODE": "false",
        "OUTLOOK_CLIENT_ID": "your-client-id",
        "OUTLOOK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
list-emailsRetrieve recent email messages from the authenticated Outlook inbox.
search-emailsSearch Outlook messages using Microsoft Graph filters and query criteria.
read-emailFetch the full content of a specific Outlook email message.
send-emailCompose and send a new email through Microsoft Graph Mail.Send permissions.
mark-as-readToggle the read or unread status of an Outlook email message.
list-eventsList scheduled events from the user's Outlook calendar.
create-eventCreate a new Outlook calendar event.
accept-eventAccept an incoming Outlook calendar invitation.
decline-eventDecline an incoming Outlook calendar invitation.
move-emailsMove Outlook messages between mail folders.
create-ruleCreate an automated Outlook inbox rule.
onedrive-listList files and folders stored at a OneDrive path.
onedrive-searchSearch OneDrive files matching a query string.
onedrive-uploadUpload a small file under 4MB to OneDrive.
onedrive-upload-largeUpload files larger than 4MB to OneDrive via chunked transfer.
onedrive-shareGenerate a sharing link for a OneDrive file or folder.
flow-listList solution-aware Power Automate flows in a Power Platform environment.
flow-runTrigger a manual Power Automate flow via the Flow API.

Use cases

  • Triage Outlook email threads, move messages across folders, draft replies via `send-email`, and create inbox filtering rules from Claude.
  • Review upcoming schedules, create meetings, and accept or decline calendar invites without switching to the Outlook client.
  • Search OneDrive documents, fetch download links, upload files over or under 4MB, and generate sharing links inside an AI conversation.
  • Inspect Power Platform environments and trigger solution-aware manual Power Automate flows while checking recent run history.

Strengths

  • Unifies Outlook (mail, calendar, folders, rules), OneDrive (including >4MB chunked uploads), and Power Automate inside a single modular Node.js server.
  • Ships a built-in mock test mode (`USE_TEST_MODE=true` / `npm run test-mode`), Jest test suite, and `npm run inspect` MCP Inspector script.
  • Documents exact Azure Portal app registration steps, Graph delegated scopes, and common OAuth troubleshooting fixes.
  • Stores refreshed Graph and Flow OAuth 2.0 tokens locally in `~/.outlook-mcp-tokens.json` with clean module separation.

Limitations

  • No published npm package or hosted remote URL—you must clone the repo locally, run `npm install`, and register your own Azure Portal app.
  • No open-source license file is detected in GitHub repository metadata, so confirm licensing terms before organizational redistribution.
  • Power Automate integration requires a separate Flow API token and only accesses solution-aware, manually triggered flows.

outlook-mcp setup notes

  • Check OUTLOOK_CLIENT_ID, OUTLOOK_CLIENT_SECRET, USE_TEST_MODE in the outlook-mcp configuration if startup or authentication fails.
  • outlook-mcp's stdio example needs a client that launches local processes.
  • outlook-mcp has no recorded license; confirm reuse terms in its repository.

Frequently asked questions

Register an app in Azure Portal with redirect URI `http://localhost:3333/auth/callback` and delegated Microsoft Graph permissions, configure `OUTLOOK_CLIENT_ID` and `OUTLOOK_CLIENT_SECRET` in `claude_desktop_config.json`, then run `npm run auth-server`. Inside Claude, invoke the `authenticate` tool, sign in at the returned OAuth URL, and tokens will save locally to `~/.outlook-mcp-tokens.json`.

Related MCP servers