Email Agent MCP Server

Local email connectivity for AI agents — MCP server for Microsoft 365 and manual-token Gmail setup

Remote serverstreamable-httpTypeScript

What is the Email Agent MCP Server?

Local email connectivity for AI agents — MCP server for Microsoft 365 and manual-token Gmail setup

What the server does

Agent Email is an open-source TypeScript MCP server that lets Claude Code, Cursor, Gemini CLI, OpenClaw, and other MCP-compatible runtimes read email, search threads, draft replies, label messages, change read state, move messages, and send mail through your own mailbox. Microsoft 365 / Outlook and Gmail are supported today. Security-first defaults mean agents cannot send email until you explicitly configure an allowlist.

  • send and receive allowlists that control who agents can contact
  • delete disabled by default (requires explicit opt-in)
  • error sanitization that strips API keys, file paths, and stack traces
  • body file sandboxing with path traversal protection

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
bodyFormatalways present: markdown, html, or text. You get text
bodyTruncatedpresent and true only if the body exceeded the 256 KB
ProfileMicrosoft delegated scopes
observeMail.Read, User.Read, offline_access
list_emailsList recent emails with filtering
read_emailRead full email content as markdown, or raw HTML with format: "html"
search_emailsFull-text search across mailboxes
list_mailboxesEnumerate configured mailboxes, their status, and the default
get_mailbox_statusConnection status and warnings
get_threadFull conversation context
list_attachmentsList attachment metadata for an email
download_attachmentDownload a file attachment as base64, or save it to a sandboxed directory with save_to
download_messageSave a whole message as a raw .eml file to a sandboxed directory
send_emailSend new email (allowlist-gated)
reply_to_emailReply within thread (allowlist-gated on send)
create_draftCreate email draft
update_draftUpdate draft content
send_draftSend a saved draft
list_scheduled_sendsList pending provider-held scheduled sends (Microsoft 365)
cancel_scheduled_sendCancel a pending scheduled send (Microsoft 365)
label_emailApply labels/categories
flag_emailFlag/unflag emails
mark_readMark as read/unread
move_to_folderMove between folders
delete_emailDelete (requires operator env + caller flag)
list_foldersRecursively list folders and computed paths (Microsoft 365)
create_folderCreate a custom child folder (Microsoft 365)
delete_folderDelete a custom folder (requires operator env + caller flag); system folders are protected (Microsoft 365)
list_inbox_rulesList server-side inbox rules (Microsoft 365)
create_inbox_ruleCreate a persistent safe inbox rule; forwarding, redirection, deletion, and discarding to Deleted Items are blocked (Microsoft 365)
delete_inbox_ruleDelete a server-side inbox rule (requires operator env + caller flag) (Microsoft 365)
contract.pdfEMAIL_MCP_SAFE_DIR (default: cwd)

How to install the Email Agent MCP Server

{
  "mcpServers": {
    "email-agent-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Email Agent MCP to get mailbox status.”
  • “Use Email Agent MCP to create draft.”
  • “Use Email Agent MCP to bodyFormat.”

Frequently asked questions

Local email connectivity for AI agents — MCP server for Microsoft 365 and manual-token Gmail setup Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.