Mail-MCP

v0.2.2
io.github.Rixtayz/mail-mcp Checked 3 days ago Published 17 days ago

Personal Outlook (Outlook.com, Hotmail, Live, MSN): read, search, file, delete, unsubscribe.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

mail_list_folders List folders

List every folder of the personal Outlook mailbox with its path, total message count and unread count. Call it before filing messages to learn which folders exist. Other tools accept a folder by display name ("Invoices"), by path ("Archive/2024"), by well-known name (inbox, deleteditems, junkemail, archive) or by id.

mail_create_folder Create folder

Create an Outlook folder (at the root or under a parent). Idempotent: if a folder with the same name already exists it is returned without error. Example: { name: "Newsletters" } or { name: "2025", parent: "Invoices" }.

ParameterTypeDescription
name *stringName of the folder to create
parentstringParent folder (name, path or id). Root if omitted.

mail_get_message Read a message

Return the full content of one message (body converted to text, recipients, attachment flag, web link) plus the unsubscribe options found in its headers (https, mailto, one-click). The body is truncated at 25,000 characters.

ParameterTypeDescription
id *stringMessage id (from mail_search or mail_senders_summary)

mail_senders_summary Summary by sender

KEY TOOL FOR TRIAGE. Scans a whole folder (Inbox by default) and aggregates messages by sender: count, unread, latest message, and for the `top` senders the unsubscribe method mail_unsubscribe would use: one-click, browser (a link to open), mailto (a link the user sends from their own mail app) or none. Sorted by volume. The scan is cached for the session. Follow up with mail_unsubscribe(lastMessageId) and mail_bulk_by_sender(address).

ParameterTypeDescription
folderstringFolder to analyse. Default: inbox
sincestringOnly count messages received since this date
topintegerNumber of senders to return (max 200)

mail_move Move messages

Move one or more messages (up to 500 ids) to a folder (name, path or id). Used for filing. NOTE: Outlook assigns a new id to every moved message; the `moved` result maps old id → new id. To move every message from a sender, prefer mail_bulk_by_sender.

ParameterTypeDescription
folder *stringDestination folder
ids *arrayMessage ids (1 to 500)

mail_delete Delete messages

Delete one or more messages (up to 500 ids). By default messages go to Deleted Items (recoverable with mail_search folder=deleteditems then mail_move; their id changes). `permanent: true` deletes irreversibly: only use it when the user explicitly asks for it.

ParameterTypeDescription
ids *arrayMessage ids (1 to 500)
permanentbooleantrue = permanent deletion (irreversible). Default: Deleted Items.

mail_bulk_by_sender Bulk action by sender

Move or delete EVERY message from a sender (exact address) in a folder (Inbox by default). Use `dryRun: true` first to learn how many messages match. Deletion goes to Deleted Items unless `permanent: true`.

ParameterTypeDescription
action *stringmove = move to targetFolder; delete = delete
from *stringExact sender address
dryRunbooleantrue = count only, change nothing
folderstringSource folder. Default: inbox
permanentbooleanWith action = delete: permanent deletion
targetFolderstringRequired when action = move

mail_unsubscribe Unsubscribe

Try to unsubscribe from the mailing list of a message, in order: (1) RFC 8058 one-click HTTPS POST (`method: "one-click"`, done); (2) otherwise `method: "browser"` with the URL to open in a browser, plus `mailtoUrl` when the sender also lists an email address; (3) `method: "mailto"` when the sender only accepts email: `mailtoUrl` is a link that opens a pre-filled message in the user's own mail app, and the user presses Send; (4) `method: "none"` when no header exists. This tool never sends email. Deletes nothing. Preferably pass the `lastMessageId` returned by mail_senders_summary.

ParameterTypeDescription
id *stringId of a representative message of the newsletter

mail_login Sign in to Outlook

Sign the user in to their personal Outlook mailbox. Call it when any other tool answers "Not signed in" or that the sign-in has expired. It opens a Microsoft sign-in page in the user's browser and waits for them to finish. If the result is "pending", ask the user to complete the sign-in in their browser, then call mail_login again. It asks for access to read and organize mail only: it never asks for permission to send email. Safe to call when already signed in.

mail_logout Sign out of Outlook

Sign the user out: removes the sign-in stored on this computer. Mail tools stop working until mail_login is called again. The result includes a link where the user can also withdraw Mail-MCP's access on Microsoft's side.