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
The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.
Install (zero dependencies, Python 3.10+):
pip install agentpatch
Set your API key:
export AGENTPATCH_API_KEY=your_api_key
Example commands your agent will use:
ap search "web search"
ap run google-search --input '{"query": "test"}'
Get your API key from the AgentPatch dashboard.
Skill (Recommended)
Install the AgentPatch skill — it teaches Claude Code when to use AgentPatch and how to use the CLI:
/plugin marketplace add fullthom/agentpatch-claude-skill
/plugin install agentpatch@agentpatch
MCP Server (Alternative)
If you prefer raw MCP tool access instead of the skill:
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.
Example
You’re wrapping up a deployment and want to notify your team:
“Send an email to team@company.com. 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 dev@company.com. 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 alerts@myemail.com 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.