{
  "markdown": "# ClawAIMail\n\n**Email infrastructure for AI agents.**\n\n[![npm version](https://img.shields.io/npm/v/clawaimail.svg)](https://www.npmjs.com/package/clawaimail)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Documentation](https://img.shields.io/badge/docs-clawaimail.com-brightgreen.svg)](https://clawaimail.com/docs)\n\n---\n\nClawAIMail 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.\n\n## Features\n\n- **REST API** -- Send, receive, search, and manage emails with a simple JSON API.\n- **MCP Server** -- First-class Model Context Protocol server for Claude, Cursor, and other MCP-compatible clients.\n- **WebSocket Streaming** -- Real-time email events pushed to your agent as they happen.\n- **Webhooks** -- HTTP callbacks on incoming mail, delivery status, and other events.\n- **Custom Domains** -- Bring your own domain or use a `@clawaimail.com` address.\n- **SDKs** -- Official Node.js and Python SDKs for rapid integration.\n\n## Quick Start\n\n### Node.js\n\n```bash\nnpm install clawaimail\n```\n\n```javascript\nconst { ClawAIMail } = require(\"clawaimail\");\n\nconst client = new ClawAIMail({ apiKey: process.env.CLAWAIMAIL_API_KEY });\n\n// Create a mailbox for your agent\nconst mailbox = await client.mailboxes.create({\n  name: \"support-agent\",\n  domain: \"clawaimail.com\",\n});\n\n// Send an email\nawait client.emails.send({\n  from: mailbox.address,\n  to: \"user@example.com\",\n  subject: \"Hello from my AI agent\",\n  text: \"This email was sent by an autonomous agent.\",\n});\n\n// List incoming emails\nconst inbox = await client.emails.list({\n  mailbox: mailbox.id,\n  unread: true,\n});\n```\n\n### Python\n\n```bash\npip install clawaimail\n```\n\n```python\nfrom clawaimail import ClawAIMail\n\nclient = ClawAIMail(api_key=\"your-api-key\")\n\n# Create a mailbox\nmailbox = client.mailboxes.create(name=\"support-agent\", domain=\"clawaimail.com\")\n\n# Send an email\nclient.emails.send(\n    from_address=mailbox.address,\n    to=\"user@example.com\",\n    subject=\"Hello from my AI agent\",\n    text=\"This email was sent by an autonomous agent.\",\n)\n\n# List incoming emails\ninbox = client.emails.list(mailbox=mailbox.id, unread=True)\n```\n\n## MCP Server\n\nClawAIMail ships an MCP server so that Claude, Cursor, and other MCP-compatible clients can use email tools directly.\n\n### Claude Desktop\n\nAdd the following to your Claude Desktop MCP config (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"clawaimail\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"clawaimail-mcp\"],\n      \"env\": {\n        \"CLAWAIMAIL_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to your `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"clawaimail\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"clawaimail-mcp\"],\n      \"env\": {\n        \"CLAWAIMAIL_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nOnce configured, the agent can call tools like `send_email`, `read_inbox`, `search_emails`, and `create_mailbox` without any additional code.\n\n## Self-Hosting\n\nClawAIMail can be self-hosted for full control over your email infrastructure.\n\n```bash\n# Clone the repository\ngit clone https://github.com/joansongjr/clawaimail.git\ncd clawaimail\n\n# Install dependencies\nnpm install\n\n# Configure environment\ncp .env.example .env\n# Edit .env with your SMTP credentials, database URL, and API keys\n\n# Run database migrations\nnpm run db:migrate\n\n# Start the server\nnpm start\n```\n\nThe server will be available at `http://localhost:3000` by default. See the [self-hosting docs](https://clawaimail.com/docs/self-hosting) for production deployment guides (Docker, Railway, Fly.io).\n\n## API Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `POST` | `/v1/emails/send` | Send an email |\n| `GET` | `/v1/emails` | List emails for a mailbox |\n| `GET` | `/v1/emails/:id` | Get a single email by ID |\n| `DELETE` | `/v1/emails/:id` | Delete an email |\n| `POST` | `/v1/mailboxes` | Create a new mailbox |\n| `GET` | `/v1/mailboxes` | List all mailboxes |\n| `DELETE` | `/v1/mailboxes/:id` | Delete a mailbox |\n| `POST` | `/v1/webhooks` | Register a webhook |\n| `GET` | `/v1/webhooks` | List registered webhooks |\n| `DELETE` | `/v1/webhooks/:id` | Remove a webhook |\n| `GET` | `/v1/domains` | List verified domains |\n| `POST` | `/v1/domains/verify` | Verify a custom domain |\n| `GET` | `/v1/ws` | WebSocket connection for real-time events |\n\nFull API reference: [clawaimail.com/docs/api](https://clawaimail.com/docs/api)\n\n## Pricing\n\n| | Free | Starter | Pro | Business |\n|---|---|---|---|---|\n| **Price** | $0/mo | $5/mo | $29/mo | $99/mo |\n| **Emails/month** | 100 | 5,000 | 50,000 | 500,000 |\n| **Mailboxes** | 1 | 10 | 100 | Unlimited |\n| **Custom domains** | -- | 1 | 5 | Unlimited |\n| **Webhooks** | 1 | 5 | 25 | Unlimited |\n| **WebSocket** | -- | Yes | Yes | Yes |\n| **Support** | Community | Email | Priority | Dedicated |\n\nSelf-hosted deployments are free and unlimited. See [clawaimail.com/pricing](https://clawaimail.com/pricing) for details.\n\n## Links\n\n- [Documentation](https://clawaimail.com/docs)\n- [Node.js SDK](https://www.npmjs.com/package/clawaimail)\n- [Python SDK](https://pypi.org/project/clawaimail/)\n- [Website](https://clawaimail.com)\n- [Status Page](https://status.clawaimail.com)\n\n## License\n\nMIT -- see [LICENSE](./LICENSE) for details.\n\n",
  "bytes": 5453,
  "sha": "59bc18d974dc7180e0cb4fe25cf57e820eab30bb47fc3af5289ee3e05c4d5ec8",
  "repo_slug": "joansongjr/clawaimail",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_joansongjr_clawaimail_45d0e166/readme"
}