How to Send Emails from Claude Code
Claude Code can write email drafts, but it can’t send them. If you want an agent that completes the loop — drafts and delivers — you need an email tool. AgentPatch provides one that works directly through Claude Code’s MCP integration. No SMTP server, no third-party email provider setup, no credentials to manage.
Why This Matters
There are plenty of situations in a development workflow where sending an email is the right action: notifying a teammate when a deployment finishes, sending a summary of a code review, or triggering a follow-up after an automated check. Without an email tool, you’re the last step in the process.
With AgentPatch connected, Claude Code can send those emails on request. You stay in the terminal. The agent handles the send. Plain text and HTML are both supported.
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
You’re wrapping up a deployment and want to notify your team:
“Send an email to [email protected]. Subject: Deployment complete — v2.4.1 is live. Summarize what changed based on the CHANGELOG and keep it brief.”
Claude Code reads the CHANGELOG from your project, writes the email body, and sends it through AgentPatch. Your team gets the email. You didn’t open an email client.
Another example: you’ve just finished a code review session with Claude Code and want to share the findings.
“Send a code review summary to [email protected]. Include the main issues you found and the files that need attention.”
Claude Code composes the summary from its session context and sends it. The findings go out as an email without any copy-pasting on your part.
For automated tasks, this pattern works well:
“Run the test suite and if any tests fail, send me an email at [email protected] with which tests failed and why.”
Wrapping Up
Once AgentPatch is in your Claude Code config, you have access to the email tool and the full marketplace — YouTube transcripts, web search, image generation, and more. Visit agentpatch.ai to get started.