Give Claude Code a mailbox that belongs to the agent.
Claude Code can use mails0 through CLI commands, skill files, or the mails-agent-mcp server. The key difference: the agent gets a scoped mailbox built for automation, not broad access to a human Gmail or Outlook account.
Why not connect Claude Code to your personal email?
Personal email is too broad for many coding-agent tasks. A repo automation agent usually needs a small, auditable inbox for signups, CI notifications, account verification, and controlled replies. mails0 narrows the blast radius.
Mailbox-scoped key
A leaked or misused key only touches the mailbox it was issued for, not your personal or company-wide inbox.
OTP retrieval
Claude Code can complete signup and login workflows by calling code extraction instead of asking a person to paste codes.
CLI or MCP
Use direct commands in the terminal, or register the MCP server so the agent can call structured tools.
CLI setup for Claude Code sessions
npm install -g mails-agent
mails config set api_key mk_...
mails config set mailbox [email protected]
mails doctor
# Useful inside a Claude Code task:
mails inbox --query "verification"
mails code --to [email protected] --timeout 60
MCP setup for tool-native use
Claude Code supports MCP tool servers. Use the same mails0 mailbox as a tool server when you want typed tool calls instead of shell commands.
{
"mcpServers": {
"mails": {
"command": "npx",
"args": ["mails-agent-mcp"],
"env": {
"MAILS_API_KEY": "mk_...",
"MAILS_MAILBOX": "[email protected]"
}
}
}
}