Microsoft 365 Mail

v0.4.5
io.github.mindstone/mcp-server-microsoft-mail Checked 2 days ago Published 10 hours ago

Microsoft 365 Outlook mail via Graph: read, search, send, reply, forward, draft, move, delete.

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

authenticate_microsoft_account

Connect a Microsoft 365 account to enable email, calendar, files, and Teams access. Call this tool when: 1. Other Microsoft tools return authentication errors 2. The user asks to connect or set up Microsoft 365 This tool returns a structured auth_required response. The host will recognise it and dispatch the desktop OAuth flow. After the user completes sign-in, Microsoft 365 tools become available.

list_emails

List emails from inbox or a specific folder. Returns subject, sender, date, and preview.

ParameterTypeDescription
filterstringOData filter expression (e.g., "isRead eq false")
folderstringWell-known folder name (inbox, sentitems, drafts, deleteditems, junkemail, archive, outbox), display name (e.g. "Sent Items"), or folder ID from list_folders. Default: Inbox.
topnumberNumber of emails to return (default: 25, max: 100)

get_email

Get full email content including body by message ID.

ParameterTypeDescription
idstringEmail message ID

get_conversation

List all messages in an email thread (conversation), oldest first. Provide a message ID from list_emails/search_emails or a conversationId.

ParameterTypeDescription
conversationIdstringGraph conversation ID, if already known
idstringAny message ID in the thread; its conversationId is resolved automatically
topnumberNumber of messages to return (default: 25, max: 100)

list_attachments

List attachments on an email message. Returns attachment IDs, names, types, and sizes. Use download_attachment to save one locally.

ParameterTypeDescription
idstringEmail message ID

download_attachment

Download an email attachment and save it into the workspace (MCP_WORKSPACE_PATH, or the OS temp directory when unset). Use list_attachments to find attachment IDs. The file is written inside a fresh private staging directory created under the workspace root, and the reported savedTo path points there.

ParameterTypeDescription
attachmentIdstringAttachment ID from list_attachments
idstringEmail message ID

send_email

Send a new email now, from the user's mailbox to everyone in "to", "cc" and "bcc"; a copy is saved to Sent Items. This tool cannot recall it after sending. To save it without sending, use create_draft; to let the user review and edit it first, use compose_email. "to", "cc", and "bcc" accept a string or an array of strings. Prefer arrays for multiple recipients (e.g. ["alice@example.com"]).

ParameterTypeDescription
bccBCC recipient(s)
bodystringEmail body (HTML supported)
ccCC recipient(s)
importancestringEmail importance
subjectstringEmail subject
toRecipient email address(es). Use an array: ["alice@example.com"]

compose_email

Open an inline editable email compose form before sending. Use this when the user wants to write or send an email, so they can review and edit the draft first. Do NOT use when the user asks to save a draft (use create_draft). This tool does not send the email directly.

ParameterTypeDescription
body *stringEmail body
subject *stringEmail subject
to *arrayRecipient email address(es), e.g. ["alice@example.com"]
bccBCC recipient(s)
ccarrayCC recipient(s)

search_emails

Search emails using Microsoft Search query syntax.

ParameterTypeDescription
querystringSearch query (e.g., "from:john subject:meeting")
topnumberNumber of results (default: 25)

reply_to_email

Send a reply now to the sender of an email (or the Reply-To address, if the email has one), or with replyAll also to the original To and Cc recipients; a copy is saved to Sent Items. This tool cannot recall it after sending. To save a reply without sending it, use create_reply_draft.

ParameterTypeDescription
bodystringReply body (HTML supported)
idstringOriginal email message ID
replyAllbooleanAlso send the reply to the original To and Cc recipients (default: false: only the sender, or the Reply-To address if the email has one)

forward_email

Forward an email now to the "to" recipients, with its original content and attachments and an optional comment; a copy is saved to Sent Items. This tool cannot recall it after sending.

ParameterTypeDescription
commentstringOptional comment added above the forwarded email
idstringEmail message ID to forward
toRecipient(s) to forward to

delete_email

