Send & Receive Emails with Claude Code
Use the AgentMail MCP server directly in Claude Code to send and receive emails
Claude Code is Anthropic’s terminal coding agent. Add the hosted AgentMail MCP server with one command and it gets an email inbox of its own to send, receive, and reply from.
What you will need
- Claude Code.
- An AgentMail API key, if you connect with a key. Generate one here.
Add the MCP server
Register the server with an API key sent as a header:
claude mcp add --transport http agentmail https://mcp.agentmail.to/mcp \
--header "x-api-key: $AGENTMAIL_API_KEY"To sign in with OAuth instead, drop the header. Claude Code opens the AgentMail sign-in on first use:
claude mcp add --transport http agentmail https://mcp.agentmail.to/mcpConfirm it registered with claude mcp list. Then ask Claude Code to use it:
Create an AgentMail inbox and send a hi email from it to you@example.com.Next Steps
Was this page helpful?Suggest editsRaise issue