AI Agents & MCP4 min read

How to Give Claude Code an Email Address Using MCP

Equip Claude Code with its own programmatic email inbox in 30 seconds using Gork Mail's Model Context Protocol (MCP) server. Send, receive, search, and reply.

Sep 24, 2026
4 min read

To give Claude Code an email address, run claude mcp add gork -- npx -y -p @gork/sdk gork-mcp --api-key=$GORK_API_KEY. Claude Code connects over stdio to Gork Mail, gaining 13 native email tools to create inboxes, read incoming messages, search threads, and send replies directly from your terminal.


Why Claude Code Needs Email

Claude Code is an autonomous coding agent operating in your local terminal. While it excels at reading code, running tests, and submitting git commits, modern engineering tasks frequently require email identity:

  1. Automated SaaS Provisioning: Registering test accounts on services (Supabase, Stripe test mode, SendGrid) requires receiving 6-digit confirmation codes.
  2. Alert Notifications: Claude Code can email you or your team when long-running test suites or benchmark migrations complete.
  3. Receiving Error Reports & Webhooks: You can forward incoming user crash reports directly to Claude Code's inbox for triage and reproduction.

Step 1: Add the Gork Mail MCP Server to Claude Code

Ensure you have a free Gork Mail API key. In your terminal, run:

text
claude mcp add gork -- npx -y -p @gork/sdk gork-mcp --api-key=gork_live_YOUR_KEY

Alternatively, you can edit your Claude Code configuration directly (~/.claude/claude.json or project-level .claude.json):

text
{
  "mcpServers": {
    "gork": {
      "command": "npx",
      "args": ["-y", "-p", "@gork/sdk", "gork-mcp"],
      "env": {
        "GORK_API_KEY": "gork_live_YOUR_KEY"
      }
    }
  }
}

Once installed, Claude Code automatically discovers the 13 Gork Mail tools:

  • gork_create_inbox — provisions a new address under your custom domain (e.g. stripe.com, apple.com, cloudflare.com).
  • gork_read_emails — reads messages in an inbox.
  • gork_search_emails — full-text search across subject, body, and sender.
  • gork_get_thread — pulls the complete conversation thread in order.
  • gork_send_email — sends an email from the agent's address.
  • gork_reply_email — replies within an existing RFC 5322 thread.

Step 2: Test Claude Code's Email Capabilities

Launch Claude Code in your terminal:

text
claude

Prompt Claude Code to provision its inbox and send a test message:

"Create an email inbox for yourself called test-bot at stripe.com and send an email to team@example.com with the subject 'Hello from Claude Code'."

Claude Code will call gork_create_inbox with username: "test-bot" and domain: "stripe.com" to receive test-bot@stripe.com, followed by gork_send_email.


Step 3: Handling Verification Codes & Inbound Emails

When Claude Code signs up for a service, ask it:

"Check your inbox for the latest verification code from Supabase and print the 6-digit number."

Claude Code uses gork_search_emails with the query "verification code", reads the message text body, extracts the OTP digits, and continues its automation workflow without human intervention.


Deliverability & Loop Protection

When agents handle email, runaway recursive loops (two bots replying to each other forever) can destroy sender reputation.

Gork Mail provides built-in server-side guardrails:

  • Free Tier Cap: 50 sends/day limit so an accidental script loop never burns your quota.
  • Tripwire: Pauses workspaces if 50 new recipients are messaged within 10 minutes.
  • Suppression Lists: Automatic suppression of hard bounces and complaints.

Get Started in 30 Seconds

Equip your AI assistants with real email infrastructure today:

  • Free Plan: 2 inboxes, 1,000 emails/month included.
  • Full MCP & REST API: Native support for Claude Code, Cursor, Windsurf, LangChain, and Python.

Create your free Gork Mail account and connect your agent in minutes.

Gork Mail Programmable Email Infrastructure

Ready to give your AI agent an email address?

Real inboxes, conversation threads, search, and native MCP tools. Deploy your first inbox in seconds.

More Engineering Guides

View all articles