Server data from the Official MCP Registry
Local email connectivity for AI agents — read, draft, send, and organize Outlook mail via MCP
Local email connectivity for AI agents — read, draft, send, and organize Outlook mail via MCP
Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
10 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-usejunior-email-agent-mcp": {
"args": [
"-y",
"email-agent-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
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.
npx -y email-agent-mcp
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:
{
"mcpServers": {
"email-agent-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "email-agent-mcp"]
}
}
}
// .cursor/mcp.json
{
"mcpServers": {
"email-agent-mcp": {
"command": "npx",
"args": ["-y", "email-agent-mcp"]
}
}
}
gemini extensions install https://github.com/UseJunior/email-agent-mcp
Add an mcp block to ~/.openclaw/openclaw.json:
{
// ... existing config ...
mcp: {
servers: {
email: {
command: "npx",
args: ["tsx", "/path/to/email-agent-mcp/packages/email-mcp/src/serve-entry.ts"],
transport: "stdio"
}
}
}
}
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:
# Set the hooks token (must match hooks.token in openclaw.json)
export OPENCLAW_HOOKS_TOKEN="your-hooks-token"
# Start the watcher (defaults to http://localhost:18789/hooks/wake)
npm run dev:watch
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:
EMAIL_AGENT_MCP_HOME=/tmp/email-agent-mcp-live \
AGENT_EMAIL_SEND_ALLOWLIST=/tmp/email-agent-mcp-live/send-allowlist.json \
npm run launch:prep:smoke -- --live-write --send-to beta@usejunior.com
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.
Agent Email exposes 15 MCP tools:
| Tool | Description | Type |
|---|---|---|
list_emails | List recent emails with filtering | read |
read_email | Read full email content as markdown | read |
search_emails | Full-text search across mailboxes | read |
get_mailbox_status | Connection status and warnings | read |
get_thread | Full conversation context | read |
send_email | Send new email (allowlist-gated) | write |
reply_to_email | Reply with RFC threading | write |
create_draft | Create email draft | write |
update_draft | Update draft content | write |
send_draft | Send a saved draft | write |
label_email | Apply labels/categories | write |
flag_email | Flag/unflag emails | write |
mark_read | Mark as read/unread | write |
move_to_folder | Move between folders | write |
delete_email | Delete (requires opt-in) | destructive |
| Provider | Status | Package |
|---|---|---|
| Microsoft 365 (Graph API) | Fully supported | @usejunior/provider-microsoft |
| Gmail | Supported via interactive CLI OAuth or manual refresh-token setup | @usejunior/provider-gmail |
Use email-agent-mcp configure --provider gmail to run the local browser OAuth flow, or add a manual mailbox token file under ~/.email-agent-mcp/tokens/. See packages/provider-gmail/README.md.
Agent Email ships with restrictive defaults that you loosen as needed:
user_explicitly_requested_deletion: true../ traversal, no symlinks, binary detection| Package | Description |
|---|---|
@usejunior/email-core | Core email actions, content engine, security, and provider interfaces |
@usejunior/email-mcp | MCP server adapter, CLI, and watcher |
@usejunior/provider-microsoft | Microsoft Graph API email provider |
@usejunior/provider-gmail | Gmail API email provider |
email-agent-mcp | Distribution wrapper (npx email-agent-mcp) |
npm run check:spec-coverageemail-agent-mcp/
├── packages/
│ ├── email-core Core actions, content engine, security
│ ├── email-mcp MCP server adapter, CLI, watcher
│ ├── provider-microsoft Microsoft Graph provider
│ ├── provider-gmail Gmail API provider
│ └── email-agent-mcp Distribution wrapper (npx entry point)
├── openspec/ Spec-driven development
└── scripts/ CI and validation scripts
Tag-driven release via GitHub Actions with npm OIDC trusted publishing. All 5 packages publish in dependency order with --provenance, then server.json is published to the official MCP Registry with mcp-publisher.
Yes. Run npx email-agent-mcp to start the MCP server, then configure it in your Claude Code settings.
No. The send allowlist is empty by default. Agents cannot send any email until you explicitly configure allowed recipients.
OAuth tokens are managed by MSAL (Microsoft) and stored in your OS keychain or local config files under ~/.email-agent-mcp/. Agent Email never stores raw passwords.
Yes. You can configure Microsoft 365 and Gmail simultaneously. Read actions default to your primary mailbox; write actions require specifying a mailbox when multiple are configured.
The OpenClaw CLI and macOS app can be different versions. The app (which runs the gateway) may support config keys the CLI doesn't recognize yet. Update the CLI: cd ~/Projects/NemoClaw && npm install openclaw@latest. Alternatively, restart the gateway directly: launchctl kickstart -k gui/501/ai.openclaw.gateway.
Mailbox credentials are stored in ~/.email-agent-mcp/tokens/. If this directory is empty, run npx email-agent-mcp or npm run dev:configure to authenticate via OAuth. The watcher will exit with no mailboxes to poll until at least one is configured.
The MCP server is running but has no real mailbox credentials. Run npx email-agent-mcp to complete the interactive OAuth setup, then restart the OpenClaw gateway so the MCP server reconnects with valid tokens.
Microsoft refresh tokens typically last 90 days, but your Azure AD tenant may enforce shorter lifetimes. The code uses MSAL with OS keychain persistence (@azure/identity-cache-persistence), which handles silent token refresh automatically. If MSAL reports interaction_required or invalid_grant, re-run npx email-agent-mcp to re-authenticate. Common causes: conditional access policies, MFA re-verification requirements, or admin-configured token lifetime policies.
Verify the Telegram channel is healthy with openclaw status. If the channel shows OK but no responses come back, check that: (1) your Telegram user ID is in channels.telegram.allowFrom in openclaw.json, (2) a binding exists matching channel: "telegram", and (3) the gateway was restarted after config changes. For one-owner bots, use dmPolicy: "allowlist" with explicit allowFrom IDs rather than relying on pairing approvals.
npm ci
npm run build
npm run lint --workspaces --if-present
npm run test:run
npm run check:spec-coverage
Agent Email runs entirely on your local machine. Email credentials are stored in your OS keychain (MSAL) and local config files. No email content is sent to external servers by Agent Email itself.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.