CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Agent Email

usejunior/email-agent-mcp
3STDIOregistry active
Summary

Gives Claude direct access to your Outlook or Gmail inbox over MCP stdio. You get list, read, search, and thread operations plus create_draft, send_email, reply_to_email, label, mark_read, and move_to_folder. Send operations are allowlist gated by default and delete is disabled unless you explicitly opt in. Ships with an OAuth setup wizard and works with Claude Code, Cursor, Gemini CLI, and OpenClaw. The repo includes a polling watcher that triggers OpenClaw wake signals on new mail. Built by UseJunior, uses Microsoft Graph for Office 365 and Gmail API with refresh token flow.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Agent Email

npm version npm downloads License: Apache-2.0 CI codecov GitHub stargazers Tests: Vitest OpenSpec Traceability Socket Badge install size

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.

Quick Start

npx -y email-agent-mcp

The interactive setup wizard walks you through OAuth configuration and mailbox selection.

What Works Today

  • Microsoft 365 / Outlook mailbox access through MCP stdio
  • list_emails, read_email, search_emails, and get_thread
  • create_draft, update_draft, send_draft, send_email, and reply_to_email
  • label_email, mark_read, and move_to_folder
  • send allowlists, delete disabled by default, and sanitized errors

The current launch-prep pass was validated against a real Outlook mailbox for read, draft, send, categorize, move, and read-state flows.

Why This Exists

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:

  • 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

Use with Claude Code

Add to ~/.claude/settings.json or your project .claude/settings.json:

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

Use with Cursor

// .cursor/mcp.json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": ["-y", "email-agent-mcp"]
    }
  }
}

Use with Gemini CLI

gemini extensions install https://github.com/UseJunior/email-agent-mcp

Use with OpenClaw

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 mcp config 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 with npm install openclaw@latest in your NemoClaw directory, or restart the gateway directly with launchctl kickstart -k gui/501/ai.openclaw.gateway.

Email watcher

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.

Launch Prep Smoke Test

Before recording a demo, run the live smoke script against a real mailbox and a safe send allowlist. The script exercises:

  • get_mailbox_status
  • list_emails + read_email
  • mark_read unread -> read -> unread
  • label_email on a safe inbox candidate
  • create_draft
  • draft-only reply_to_email
  • optional send_email

Example:

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.

Tool Reference

Agent Email exposes 15 MCP tools:

ToolDescriptionType
list_emailsList recent emails with filteringread
read_emailRead full email content as markdownread
search_emailsFull-text search across mailboxesread
get_mailbox_statusConnection status and warningsread
get_threadFull conversation contextread
send_emailSend new email (allowlist-gated)write
reply_to_emailReply within thread (allowlist-gated on send)write
create_draftCreate email draftwrite
update_draftUpdate draft contentwrite
send_draftSend a saved draftwrite
label_emailApply labels/categorieswrite
flag_emailFlag/unflag emailswrite
mark_readMark as read/unreadwrite
move_to_folderMove between folderswrite
delete_emailDelete (requires operator env + caller flag)destructive

Outbound attachments

send_email, reply_to_email, create_draft, and update_draft accept an optional attachments array. Each entry takes a sandboxed file path (read relative to EMAIL_MCP_SAFE_DIR, default the process working directory) or inline base64, plus optional filename / mimeType overrides:

{
  "to": "alice@example.com",
  "subject": "Signed agreement",
  "body": "Attached as requested.",
  "attachments": [
    { "path": "./out/agreement.pdf" },
    { "base64": "iVBORw0KGgo...", "filename": "screenshot.png" }
  ]
}

Files are capped at 25MB each; Microsoft Graph additionally caps inline sends at ~3MB total (larger files need an upload session — not yet supported). For update_draft, omitting attachments preserves the draft's existing files; passing an array (even empty) replaces them.

Provider Support

ProviderStatusPackage
Microsoft 365 (Graph API)Fully supported@usejunior/provider-microsoft
GmailSupported 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.

