# Outlook Mail

> Outlook Mail is an open-source MCP server for communication. Local MCP server to read, search, send and tidy Outlook.com and Microsoft 365 mail. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/pepebits/outlook-mcp
- **GitHub stars:** 0
- **License:** MIT
- **MCP Registry name:** io.github.Pepebits/outlook-mcp
- **Categories:** [communication](https://ai-powered.com/categories/communication), [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-11-23

## About

This server talks to Microsoft Graph directly from your machine over stdio, so no mail passes through the author's servers. Sign-in uses the OAuth device code flow: ask the assistant to log in, open the URL it returns, enter the one-time code and accept. The refresh token goes into the macOS Keychain or Linux Secret Service when available, otherwise into a file readable only by you.

By default it uses a shared Azure app that supports personal accounts such as Outlook.com, Hotmail and Live; work or school accounts need your own Azure app registration, configured through OUTLOOK_CLIENT_ID and OUTLOOK_TENANT. Setting OUTLOOK_READ_ONLY=true removes every sending, moving, deleting and flagging tool entirely.

Beyond basic mail, it can find newsletters, unsubscribe from them and block senders through inbox rules, retry on throttling responses, and send attachments up to 150 MB using chunked upload. It requires Node.js 24 or newer and is MIT licensed.

## Features

- **Read and search mail:** Browse folders and search with KQL, with bodies returned as sanitized plain text.
- **Send and reply:** Send, draft, reply, reply-all and forward, with local attachments up to 150 MB.
- **Bulk organising:** Move, flag, mark read or delete messages one at a time or in bulk.
- **Newsletter cleanup:** Find newsletters, unsubscribe and block senders with inbox rules.
- **Read-only mode:** One setting removes all mutating tools from the server.
- **Keychain token storage:** Refresh tokens are kept in the OS keychain where available.

## Good for

- Triage an inbox and archive old messages in bulk
- Draft replies to emails from chat
- Clean out newsletters and block unwanted senders
- Download attachments into a set folder
- Give an assistant safe read-only access to a mailbox

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add outlook-mcp -- npx -y @pepebits/outlook-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add outlook-mcp -- npx -y @pepebits/outlook-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.outlook-mcp]
command = "npx"
args = ["-y", "@pepebits/outlook-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user outlook-mcp npx -- -y @pepebits/outlook-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "outlook-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pepebits/outlook-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 4 tools read data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `login`: Returns a URL and one-time code to sign in to Microsoft.
- `auth_status` (name suggests: reads): Reports whether you are signed in, waiting or signed out.
- `logout`: Removes the cached account and token cache.
- `get_message` (name suggests: reads): Reads a message body as sanitized plain text.

## FAQ

### Does Outlook Mail work with work or school accounts?

Yes, but you must register your own Azure app and set OUTLOOK_CLIENT_ID and a tenant; the shared app supports personal accounts only.

### Where are my tokens stored?

In the OS keychain on macOS and Linux when available, otherwise a 0600 file under ~/.config/outlook-mcp.

### Can I stop Outlook Mail from sending mail?

Yes. OUTLOOK_READ_ONLY=true means send, move, delete, flag and mark tools are not registered.

### What Node version is needed?

Node.js 24 LTS or newer.

### Is Outlook Mail free?

Yes. Outlook Mail is open source, so you can use and self-host it for free.

### How do I add Outlook Mail to Claude Code?

Run this command in your terminal: claude mcp add outlook-mcp -- npx -y @pepebits/outlook-mcp

### What are the best alternatives to Outlook Mail?

The closest alternatives to Outlook Mail are TrendRadar, Ha MCP, Concord MCP, TryPost and Open Sunsama.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [TrendRadar](https://ai-powered.com/mcp/trendradar): TrendRadar is an open-source MCP server for communication.
- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): Ha MCP is an open-source MCP server for productivity.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.
- [TryPost](https://ai-powered.com/mcp/trypost): TryPost is a paid MCP server for marketing and seo.
- [Open Sunsama](https://ai-powered.com/mcp/open-sunsama): Open Sunsama is an open-source MCP server for productivity.
- [Gmail MCP](https://ai-powered.com/mcp/gmail-mcp-3): Gmail MCP is an open-source MCP server for communication.
- [Discord MCP](https://ai-powered.com/mcp/discord-mcp): Discord MCP is an open-source MCP server for communication.
- [Dayfile.app](https://ai-powered.com/mcp/dayfile-app): Dayfile.app is an open-source MCP server for productivity.

---
Source: https://ai-powered.com/mcp/outlook-mail
