Back to Browse

Agentmail MCP Server

by Uriva
Developer ToolsLow Risk10.0MCP RegistryRemote
Free

Server data from the Official MCP Registry

Open-source (MIT) email inboxes for AI agents with scoped keys, webhooks & AI spam guard.

About

Open-source (MIT) email inboxes for AI agents with scoped keys, webhooks & AI spam guard.

Remote endpoints: streamable-http: https://api.theagentmail.net/mcp

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.

8 tools verified · Open access · No issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Found in Source Code

Found by scanning the linked source code. This listing connects to a hosted endpoint, so none of this runs on your machine: it describes what the server software does where it is hosted.

HTTP Network Access

Connects to external APIs or services over the internet.

How to Connect

Remote Plugin

No local installation needed. Your AI client connects to the remote endpoint directly.

Add this to your MCP configuration to connect:

{
  "mcpServers": {
    "net-theagentmail-agentmail": {
      "url": "https://api.theagentmail.net/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

This server needs this header. Replace each <YOUR_...> placeholder with your own value:

  • Authorization (required): Bearer API key from https://theagentmail.net/app (format: Bearer am_...)

Documentation

View on GitHub

From the project's GitHub README.

AgentMail (theagentmail.net)

mcptry

Open-source (MIT) email infrastructure for AI agents. Give every agent its own @theagentmail.net mailbox with sending, receiving, real-time webhooks, attachments, and a real-time AI spam/phishing guard — $1/month per mailbox (first mailbox free for 30 days) or self-host on Cloudflare Workers.

Why AgentMail?

FeatureAgentMail (theagentmail.net)agentmail.toDIY (Gmail / own domain)
License100% Open Source (MIT)Closed sourceVaries
Self-hostableYes (Cloudflare Workers)NoManual DNS + SMTP/IMAP
Pricing$1/mo per mailbox ($5 prepaid, never expires)$200/mo Startup (150 inboxes) + $2/extraDomain + email host + warmup
Outbound spam guardReal-time AI spam & phishing filterAccount-levelNone
Agent integrationREST API, webhooks, /llms.txt, OpenCode skillSDK + REST APIIMAP/SMTP boilerplate

Connect via Remote MCP or AgentSkill (Claude Code / Hermes / OpenClaw / Cursor)

Zero npm packages or local bridge required — connect any Streamable HTTP MCP client directly to https://api.theagentmail.net/mcp (published in the Official MCP Registry as net.theagentmail/agentmail):

claude mcp add --transport http agentmail https://api.theagentmail.net/mcp \
  --header "Authorization: Bearer $AGENTMAIL_KEY"

Or install the standard AgentSkill for Hermes Agent, OpenClaw, Claude Code, Cursor, or OpenCode:

npx skills add uriva/agentmail --skill theagentmail

30-Second Quickstart

Create a mailbox with your org key (from theagentmail.net/app):

curl -X POST https://api.theagentmail.net/v1/accounts \
  -H "Authorization: Bearer $AGENTMAIL_ORG_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address": "deploy-bot"}'

Send an email with a scoped account key (zero dependencies):

await fetch("https://api.theagentmail.net/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AGENTMAIL_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    to: ["you@company.com"],
    subject: "Deploy succeeded",
    text: "All checks green.",
  }),
});

Or hand any coding agent (Claude Code, OpenCode, Cursor, OpenClaw) your scoped key and https://theagentmail.net/llms.txt — it can read the entire spec and wire up sending, inbox polling, and signed webhooks automatically.

Architecture

  • Runtime & Hosting: Deno locally, bundled to Cloudflare Workers (wrangler.jsonc) serving both https://theagentmail.net and https://api.theagentmail.net
  • Database: InstantDB (@instantdb/admin)
  • Email provider: Resend (outbound sending + inbound webhook at POST /inbound)
  • Spam & phishing protection: Real-time outbound and inbound classification (src/services/emailGuard.ts)
  • Billing & verification: Stripe (prepaid balance checkout) and Twilio Verify (trial phone verification)
  • File storage: Google Cloud Storage (agentmail-attachments)
  • Frontend: Preact + Vite (web/)
  • TypeScript SDK: sdk/
  • Analytics: PostHog

Self-Hosting Setup

Configure .env with the required credentials:

VariableDescription
INSTANT_APP_IDInstantDB app ID (VITE_INSTANT_APP_ID for frontend)
INSTANT_ADMIN_TOKENInstantDB admin token
RESEND_API_KEYResend API key for sending and fetching inbound emails
INBOUND_WEBHOOK_SECRETResend inbound webhook Svix secret
EMAIL_DOMAINDomain for mailboxes (default: theagentmail.net)
GCP_PROJECTGoogle Cloud project ID
GCP_STORAGE_BUCKETGCS bucket for attachments (default: agentmail-attachments)
GCP_SERVICE_ACCOUNT_KEYGCP service account key JSON
STRIPE_SECRET_KEYStripe secret key for balance top-ups
STRIPE_WEBHOOK_SECRETStripe webhook signing secret
TWILIO_ACCOUNT_SIDTwilio account SID for phone verification
TWILIO_AUTH_TOKENTwilio auth token (or TWILIO_API_KEY_SID / SECRET)
TWILIO_VERIFY_SERVICE_SIDTwilio Verify service SID
GEMINI_API_KEYGemini API key for real-time spam/phishing classification
POSTHOG_API_KEYPostHog API key (VITE_POSTHOG_KEY for frontend)

Development & Deployment

deno task dev           # Run API server locally on :8000 with watch mode
deno task dev:web       # Run frontend dev server
deno task check         # Type-check server and SDK
deno task test          # Run test suite
deno task build:web     # Build & prerender static frontend into web/dist
deno task build:worker  # Bundle Cloudflare Worker into dist/worker.js
deno task deploy        # Deploy worker + static assets via wrangler

License

MIT

Reviews

No reviews yet

Be the first to review this server!