@hasna/emails
v0.5.39
Published
Email management CLI + MCP server + dashboard for Resend and AWS SES
Readme
@hasna/emails
Email management CLI + MCP server — send, receive, sync, and manage email via Resend, AWS SES, and Gmail.
Install
npm install -g @hasna/emailsQuick Start
# Add a provider (SES, Resend, or Gmail)
emails provider add --type ses --region us-east-1 --access-key ... --secret-key ...
emails provider add-gmail # requires: connectors auth gmail
# Set up a domain (buy + DNS + SES in one command)
emails domain setup example.com --provider <id> --email [email protected] ...
# Or configure DNS for an existing domain via Cloudflare
emails domain setup-cloudflare example.com --provider <id>
# Send an email
emails send --from [email protected] --to [email protected] --subject "Hi" --body "Hello"
# Sync Gmail inbox (full content — HTML + attachments)
emails inbox sync --all
# Check sent email log
emails email list
# Sync email data to RDS PostgreSQL
emails cloud pushCommand Structure
emails provider # add/list/remove/sync providers (ses, resend, gmail)
emails domain # add/verify/buy/setup/dns/check domains
emails address # manage sender addresses
emails send # send an email
emails email # sent email: list, search, show, replies, thread
emails inbox # inbound: sync (gmail/s3), list, read, reply, star, archive
emails template # email templates
emails contact # contacts (suppression list)
emails group # recipient groups
emails sequence # drip sequences
emails schedule # scheduled emails: list, cancel, run
emails triage # AI triage: classify, prioritize, draft replies
emails cloud # sync to/from cloud (RDS PostgreSQL): push, pull, migrate
emails aws # AWS setup: SES receipt rules, S3 inbound bucket
emails config # configuration (key=value)
emails stats # delivery statistics (--inbox for received mail)
emails analytics # email analytics
emails doctor # system diagnostics
emails serve # HTTP server + dashboard
emails mcp # install MCP serverMCP Server
91 tools available for AI agents.
emails-mcpREST API
emails-serveInbound Email (AWS SES → S3)
# Set up S3 bucket + SES receipt rules
emails aws setup-inbound --domain example.com --bucket my-emails
# Sync received emails locally
emails inbox sync-s3 --bucket my-emails --prefix inbound/example.com/Cloud Sync (PostgreSQL)
# Configure RDS
emails cloud setup --host <rds-host> --username <user>
# Push local SQLite → RDS
emails cloud push
# Pull RDS → local
emails cloud pullData
Stored in ~/.hasna/emails/ (SQLite + attachments).
HTTP mode
Shared Streamable HTTP transport for multi-agent sessions (stdio remains the default):
emails-mcp --http # http://127.0.0.1:8816/mcp
MCP_HTTP=1 emails-mcp # same
emails-mcp --http --port 8816 # explicit port- Health:
GET http://127.0.0.1:8816/health→{"status":"ok","name":"emails"} - Override port with
MCP_HTTP_PORTor--port
License
Apache-2.0 — see LICENSE
