ClawAIMail
ClawAIMail provides email infrastructure for AI agents, enabling full programmatic control over email operations:
Manage inboxes — Create inboxes with custom usernames (e.g.,
mybot@clawaimail.com), list all inboxes, or delete them along with their messages.Send emails — Send to any recipient with a subject, plain text and/or HTML body, from a specified or default inbox.
Read & search messages — List messages (with unread filters and limits), read specific emails by ID, and search by keyword.
Real-time & event-driven — Receive email events via WebSocket streaming or configure webhooks for HTTP callbacks on incoming mail and delivery status.
Account management — Retrieve your agent's email address (auto-created if none exists), and view plan limits and usage stats.
Flexible integration — Use via REST API, MCP server (Claude/Cursor), Node.js/Python SDKs, or self-host for full control.
Custom domains — Bring your own domain or use
@clawaimail.comaddresses.
ClawAIMail
Email infrastructure for AI agents.
ClawAIMail gives AI agents their own email addresses and full programmatic control over sending, receiving, and managing email. Built for developers who need reliable email primitives in agentic workflows.
Features
REST API -- Send, receive, search, and manage emails with a simple JSON API.
MCP Server -- First-class Model Context Protocol server for Claude, Cursor, and other MCP-compatible clients.
WebSocket Streaming -- Real-time email events pushed to your agent as they happen.
Webhooks -- HTTP callbacks on incoming mail, delivery status, and other events.
Custom Domains -- Bring your own domain or use a
@clawaimail.comaddress.SDKs -- Official Node.js and Python SDKs for rapid integration.
Related MCP server: Email MCP Server
Quick Start
Node.js
npm install clawaimailconst { ClawAIMail } = require("clawaimail");
const client = new ClawAIMail({ apiKey: process.env.CLAWAIMAIL_API_KEY });
// Create a mailbox for your agent
const mailbox = await client.mailboxes.create({
name: "support-agent",
domain: "clawaimail.com",
});
// Send an email
await client.emails.send({
from: mailbox.address,
to: "user@example.com",
subject: "Hello from my AI agent",
text: "This email was sent by an autonomous agent.",
});
// List incoming emails
const inbox = await client.emails.list({
mailbox: mailbox.id,
unread: true,
});Python
pip install clawaimailfrom clawaimail import ClawAIMail
client = ClawAIMail(api_key="your-api-key")
# Create a mailbox
mailbox = client.mailboxes.create(name="support-agent", domain="clawaimail.com")
# Send an email
client.emails.send(
from_address=mailbox.address,
to="user@example.com",
subject="Hello from my AI agent",
text="This email was sent by an autonomous agent.",
)
# List incoming emails
inbox = client.emails.list(mailbox=mailbox.id, unread=True)MCP Server
ClawAIMail ships an MCP server so that Claude, Cursor, and other MCP-compatible clients can use email tools directly.
Claude Desktop
Add the following to your Claude Desktop MCP config (claude_desktop_config.json):
{
"mcpServers": {
"clawaimail": {
"command": "npx",
"args": ["-y", "clawaimail-mcp"],
"env": {
"CLAWAIMAIL_API_KEY": "your-api-key"
}
}
}
}Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": {
"clawaimail": {
"command": "npx",
"args": ["-y", "clawaimail-mcp"],
"env": {
"CLAWAIMAIL_API_KEY": "your-api-key"
}
}
}
}Once configured, the agent can call tools like send_email, read_inbox, search_emails, and create_mailbox without any additional code.
Self-Hosting
ClawAIMail can be self-hosted for full control over your email infrastructure.
# Clone the repository
git clone https://github.com/joansongjr/clawaimail.git
cd clawaimail
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your SMTP credentials, database URL, and API keys
# Run database migrations
npm run db:migrate
# Start the server
npm startThe server will be available at http://localhost:3000 by default. See the self-hosting docs for production deployment guides (Docker, Railway, Fly.io).
API Endpoints
Method | Endpoint | Description |
|
| Send an email |
|
| List emails for a mailbox |
|
| Get a single email by ID |
|
| Delete an email |
|
| Create a new mailbox |
|
| List all mailboxes |
|
| Delete a mailbox |
|
| Register a webhook |
|
| List registered webhooks |
|
| Remove a webhook |
|
| List verified domains |
|
| Verify a custom domain |
|
| WebSocket connection for real-time events |
Full API reference: clawaimail.com/docs/api
Pricing
Free | Starter | Pro | Business | |
Price | $0/mo | $5/mo | $29/mo | $99/mo |
Emails/month | 100 | 5,000 | 50,000 | 500,000 |
Mailboxes | 1 | 10 | 100 | Unlimited |
Custom domains | -- | 1 | 5 | Unlimited |
Webhooks | 1 | 5 | 25 | Unlimited |
WebSocket | -- | Yes | Yes | Yes |
Support | Community | Priority | Dedicated |
Self-hosted deployments are free and unlimited. See clawaimail.com/pricing for details.
Links
License
MIT -- see LICENSE for details.
Available Tools
10 toolsaccount_infoA
Get account info, plan limits, and usage
Inputs: no named parameters.
create_inboxB
Create a new email inbox (optional — a default inbox is auto-created if needed)
Inputs: username (required).
delete_inboxA
Delete an inbox and all its messages
Inputs: inbox_id (required).
getting_startedA
Interactive onboarding guide for ClawAIMail. Shows you everything you can do with your AI email, step by step.
Inputs: level.
list_inboxesB
List all email inboxes
Inputs: no named parameters.
list_messagesC
List messages. If inbox_id is omitted, uses the default inbox.
Inputs: inbox_id, limit, unread.
my_emailA
Get or create your agent's email address. Pass preferred_name to choose your email prefix (e.g. "jarvis" → jarvis@clawaimail.com). If no name given and no inbox exists, a random one is created.
Inputs: preferred_name.
read_emailA
Read a specific email message. If inbox_id is omitted, uses the default inbox.
Inputs: message_id (required), inbox_id.
search_emailsB
Search emails by keyword. If inbox_id is omitted, uses the default inbox.
Inputs: query (required), inbox_id.
send_emailA
Send an email with optional attachments. If inbox_id is omitted, uses the default inbox. Attachments: pass an array of { filename, content (base64), content_type }. Max 5MB per file, 10MB total.
Inputs: to (required), subject (required), inbox_id, text, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct operation: account info, inbox CRUD, message listing/reading/searching/sending, and a getting-started guide. No overlapping purposes.
Most tools follow a consistent verb_noun snake_case pattern (e.g., create_inbox, list_messages). However, 'getting_started' (gerund) and 'my_email' (possessive) deviate slightly.
10 tools cover the essential email operations (inbox management, message reading/writing/searching, account info) without being excessive or insufficient.
The set includes CRUD for inboxes, message operations, search, and sending with attachments. Missing operations like updating an inbox or deleting a message are minor gaps.
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Hosted email for AI agents: create inboxes, send, receive, and reply over MCP with scoped API keys
Real email inboxes for AI agents: register, receive, read and send mail over MCP. Free to receive.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceProvides an AI agent with its own email address to send, receive, and manage emails via MCP. No email server setup required.30 npm13MIT- FlicenseNot gradedqualityDmaintenanceGive AI agents their own email inboxes. Create, send, receive, and manage email entirely via MCP tools.-
- AlicenseNot gradedqualityDmaintenanceMCP server that gives AI agents programmable email inboxes with tools to create inboxes, send and list threaded email, and search messages.2 npm2MIT
- AlicenseAqualityBmaintenanceEnables AI agents to send, receive, and reply to email through dedicated thread-aware mailboxes, with sandbox testing and compatibility across MCP clients.940 npmMIT