Give Claude Code Its Own Email Address with AgentPatch

Claude Code is your terminal-based coding agent. It reads files, writes code, runs checks. What it doesn’t have is an email identity. AgentPatch lets you claim an @mail.agentpatch.ai address for your agent — so it can send emails as itself, and receive replies.

Why This Matters

Most agent email setups are one-directional: the agent sends a message, and any replies go to your personal inbox. Giving your agent its own address makes two-way communication possible. Replies come back to the agent. It can check its inbox and act on what arrives.

For Claude Code, this is useful in scenarios where you want an automated workflow to be contactable: a CI summary that recipients can reply to, an outreach campaign where responses should be handled by the agent, or a project-specific email address that filters through your coding assistant.

Setup

Install the AgentPatch CLI (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Then use it:

ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Run this command to add AgentPatch as an MCP server:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.

Example

First, claim the address:

“Claim an email address for this project. Use something like myproject-bot.”

Claude Code calls the Claim Email Address tool and secures [email protected]. It reports the address back to you.

Now use it for outreach:

“Send a release notification to our beta list. Use the project’s email address as the sender. Include the CHANGELOG summary for v1.2.0.”

Claude Code reads the CHANGELOG, composes the message, and sends it from [email protected]. Replies from your beta users go back to that address.

Later:

“Check the project email inbox and summarize any replies we’ve received since yesterday.”

Claude Code calls the Check Inbox tool and gives you a summary of incoming messages. You can then respond to specific ones:

“Reply to the second email in the inbox. Thank them for the feedback and let them know we’ve filed a bug for the issue they mentioned.”

Wrapping Up

Giving Claude Code its own email address opens up two-way agent communication patterns. It’s one part of what AgentPatch adds — the same connection also provides YouTube transcripts, web search, image generation, and more. Visit agentpatch.ai to explore.