MailcapSign up free

Install with your AI coding agent

Paste this into Claude Code, Cursor, Copilot, or any coding agent. It reads Mailcap’s own integration reference and wires up the right approach automatically — a fresh sendEmail() call for a new project, or a non-invasive client wrap if you already call a provider SDK directly.

# copy this into your agent
Integrate Mailcap (a hosted email-capture service for dev/staging) into this repository.

Read https://mailcap.dev/llms.txt first — it has the exact integration contract, env vars, and API shapes. Then:

1. Check whether this repo already sends email via a provider SDK directly (Mailgun, SendGrid, Resend, etc) at one or more call sites.
   - If NO existing call sites (or all sends already funnel through one local function): install @elevora-tech/mailcap and use its sendEmail() function directly. Point that one local function (or new call sites) at it.
   - If YES, existing direct provider calls at multiple call sites: do NOT rewrite those call sites. Install @elevora-tech/mailcap and wrap the client at its construction line only, using the matching wrapMailgunClient / wrapSendGridClient / wrapResendClient helper. Every existing call site keeps its exact original shape.
2. Add these env vars for local development (do not commit real values):
   MAILCAP_API_KEY=<get one by signing up at https://mailcap.dev/signup, creating a project, adding an environment, and generating a key>
   MAILCAP_URL=https://mailcap.dev
3. Leave production env vars alone — production should have MAIL_PROVIDER + that provider's real API key configured, and no MAILCAP_API_KEY, so it delivers real email unchanged.
4. Do not add any if/else, mode flag, or environment check around the send call — env vars alone must decide capture vs. real delivery.
5. After wiring it up, send a test email and confirm it can be found at https://mailcap.dev/inbox.

Connect an AI agent to your inbox

Once Mailcap is capturing email, point an AI agent at it directly — “did the OTP arrive for test@x.test” answered mid-session, no curl required. One server URL, set up differently per client below.

MCP server URL
https://mailcap.dev/api/mcp
Recommended

Claude.ai or Claude Desktop

  1. Open Settings → Connectors → Add custom connector
  2. Paste the server URL above and add it
  3. When it asks you to authorize, sign in with your Mailcap email + password and hit Approve

Claude Code (terminal)

claude mcp add --transport http mailcap https://mailcap.dev/api/mcp

Then run /mcp inside Claude Code to sign in when prompted.

API key (other clients, or headless/CI)

For clients that don’t support OAuth yet. Generate a key for an environment in that project’s Settings, then use the same server URL with the key as a Bearer token — scoped to just that one environment.

Authorization: Bearer mc_…