Claude Code is Anthropic's official CLI for Claude — and with Docmailer's MCP integration, you can give it the ability to send and receive emails. This guide walks you through the setup process.
Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-code) - A Docmailer account (free tier works)
- Your Docmailer API token
Step-by-Step Setup
1Get Your API Token
Log into your Docmailer dashboard and copy your API token from the Settings page.
2Add Docmailer MCP Server
Run the following command to add Docmailer as an MCP server:
claude mcp add --transport sse docmailer "https://docmailer.org/mcp/sse?token=YOUR_TOKEN"
Replace YOUR_TOKEN with your actual API token.
3Verify the Connection
Start Claude Code and ask it to list your inboxes:
claude
> List my docmailer inboxes
Claude should respond with your inbox list, confirming the connection works.
4Create a Test Inbox
Ask Claude to create a new inbox for testing:
> Create a new docmailer inbox for testing
Claude will create an inbox and give you the email address (e.g., test-a7f3@docmailer.org).
Testing Email Flows
Now you can ask Claude to handle complete email workflows:
> Go to example.com/signup, register with my docmailer email,
> then check for the verification email and complete the signup
When combined with Playwright MCP, Claude can:
- Navigate to your app's signup page
- Fill the form with a Docmailer email
- Submit and wait for the verification email
- Extract the verification code or link
- Complete the verification process
Available Commands
Once connected, Claude can use these Docmailer tools:
- list_inboxes — Show all your inboxes
- create_inbox — Create a new test inbox
- list_emails — List emails in an inbox
- read_email — Read a specific email's content
- send_email — Send an email (Premium)
- delete_email — Delete an email
Ready to Get Started?
Create your free Docmailer account and connect Claude Code in minutes.
Get Started Free →Troubleshooting
MCP Connection Failed
Make sure your token is correct and hasn't expired. You can regenerate it from the dashboard.
No Emails Appearing
Emails can take a few seconds to arrive. Ask Claude to check again after waiting a moment.