How to Build an Email-Based Workflow with Claude Code
Claude Code is a strong agent for local development tasks — reading files, writing code, analyzing projects. Email is typically outside its reach: it can draft a message but not send it, and it has no way to receive replies. With AgentPatch, you can give Claude Code a complete email stack: a dedicated address, the ability to send, and the ability to check an inbox. That’s enough to build real email-based workflows without leaving the terminal.
Why This Matters
Development workflows often have email as a component that sits outside the agent’s reach. Deploy notifications, code review summaries, user feedback requests, dependency audit reports — these involve sending information to people and sometimes waiting for a response. If the agent can both send and receive, it can handle the entire loop.
AgentPatch provides three email tools that work together: claim a dedicated address for the agent, send emails from it, and check the inbox for replies. Claude Code can orchestrate all three as part of a single session.
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
A realistic scenario: you’re gathering feedback on a new API design from a small set of stakeholders.
“Claim a project email address, then send a feedback request to these five people. Attach a brief description of the API we’re considering and ask for their thoughts by Friday: alice@company.com, bob@company.com, carol@vendor.com, dave@partner.io, eve@customer.com”
Claude Code claims the address, personalizes the outreach slightly per recipient, and sends five emails. Replies flow to the project inbox.
Two days later:
“Check the project inbox and summarize the feedback we’ve received on the API design.”
Claude Code calls the Check Inbox tool, reads through the replies, and gives you a structured summary of the feedback. You can then direct it to take action:
“Based on the feedback, draft an updated API spec and send a summary of the changes to everyone who replied.”
Claude Code updates the spec, composes a diff-style summary, and sends replies to each respondent. The whole feedback cycle happens without you opening an email client once.
Wrapping Up
A complete send-receive email workflow is one of the more powerful patterns you can build once AgentPatch is connected to Claude Code. The same connection gives you YouTube transcripts, web search, image generation, and more. Visit agentpatch.ai to get started.