Outlook Mail logo

Outlook Mail

Manage Outlook and Hotmail mail through Microsoft Graph with MCP tools for reading, searching, sending, organizing, and unsubscribing.

Install Outlook Mail

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "outlook-mail-2": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio outlook-mail-2 -- npx -y @pepebits/outlook-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @pepebits/outlook-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Outlook Mail MCP server connects MCP clients to Outlook.com, Hotmail, and Microsoft 365 mail through Microsoft Graph. It runs locally over stdio, authenticates with OAuth device code sign-in, and stores tokens in the OS keychain or a protected local file. Use it to browse folders, search with KQL, handle attachments, send or draft messages, manage inbox rules, and clean up newsletters. Read-only mode removes write tools and restricts Graph requests to reads.

Use cases

  • Search Outlook mail with KQL
  • Send and draft messages with attachments
  • Summarize recent inbox activity
  • Clean up newsletters and block senders
  • Apply reviewed bulk mailbox actions

Key features

  • OAuth device-code sign-in
  • KQL message search and pagination
  • Attachment listing and restricted downloads
  • Mail composition, replies, and forwarding
  • Bulk message organization with dry runs
  • Newsletter detection and unsubscribe handling

Tools26

What Outlook Mail lets your agent do. Expand a tool for its parameters.

Verified live~4.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 52d

What it can do

From the 26 tools this server returned when we ran it.

Can delete or modify data · 4Handles credentials · 1Makes network requests · 3Read-only tools · 22
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age27 days
Maintainers1

Observed 2026-11-04 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 1d ago via OSV.dev · @pepebits/outlook-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads810Package downloads in the last 30 days.
Last commit19d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed26Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Outlook Mail works

What Outlook Mail does

Outlook Mail exposes Microsoft Graph mail operations as MCP tools for Outlook.com, Hotmail, and Microsoft 365 accounts. It supports browsing folders, listing and searching messages, reading sanitized bodies, inspecting and downloading attachments, composing mail, and organizing existing messages.

The server also covers recurring mailbox maintenance. It can summarize recent inbox activity, identify newsletters through List-Unsubscribe headers, help unsubscribe from mailing lists, block senders with inbox rules, and create or remove rules for future incoming messages.

How it works

The package runs locally as a stdio MCP server and communicates directly with Microsoft Graph using fetch. Authentication uses the OAuth device code flow: the login tool returns a URL and one-time code, which the user enters in a browser before consent completes. auth_status reports the sign-in state, while logout removes the cached account and token cache.

The default shared Azure application supports personal Microsoft accounts. Work or school accounts can use an application registration by setting the appropriate tenant and client ID. Refresh tokens are stored in the operating-system keychain when available, with a protected local file fallback. Logs go to stderr and do not include tokens or message bodies.

Email-derived values are explicitly treated as untrusted data. Message subjects, senders, previews, bodies, attachment names, and newsletter results should not be interpreted as instructions by an agent.

Setup and configuration

Node.js 24 or newer is required. Install the package through an MCP client's stdio configuration, for example by running:

Terminal
npx -y @pepebits/outlook-mcp

Claude Desktop, Claude Code, and Codex have documented launch configurations, and any MCP client that can start a stdio process can use the same command. After connecting, ask the client to log in to Outlook, then complete the device-code flow.

Configuration can be supplied through the MCP client's environment block or an explicitly selected .env file. Useful settings include OUTLOOK_TENANT, OUTLOOK_CLIENT_ID, OUTLOOK_SCOPES, OUTLOOK_READ_ONLY, OUTLOOK_TOKEN_STORE, OUTLOOK_TOKEN_CACHE, OUTLOOK_DOWNLOAD_DIR, and OUTLOOK_ATTACH_DIRS. OUTLOOK_DOWNLOAD_DIR limits where attachments can be saved; attachment uploads are restricted to allowed directories. Page size, body length, Graph endpoint, and log verbosity are also configurable.

Tools and capabilities

  • Browse top-level or child mail folders and list messages newest first.
  • Search mail with KQL, including sender, subject, and attachment filters.
  • Read headers, recipients, and plain-text message bodies; inspect or download attachments.
  • Send, draft, reply to, reply-all, and forward messages, including chunked uploads for large attachments up to 150 MB.
  • Move, archive, mark read or unread, flag, and delete individual or multiple messages.
  • Preview bulk actions before applying them to up to 500 matching messages.
  • Generate mailbox digests and identify newsletters by sender.
  • Read, create, and delete inbox rules; block exact senders or whole domains.
  • Inspect unsubscribe options and submit supported one-click or mailto requests.

Limitations and notes

Sending, replying, forwarding, permanent deletion, and unsubscribe operations have external effects. Bulk actions default to a dry run and should be confirmed before execution. Standard deletion moves mail to Deleted Items; permanent deletion is irreversible. Message IDs change after a move, so callers should use the returned ID.

Microsoft Graph search results are not sorted and are capped at roughly 250 results. Pagination uses the returned nextLink. Large attachment uploads are chunked, while downloads are confined to the configured download directory and will not overwrite existing files unless explicitly allowed.

Read-only mode can be enabled with OUTLOOK_READ_ONLY=true. It prevents write tools from being registered, rejects non-GET Graph requests, and requests read-only scopes during sign-in.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Outlook Mail

Outlook Mail is an MCP server that connects Claude, Codex, and other MCP clients to Outlook.com, Hotmail, and Microsoft 365 through Microsoft Graph. Its main tools let agents authenticate, read and search messages, send or draft mail, manage folders and attachments, organize messages, handle newsletters, and configure inbox rules.

Run `npx -y @pepebits/outlook-mcp` as a stdio MCP server command. Add that command to Claude Desktop, Claude Code, Codex, or another client that can launch stdio servers, then ask the connected assistant to log in to Outlook.

Outlook Mail uses OAuth device-code sign-in. The `login` tool returns a URL and one-time code; open the URL, enter the code, and approve access. Use `auth_status` to check progress, and `logout` to remove the cached account and token cache.

Yes. Set `OUTLOOK_READ_ONLY=true` to omit send, move, delete, flag, and mark tools, reject non-GET Graph requests, and use read-only default scopes. This mode is suitable when an agent should inspect mail without changing it.

Yes, with your own Azure app configuration. Set `OUTLOOK_TENANT` to `organizations` or a tenant identifier and provide `OUTLOOK_CLIENT_ID`; personal accounts use the default `consumers` tenant configuration.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOutlook Mail AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/outlook-mail-2?style=directory)](https://allmcps.com/mcp/outlook-mail-2)
HTML Embed
<a href="https://allmcps.com/mcp/outlook-mail-2"><img src="https://allmcps.com/api/badge/outlook-mail-2?style=directory" alt="Outlook Mail on AllMCPs" /></a>