Delete an email. By default it is moved to Deleted Items, where the user can restore it. With permanent: true it is deleted with Microsoft's delete request instead of being moved to Deleted Items. Microsoft may still keep it for a time (in Deleted Items or its recoverable items), so this is not a guaranteed permanent erase. Nobody else is notified.

ParameterTypeDescription
idstringEmail message ID
permanentbooleanDelete it with Microsoft's delete request instead of moving it to Deleted Items; not a guaranteed permanent erase (default: false)

list_folders

List mail folders (Inbox, Sent, Drafts, etc.). Returns folder IDs that can be used with list_emails and move_email.

ParameterTypeDescription
includeHiddenbooleanInclude hidden folders (default: false)

move_email

Move an email to a different folder in the user's mailbox. Nobody else is notified, and it can be moved back.

ParameterTypeDescription
destinationFolderstringWell-known folder name (inbox, sentitems, drafts, deleteditems, junkemail, archive, outbox), display name, or folder ID from list_folders
idstringEmail message ID

create_reply_draft

Create a draft reply to an existing email, threaded in the same conversation. Nothing is sent: the draft is saved in Drafts, where the user can review it in Outlook, and only send_draft sends it.

ParameterTypeDescription
bodystringReply body (HTML supported). If omitted, creates a blank reply draft.
idstringOriginal email message ID to reply to
replyAllbooleanReply to all recipients (default: false)

create_draft

Create a new standalone draft email. Nothing is sent: it is saved in Drafts, and only send_draft sends it. For replying to an existing thread, use create_reply_draft instead.

ParameterTypeDescription
bccBCC recipient(s)
bodystringEmail body (HTML supported)
ccCC recipient(s)
subjectstringEmail subject
toRecipient email address(es)

mark_email_read

Mark an email as read or unread in the user's mailbox. Nobody else is notified, and it can be changed back.

ParameterTypeDescription
idstringEmail message ID
isReadbooleantrue to mark as read, false to mark as unread (default: true)

set_email_flag

Flag an email for follow-up, mark a follow-up complete, or clear the flag, in the user's mailbox. Nobody else is notified, and it can be changed back.

ParameterTypeDescription
flagstringFollow-up state: "flagged" (flag for follow-up), "complete" (mark done), "notFlagged" (clear the flag)
idstringEmail message ID

send_draft

Send an existing draft email now (created by create_draft or create_reply_draft) to the recipients saved on the draft; it moves to Sent Items. This tool cannot recall it after sending.

ParameterTypeDescription
idstringDraft message ID (draftId from create_draft)

update_draft

Update an existing draft email. Only the provided fields are changed (subject, body, to, cc, importance). Nothing is sent; use send_draft to send it afterwards.

ParameterTypeDescription
bodystringNew email body (HTML supported)
ccReplace the CC recipient list
idstringDraft message ID (draftId from create_draft)
importancestringEmail importance
subjectstringNew email subject
toReplace the recipient list

get_automatic_replies

Read the current out-of-office (automatic replies) configuration: status, internal/external messages, and schedule. Requires the MailboxSettings.Read permission.

set_automatic_replies

Turn out-of-office (automatic replies) on, off, or schedule it. While it is on, people who email the user get the reply message automatically: everyone inside the organization, and people outside it as externalAudience says. Only the settings given are changed; any left out keep their current values. It can be changed again by calling this tool. Status "scheduled" requires scheduledStart and scheduledEnd. Requires the MailboxSettings.ReadWrite permission.

ParameterTypeDescription
externalAudiencestringWho outside the organization receives the external reply; left out, the current setting stays as it is
externalReplyMessagestringReply sent to people outside the organization (HTML supported)
internalReplyMessagestringReply sent to people inside the organization (HTML supported)
scheduledEndstringEnd of the scheduled window as an ISO 8601 date-time (e.g. "2026-08-14T18:00:00Z"); explicit offsets are converted to UTC, zone-less values are treated as UTC
scheduledStartstringStart of the scheduled window as an ISO 8601 date-time (e.g. "2026-08-10T09:00:00Z"); explicit offsets are converted to UTC, zone-less values are treated as UTC
statusstring"alwaysEnabled" turns automatic replies on until changed, "scheduled" turns them on between scheduledStart and scheduledEnd, "disabled" turns them off