Mail-MCP


A small, focused MCP server that lets Claude (Claude Desktop, Cowork, Claude Code or any MCP client) work on a personal Outlook mailbox (Outlook.com, Hotmail, Live or MSN address) through Microsoft Graph: read and search mail, file it into folders, delete it, and unsubscribe from newsletters. You install it, say "connect my Outlook", sign in with Microsoft in your browser, and that is all: no app registration, no terminal, no config file.
Built for one job: clean up an overflowing personal inbox with an AI assistant, safely.
Tools
Twelve tools, all prefixed mail_:
| Tool | What it does |
|---|
mail_login | Sign in through the browser (the assistant calls it when you are not signed in) |
mail_logout | Sign out and remove the sign-in stored on your computer |
mail_list_folders | Folder tree with total / unread counts |
mail_create_folder | Create a folder (idempotent) |
mail_search | List / search messages (sender, date range, unread, full text), paginated |
mail_get_message | Full content of one message, framed as untrusted, + detected unsubscribe options |
mail_senders_summary | Aggregate a folder by sender (up to 50,000 messages per call): volume, latest message, available unsubscribe method |
mail_move | Move up to 500 messages to a folder |
mail_delete | Move up to 500 messages to Deleted Items, where you can restore them |
mail_purge | Permanently delete up to 500 messages. Cannot be undone. The assistant is told to use it only when you ask for permanent deletion |
mail_bulk_by_sender | Move every message from one sender to a folder or to Deleted Items. A dry run unless called with dryRun: false |
mail_unsubscribe | RFC 8058 one-click POST, otherwise a link for the browser, otherwise a ready mailto: link you send from your own mail app. A suspicious link is blocked |
Design choices:
- Mail-MCP cannot send email. It does not ask Microsoft for the permission to send, and no tool sends a message. Even
mail_unsubscribe only hands you a link when a sender wants an email.
- Safe by default.
mail_delete moves messages to Deleted Items (visible and restorable in Outlook), and so does mail_bulk_by_sender with action: "delete". Permanent deletion is a tool of its own, mail_purge, so letting the assistant use mail_delete without asking does not let it delete anything permanently. mail_bulk_by_sender only counts the messages it would act on (matched) until it is called again with dryRun: false, and acts on at most 5,000 messages per call (capped: true means there are more).
- Efficient on big mailboxes.
mail_senders_summary scans thousands of messages in a few seconds (1,000-item pages, minimal $select) and only fetches headers for the top senders through $batch. One call scans at most 50,000 messages and reports how many in scanned; partial: true means the folder holds more, so the counts are lower bounds and some senders may be missing. Pass since to scan a shorter period.
- Every tool ships a strict input schema, an output schema and MCP annotations (
readOnlyHint, destructiveHint, …) so hosts can auto-approve read-only calls. mail_purge, mail_bulk_by_sender and mail_unsubscribe are marked destructive, and the tools that return email content are marked open-world.

Quick start: Claude Desktop
You need a personal Microsoft account (outlook.com, hotmail.com, live.com, msn.com). Work or school accounts are not supported.
- Download
mail-mcp-<version>.mcpb from the latest release.
- Double-click it and install the extension in Claude Desktop. Claude Desktop shows a warning before installing it: it shows that warning for every extension installed from a file.
- Tell Claude: "connect my Outlook". Your browser opens on a Microsoft sign-in page. Choose your account and accept.
Claude Code
Node.js 22 or newer is required.
claude mcp add --scope user --transport stdio mail -- npx -y @rixtay/mail-mcp