# Microsoft 365 Mail

> Microsoft 365 Mail is an MCP server for communication. Outlook mail through Microsoft Graph: read, search, reply, draft and manage attachments. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, API
- **Repository:** https://github.com/mindstone/mcp-servers/tree/HEAD/connectors/microsoft-mail
- **MCP Registry name:** io.github.mindstone/mcp-server-microsoft-mail
- **Categories:** [communication](https://ai-powered.com/categories/communication), [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-11-23

## About

This is one of five Microsoft 365 connectors from the same maintainers (mail, calendar, files, teams, SharePoint) that share one OAuth surface and one library for token storage and timeouts. The mail connector owns the sign-in tool; the host runs the OAuth flow and writes per-account token files, and every tool returns a structured auth_required response until they exist.

It has 22 tools covering messages, folders, drafts, attachments, threads and settings, including out-of-office replies and read or flag triage. A compose tool opens an editable draft in an interactive view and nothing is sent until the user clicks Send. Search uses Microsoft Search syntax, and conversations list oldest first.

The maintainers say they ported it in May 2026 because Microsoft's own server lineup lacked a stand-alone Outlook mail server. Attachment downloads go to a configured workspace folder, and multiple accounts are supported. It needs Node.js 20 or newer and a Microsoft Entra application client ID.

## Features

- **22 mail tools:** Messages, folders, drafts, attachments, threads and settings.
- **Compose with approval:** An editable draft opens in a view and sends only when you click Send.
- **Microsoft Search syntax:** Searches mail with queries such as sender and unread filters.
- **Multiple accounts:** Account tokens live in per-account files indexed by accounts.json.
- **Out-of-office:** Manages automatic replies.
- **Workspace downloads:** Attachments save to a configured directory.

## Good for

- Reply to the latest unread message from a colleague
- Search mail with sender and read-state filters
- Draft an email for review
- Save an attachment to a workspace folder

## Install

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

```sh
claude mcp add mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail
```

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": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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 mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail
```

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

```toml
[mcp_servers.mcp-server-microsoft-mail]
command = "npx"
args = ["-y", "@mindstone/mcp-server-microsoft-mail"]
env = { MS_CLIENT_ID = "<MS_CLIENT_ID>", MS_CONFIG_DIR = "<MS_CONFIG_DIR>" }
```

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e MS_CLIENT_ID='<MS_CLIENT_ID>' -e MS_CONFIG_DIR='<MS_CONFIG_DIR>' mcp-server-microsoft-mail npx -- -y @mindstone/mcp-server-microsoft-mail

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

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": {
    "mcp-server-microsoft-mail": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-microsoft-mail"
      ],
      "env": {
        "MS_CLIENT_ID": "<MS_CLIENT_ID>",
        "MS_CONFIG_DIR": "<MS_CONFIG_DIR>"
      }
    }
  }
}
```

## Tools

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

- `authenticate_microsoft_account`: Starts the host-run Microsoft 365 OAuth handoff.
- `list_emails` (name suggests: reads): Lists emails in a folder, most recent first.
- `get_email` (name suggests: reads): Reads one email by message ID.
- `list_attachments` (name suggests: reads): Lists attachment metadata for a message.
- `download_attachment` (name suggests: reads): Saves a file attachment into the workspace.
- `send_email` (name suggests: changes): Sends a new email with CC and BCC.
- `compose_email`: Opens an editable draft; nothing sends until you click Send.
- `search_emails` (name suggests: reads): Searches mail using Microsoft Search syntax.
- `get_conversation` (name suggests: reads): Lists the messages in a thread, oldest first.
- `reply_to_email` (name suggests: changes): Replies or replies to all.

## FAQ

### Who handles Microsoft sign-in?

The host application runs OAuth and writes token files; the server only reads them.

### What is required?

A Microsoft Entra client ID, a config directory and Node.js 20 or newer.

### Can Microsoft 365 Mail send without me?

Yes, send and reply tools send directly; the compose tool waits for you to click Send.

### How many tools does Microsoft 365 Mail have?

The README lists 22.

### How do I add Microsoft 365 Mail to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-microsoft-mail --env MS_CLIENT_ID='<MS_CLIENT_ID>' --env MS_CONFIG_DIR='<MS_CONFIG_DIR>' -- npx -y @mindstone/mcp-server-microsoft-mail

### What are the best alternatives to Microsoft 365 Mail?

The closest alternatives to Microsoft 365 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.
- [Discord MCP](https://ai-powered.com/mcp/discord-mcp): Discord MCP is an open-source MCP server for communication.
- [Gmail MCP](https://ai-powered.com/mcp/gmail-mcp-3): Gmail 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/microsoft-365-mail