Security Defaults

Agent Email ships with restrictive defaults that you loosen as needed:

  • Send allowlist: empty by default -- agents cannot send email until you add recipients
  • Receive allowlist: accepts all by default -- controls which senders trigger the watcher
  • Delete disabled: agents cannot delete email by default. Two gates must both be satisfied:
    1. operator sets AGENT_EMAIL_DELETE_ENABLED=true in the email-agent-mcp process environment (and AGENT_EMAIL_HARD_DELETE_ENABLED=true for permanent deletion). Restart required after change.
    2. the caller passes user_explicitly_requested_deletion: true on the tool call.
  • Error sanitization: API keys, file paths, and stack traces are redacted from error responses
  • Body file sandboxing: no ../ traversal, no symlinks, binary detection

Packages

PackageDescription
@usejunior/email-coreCore email actions, content engine, security, and provider interfaces
@usejunior/email-mcpMCP server adapter, CLI, and watcher
@usejunior/provider-microsoftMicrosoft Graph API email provider
@usejunior/provider-gmailGmail API email provider
email-agent-mcpDistribution wrapper (npx email-agent-mcp)

Quality and Trust Signals

  • CI runs on every pull request and push to main (lint, typecheck, tests on Node 20 + 22)
  • CodeQL and Semgrep security scanning
  • Coverage published to Codecov
  • OpenSpec traceability enforcement via npm run check:spec-coverage
  • 300+ tests across the suite
  • Maintainer: Steven Obiajulu

Architecture

email-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

Releasing

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.

FAQ

Does this work with Claude Code?

Yes. Run npx email-agent-mcp to start the MCP server, then configure it in your Claude Code settings.

Can agents send email without my permission?

No. The send allowlist is empty by default. Agents cannot send any email until you explicitly configure allowed recipients.

Does this store my email credentials?

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.

Can I connect multiple mailboxes?

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 rejects my config with "Unrecognized key: mcp"

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.

The watcher starts but finds zero mailboxes

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.

OpenClaw says "Demo mode -- run email-agent-mcp configure to connect"

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.

Token expired after a week even though I just authenticated

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.

OpenClaw Telegram bot receives messages but doesn't respond

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.

Development

npm ci
npm run build
npm run lint --workspaces --if-present
npm run test:run
npm run check:spec-coverage

See Also

  • Safe DOCX Suite -- surgical editing of Word documents with coding agents
  • Open Agreements -- fill standard legal templates with coding agents

Privacy

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.

Governance

  • Contributing Guide
  • Code of Conduct
  • Security Policy
  • Changelog
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Categories
AI & LLM ToolsCommunication & Messaging
Registryactive
Packageemail-agent-mcp
TransportSTDIO
UpdatedMay 23, 2026
View on GitHub

Related AI & LLM Tools MCP Servers

View all →
SkillFM LLM Cost Optimizer

io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage

LLM cost optimizer for OpenAI, Anthropic, token usage, BYOK, and SkillFM Beacon audits.
Llm Orchestration Agent

io.github.mikerawsonnz/llm-orchestration-agent

Run a prompt through a LangChain (system + human) chain over Gemini on Vertex AI; optional LangSmith
Authenticated Llm Agent

io.github.mikerawsonnz/authenticated-llm-agent

JWT-gated LLM gateway: authenticate (bcrypt/JWT), then run a LangChain-on-Vertex Gemini completion.
Copilot Memory MCP

labforgedev/copilot-memory-mcp

Persistent semantic memory for AI agents using local ChromaDB vector search. No cloud required.
1
Agent Prompt Injection Firewall Mcp

csoai-org/agent-prompt-injection-firewall-mcp

The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Authenticated Multi Llm Agent

io.github.mikerawsonnz/authenticated-multi-llm-agent

Google-OAuth-gated LLM gateway: verify a Google ID token, then run a Gemini (Vertex AI) completion f