What is Mails.ai — Agent Email MCP?
Mails.ai — Agent Email is a real inbox for AI agents: send, receive and thread email, behind a prompt-injection firewall.
How to install Mails.ai — Agent Email MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Mails.ai — Agent Email MCP in Claude Code
$ claude mcp add --env 'MAILS_API_KEY=<YOUR_MAILS_API_KEY>' agent-email -- npx -y @mailsai/mcp-serverInstall Mails.ai — Agent Email MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"agent-email": {
"command": "npx",
"args": [
"-y",
"@mailsai/mcp-server"
],
"env": {
"MAILS_API_KEY": "<YOUR_MAILS_API_KEY>"
}
}
}
}Install Mails.ai — Agent Email MCP in VS Code
.vscode/mcp.json
{
"servers": {
"agent-email": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mailsai/mcp-server"
],
"env": {
"MAILS_API_KEY": "<YOUR_MAILS_API_KEY>"
}
}
}
}Install Mails.ai — Agent Email MCP in VS Code CLI
$ code --add-mcp '{"name":"agent-email","type":"stdio","command":"npx","args":["-y","@mailsai/mcp-server"],"env":{"MAILS_API_KEY":"<YOUR_MAILS_API_KEY>"}}'Install Mails.ai — Agent Email MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"agent-email": {
"command": "npx",
"args": [
"-y",
"@mailsai/mcp-server"
],
"env": {
"MAILS_API_KEY": "<YOUR_MAILS_API_KEY>"
}
}
}
}Install Mails.ai — Agent Email MCP in Codex
$ codex mcp add agent-email --env 'MAILS_API_KEY=<YOUR_MAILS_API_KEY>' -- npx -y @mailsai/mcp-serverInstall Mails.ai — Agent Email MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.agent-email] command = "npx" args = ["-y", "@mailsai/mcp-server"] [mcp_servers.agent-email.env] MAILS_API_KEY = "<YOUR_MAILS_API_KEY>"
Install Mails.ai — Agent Email MCP in Gemini CLI
$ gemini mcp add -s user -e 'MAILS_API_KEY=<YOUR_MAILS_API_KEY>' agent-email npx -- -y @mailsai/mcp-serverInstall Mails.ai — Agent Email MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"agent-email": {
"command": "npx",
"args": [
"-y",
"@mailsai/mcp-server"
],
"env": {
"MAILS_API_KEY": "<YOUR_MAILS_API_KEY>"
}
}
}
}Configuration
MAILS_API_KEYRequiredSecretYour mails.ai API key. Use an mk_test_ key to run against the sandbox or an mk_live_ key to send real mail. Free key at https://mails.ai
MAILS_BASE_URLOverride the API base URL. Defaults to the hosted mails.ai API; only needed for staging or self-hosted deployments.
| Name | Description | |
|---|---|---|
| MAILS_API_KEY | Your mails.ai API key. Use an mk_test_ key to run against the sandbox or an mk_live_ key to send real mail. Free key at https://mails.ai | RequiredSecret |
| MAILS_BASE_URL | Override the API base URL. Defaults to the hosted mails.ai API; only needed for staging or self-hosted deployments. |
Mails.ai — Agent Email MCP questions
How do I add Mails.ai — Agent Email MCP to Claude Code?
Run claude mcp add --env 'MAILS_API_KEY=<YOUR_MAILS_API_KEY>' agent-email -- npx -y @mailsai/mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add Mails.ai — Agent Email MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.