Local email connectivity for AI agents — read, draft, send, and organize Outlook mail via MCP
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Agent Email.
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
English | Español | ç®€ä½“ä¸æ–‡ | Português (Brasil) | Deutsch
email-agent-mcp by UseJunior -- local email connectivity for AI agents.
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.
The interactive setup wizard walks you through OAuth configuration and mailbox selection.
list_emails, read_email, search_emails, and get_threadcreate_draft, update_draft, send_draft, send_email, and reply_to_emaillabel_email, mark_read, and move_to_folderThe current launch-prep pass was validated against a real Outlook mailbox for read, draft, send, categorize, move, and read-state flows.
AI agents need to read, reply to, and act on email, but email APIs are complex. OAuth flows, Graph delta queries, Gmail push subscriptions, HTML-to-markdown conversion, threading semantics -- each provider has its own quirks.
Agent Email wraps this complexity into deterministic MCP tools with security guardrails:
Add to ~/.claude/settings.json or your project .claude/settings.json:
Add an mcp block to ~/.openclaw/openclaw.json:
Version note: The
mcpconfig key requires OpenClaw app >= 2026.3.24. If the CLI is older than the app, it may reject this key during validation even though the gateway accepts it. Update the CLI withnpm install openclaw@latestin your NemoClaw directory, or restart the gateway directly withlaunchctl kickstart -k gui/501/ai.openclaw.gateway.
The watcher polls your mailbox and sends wake signals to OpenClaw when new email arrives:
The watcher requires at least one configured mailbox. Run npx email-agent-mcp or npm run dev:configure first to complete the OAuth flow.
Before recording a demo, run the live smoke script against a real mailbox and a safe send allowlist. The script exercises:
get_mailbox_statuslist_emails + read_emailmark_read unread -> read -> unreadlabel_email on a safe inbox candidatecreate_draftreply_to_emailsend_emailExample:
Default safe-candidate selection looks for notifications@github.com in the inbox so you can rehearse the recording flow on a public-safe message instead of customer mail.
If your mailbox status name is not an email address, pass --reply-sender <email> or set EMAIL_AGENT_MCP_REPLY_SENDER so the script can find a self-sent message for the draft-reply check.
Set EMAIL_AGENT_MCP_SCOPE_PROFILE before configuring and starting the server to
choose the permissions exposed to an agent. The default is full for backward
compatibility.
| Profile | Microsoft delegated scopes | Exposed tools |
|---|---|---|
observe | Mail.Read, User.Read, offline_access | Read-only email tools, minus list_inbox_rules (see below) |
full (default) | Mail.Read, Mail.ReadWrite, Mail.Send, MailboxSettings.ReadWrite, User.Read, offline_access | All tools |
For an observation-only deployment, set the profile for both configuration and runtime so the OAuth consent and MCP tool list agree:
observe's scopes are a deliberate strict subset of full's. That is what
makes the profile adoptable: a tenant that has already consented to the full set
grants observe silently, so switching full → observe needs no new consent.
Switching observe → full does require a new interactive consent, because it
asks for scopes that were never granted.
For the same reason observe does not expose list_inbox_rules. Graph gates
/mailFolders/inbox/messageRules behind MailboxSettings, and Entra treats
MailboxSettings.Read as a distinct scope from full's
MailboxSettings.ReadWrite rather than implied by it. Requesting it would break
the subset property and force a fresh consent on every observe deployment — an
admin-approval request in tenants that restrict user consent. Use full if you
need inbox-rule visibility.
An invalid profile value stops startup instead of silently granting broader access. If cached credentials do not cover the profile's scopes, the server fails fast with an actionable error rather than blocking on an interactive sign-in.
observe does and does not guaranteeobserve always removes the write tools from the MCP tool surface, so an agent
cannot invoke them. That part holds everywhere.
It only narrows the OAuth token on a mailbox that has not already consented
to the write scopes. Entra issues an access token carrying every scope the user
or tenant has already consented to for that application — not just the subset
requested at token-acquisition time. So if you point observe at a mailbox
previously configured as full, the underlying token still carries
Mail.ReadWrite and Mail.Send; only the tool surface is reduced.
For a genuine least-privilege token, consent to observe from a mailbox that
has never been granted the write scopes — a fresh configure against an app
registration whose delegated permissions stop at Mail.Read/User.Read. Treat
the tool-surface reduction as defense in depth, not as an OAuth boundary, unless
you control the grant.
The full profile exposes 26 MCP tools; observe omits every tool whose action
is marked as mailbox-mutating:
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agent-email)<a href="https://allmcps.com/mcp/agent-email"><img src="https://allmcps.com/api/badge/agent-email?style=directory" alt="Agent Email on AllMCPs" /></a>