ClawAIMail - Email for AI Agents
Give your AI agent its own email address. Create inboxes, send and receive real emails, search messages, and manage threads — all through a simple API.
What it does
- - Create Inboxes: Instantly create email addresses like INLINECODE0
- Send Emails: Send real emails from your agent's address
- Receive Emails: Get notified when emails arrive via webhook or WebSocket
- Read & Search: Read messages, search by keyword, track threads
- Manage: Labels, custom domains, and more
Setup
- 1. Get your API key at https://clawaimail.com (free tier: 3 inboxes, 3K emails/month)
- Set your environment variable:
CODEBLOCK0
OpenClaw Configuration
⚠️ Important: Do NOT add mcpServers to openclaw.json — that field is not supported and will crash the Gateway.
Use mcporter (OpenClaw's MCP management tool) to configure:
CODEBLOCK1
mcporter manages its own config at ~/.openclaw/config/mcporter.json, separate from the OpenClaw Gateway config.
Troubleshooting
| Problem | Cause | Fix |
|---|
| Gateway crashes on startup | INLINECODE4 added to INLINECODE5 | Remove it from openclaw.json, use mcporter instead |
| "CLAWAIMAILAPIKEY not set" warning |
Missing env var | Add
--env CLAWAIMAIL_API_KEY="..." to mcporter config |
| API calls return errors | Invalid API key or service unreachable | Check key at https://clawaimail.com/dashboard |
MCP Server Configuration (Claude Desktop / Cursor)
For non-OpenClaw MCP clients:
CODEBLOCK2
Available Tools
| Tool | Description |
|---|
| INLINECODE9 | List all your email inboxes |
| INLINECODE10 |
Create a new email inbox (e.g. mybot@clawaimail.com) |
|
send_email | Send an email from an inbox |
|
list_messages | List messages in an inbox |
|
read_email | Read a specific email message |
|
search_emails | Search emails by keyword |
|
delete_inbox | Delete an inbox and all its messages |
|
account_info | Get account info, plan limits, and usage |
Example Usage
Create an inbox and send an email
CODEBLOCK3
Check for new messages
CODEBLOCK4
Search emails
CODEBLOCK5
Pricing
- - Free: 3 inboxes, 3K emails/month
- Starter ($5/mo): 10 inboxes, 5K emails/month
- Pro ($29/mo): 50 inboxes, 50K emails/month, custom domains
- Business ($99/mo): 200 inboxes, 200K emails/month
Changelog
0.1.2
- - Fix: Added error handling to all API calls (no more crashes on missing API key or network errors)
- Fix: Accept both number and string IDs for inboxid/messageid
- Added startup warning when CLAWAIMAILAPIKEY is not set
- Added global exception handlers to prevent process crashes
0.1.0
Links
- - Website: https://clawaimail.com
- API Docs: https://clawaimail.com/docs/
- GitHub: https://github.com/joansongjr/clawaimail
- npm: https://www.npmjs.com/package/clawaimail-mcp
- ClawHub: https://clawhub.com/skills/clawaimail
- Node.js SDK: INLINECODE17
- Python SDK: INLINECODE18
ClawAIMail - AI 代理的电子邮件服务
为您的AI代理提供专属电子邮件地址。通过简单的API即可创建收件箱、发送和接收真实邮件、搜索消息以及管理线程。
功能特性
- - 创建收件箱:即时创建类似 mybot@clawaimail.com 的电子邮件地址
- 发送邮件:从代理地址发送真实邮件
- 接收邮件:通过Webhook或WebSocket接收新邮件通知
- 阅读与搜索:阅读消息、按关键词搜索、追踪线程
- 管理功能:标签、自定义域名等
配置步骤
- 1. 在 https://clawaimail.com 获取API密钥(免费套餐:3个收件箱,每月3000封邮件)
- 设置环境变量:
CLAWAIMAILAPIKEY=pbyourapi_key
OpenClaw 配置
⚠️ 重要提示:请勿在 openclaw.json 中添加 mcpServers 字段——该字段不受支持,会导致网关崩溃。
请使用 mcporter(OpenClaw 的 MCP 管理工具)进行配置:
bash
将 ClawAIMail 添加为 MCP 服务器
mcporter config add clawaimail npx -y clawaimail-mcp --env CLAWAIMAIL
APIKEY=pb
yourapi_key
测试是否正常工作
mcporter call clawaimail.list_inboxes
查看状态
mcporter status
mcporter 在 ~/.openclaw/config/mcporter.json 中管理自己的配置,与 OpenClaw 网关配置相互独立。
故障排除
| 问题 | 原因 | 解决方法 |
|---|
| 网关启动时崩溃 | 在 openclaw.json 中添加了 mcpServers | 从 openclaw.json 中移除,改用 mcporter |
| 显示CLAWAIMAILAPIKEY 未设置警告 |
缺少环境变量 | 在 mcporter 配置中添加 --env CLAWAIMAIL
APIKEY=... |
| API 调用返回错误 | API 密钥无效或服务不可达 | 在 https://clawaimail.com/dashboard 检查密钥 |
MCP 服务器配置(Claude Desktop / Cursor)
适用于非 OpenClaw 的 MCP 客户端:
json
{
mcpServers: {
clawaimail: {
command: npx,
args: [-y, clawaimail-mcp],
env: {
CLAWAIMAILAPIKEY: pbyourapi_key
}
}
}
}
可用工具
| 工具 | 描述 |
|---|
| listinboxes | 列出所有电子邮件收件箱 |
| createinbox |
创建新的电子邮件收件箱(例如 mybot@clawaimail.com) |
| send_email | 从收件箱发送电子邮件 |
| list_messages | 列出收件箱中的消息 |
| read_email | 阅读特定电子邮件消息 |
| search_emails | 按关键词搜索电子邮件 |
| delete_inbox | 删除收件箱及其所有消息 |
| account_info | 获取账户信息、套餐限制和使用情况 |
使用示例
创建收件箱并发送邮件
用户:创建一个名为assistant的电子邮件收件箱
代理:[调用 create_inbox,用户名为 assistant]
已创建收件箱:assistant@clawaimail.com
用户:发送一封邮件到 john@example.com,内容为问候
代理:[调用 send_email,收件人为 john@example.com,主题为 Hello,正文为 来自您的AI助手的问候!]
邮件发送成功。
检查新消息
用户:检查我的收件箱是否有新消息
代理:[调用 listmessages,inboxid 为 1,unread 为 true]
您有 3 封未读消息:
1. 来自:jane@company.com - 主题:明天会议
2. 来自:support@service.com - 主题:您的工单 #1234
3. 来自:newsletter@tech.io - 主题:每周摘要
搜索邮件
用户:查找任何关于发票的邮件
代理:[调用 search_emails,查询词为 invoice]
找到 2 封提及invoice的邮件:
1. 来自:billing@vendor.com - 发票 #5678 - 3月15日到期
2. 来自:accounting@partner.org - 已附上更新后的发票
定价方案
- - 免费版:3个收件箱,每月3000封邮件
- 入门版(5美元/月):10个收件箱,每月5000封邮件
- 专业版(29美元/月):50个收件箱,每月50000封邮件,支持自定义域名
- 企业版(99美元/月):200个收件箱,每月200000封邮件
更新日志
0.1.2
- - 修复:为所有API调用添加错误处理(不再因缺少API密钥或网络错误而崩溃)
- 修复:inboxid/messageid 同时支持数字和字符串格式
- 新增:当 CLAWAIMAILAPIKEY 未设置时显示启动警告
- 新增:添加全局异常处理器以防止进程崩溃
0.1.0
相关链接
- - 网站:https://clawaimail.com
- API文档:https://clawaimail.com/docs/
- GitHub:https://github.com/joansongjr/clawaimail
- npm:https://www.npmjs.com/package/clawaimail-mcp
- ClawHub:https://clawhub.com/skills/clawaimail
- Node.js SDK:npm install clawaimail
- Python SDK:pip install clawaimail