What is the Emailit MCP Server?
The Emailit MCP Server is an open-source Model Context Protocol server that connects AI assistants directly to Emailit.
It lets you send emails, manage contacts, domains, templates, and more through natural language — right from Claude, Cursor, or any MCP-compatible client.
- Package:
@emailit/emailit-mcp - Runtime: Node.js 18+
- License: MIT
- Repository: github.com/emailit/emailit-mcp
Prerequisites
- An Emailit account
- An API key
- A verified sending domain
- Node.js 18 or later
Transport modes
The server supports two transport modes:
Stdio (default)
The MCP client starts the server as a subprocess and communicates over standard input/output. The API key is passed via an environment variable or CLI argument. This is the simplest option and works with all major clients.
HTTP (Streamable HTTP)
For remote or web-based integrations, the server runs as an HTTP server using Streamable HTTP transport. Clients authenticate per-session by passing their API key as a Bearer token in the Authorization header. The endpoint is exposed at /mcp.
Installation & configuration
Claude Code (Stdio)
claude mcp add emailit \
-e EMAILIT_API_KEY=your_api_key \
-- npx -y @emailit/emailit-mcp
Claude Code (HTTP)
Start the server first:
npx -y @emailit/emailit-mcp --http --port 3000
Then register it:
claude mcp add emailit \
--transport http http://127.0.0.1:3000/mcp \
--header "Authorization: Bearer your_api_key"
Cursor (Stdio)
Open the command palette and choose Cursor Settings → MCP → Add new global MCP server, then paste:
{
"mcpServers": {
"emailit": {
"command": "npx",
"args": ["-y", "@emailit/emailit-mcp"],
"env": {
"EMAILIT_API_KEY": "your_api_key"
}
}
}
}
Cursor (HTTP)
Start the server, then add:
{
"mcpServers": {
"emailit": {
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"Authorization": "Bearer your_api_key"
}
}
}
}
Claude Desktop (Stdio)
Open Claude Desktop settings → Developer tab → Edit Config, then paste:
{
"mcpServers": {
"emailit": {
"command": "npx",
"args": ["-y", "@emailit/emailit-mcp"],
"env": {
"EMAILIT_API_KEY": "your_api_key"
}
}
}
}
CLI options
| Option | Description |
|---|---|
--key <key> | API key (stdio only; HTTP uses Bearer token) |
--sender <email> | Default sender from a verified domain |
--reply-to <email> | Default reply-to (can be repeated) |
--http | Use HTTP transport instead of stdio |
--port <port> | HTTP port (default: 3000) |
-h, --help | Show help message |
Environment variables
| Variable | Description |
|---|---|
EMAILIT_API_KEY | API key (required for stdio) |
SENDER_EMAIL_ADDRESS | Default sender from a verified domain |
REPLY_TO_EMAIL_ADDRESSES | Comma-separated reply-to addresses |
MCP_PORT | HTTP port (default: 3000) |
Tip: If you don’t provide a sender email address, the MCP server will ask for one each time you send an email.
Available tools
The server exposes 47 tools across 8 categories.
Emails (10 tools)
| Tool | Description |
|---|---|
send-email | Send an email (HTML, text, templates, attachments, scheduling) |
list-emails | List emails with pagination and optional filtering |
get-email | Retrieve a single email by ID |
get-email-raw | Get the full raw MIME message |
get-email-body | Get parsed body content (text and HTML) |
get-email-attachments | Get attachments with base64 content |
get-email-meta | Get email metadata |
update-email | Update a scheduled email’s send time |
cancel-email | Cancel a scheduled or pending email |
retry-email | Retry a failed, errored, or held email |
Domains (6 tools)
| Tool | Description |
|---|---|
create-domain | Create a domain and get DNS records |
get-domain | Get domain info and verification status |
list-domains | List all domains |
update-domain | Update tracking settings |
delete-domain | Delete a domain (irreversible) |
verify-domain | Trigger DNS verification |
API Keys (5 tools)
| Tool | Description |
|---|---|
create-api-key | Create a new API key (shown only once) |
get-api-key | Retrieve API key info |
list-api-keys | List all API keys |
update-api-key | Update an API key’s name |
delete-api-key | Delete an API key (irreversible) |
Audiences (5 tools)
| Tool | Description |
|---|---|
create-audience | Create an audience for campaigns |
get-audience | Get audience details |
list-audiences | List all audiences |
update-audience | Update an audience’s name |
delete-audience | Delete an audience and all its subscribers |
Contacts (5 tools)
| Tool | Description |
|---|---|
create-contact | Create a contact with audience subscriptions |
get-contact | Get a contact by ID or email address |
list-contacts | List all contacts |
update-contact | Update a contact’s details |
delete-contact | Delete a contact and its subscriber records |
Templates (6 tools)
| Tool | Description |
|---|---|
create-template | Create an email template |
get-template | Get a template by ID with all versions |
list-templates | List published templates with filtering |
update-template | Update a template |
delete-template | Delete a template permanently |
publish-template | Publish a template version |
Suppressions (5 tools)
| Tool | Description |
|---|---|
create-suppression | Add an email address to the suppression list |
get-suppression | Get a suppression by ID or email |
list-suppressions | List all suppressions |
update-suppression | Update a suppression |
delete-suppression | Remove a suppression |
Webhooks (5 tools)
| Tool | Description |
|---|---|
create-webhook | Create a webhook with event subscriptions |
get-webhook | Get webhook info |
list-webhooks | List all webhooks |
update-webhook | Update a webhook |
delete-webhook | Delete a webhook |
Usage examples
Send a simple email
Ask your AI assistant:
“Send a welcome email to john@example.com with the subject ‘Welcome!’”
The AI calls send-email with:
{
"from": "hello@mydomain.com",
"to": "john@example.com",
"subject": "Welcome!",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}
Send with a template and variables
“Send the welcome-email template to sarah@example.com with her name as Sarah.”
{
"from": "hello@mydomain.com",
"to": "sarah@example.com",
"template": "welcome-email",
"variables": { "name": "Sarah" }
}
Schedule an email
“Schedule a reminder email to team@company.com for tomorrow at 9am.”
{
"from": "reminders@mydomain.com",
"to": "team@company.com",
"subject": "Daily Standup Reminder",
"text": "Don't forget the standup at 9:30!",
"scheduled_at": "tomorrow at 9am"
}
Send with attachments
“Send an email to accounting@company.com with the invoice PDF attached.”
{
"from": "billing@mydomain.com",
"to": "accounting@company.com",
"subject": "Monthly Invoice",
"html": "<p>Please find the invoice attached.</p>",
"attachments": [
{
"filename": "invoice-2026-05.pdf",
"url": "https://example.com/invoices/2026-05.pdf"
}
]
}
Manage domains
“Add my domain mail.example.com and show me the DNS records.”
The AI calls create-domain and displays the required DNS records for you to configure with your DNS provider.
“Verify my domain.”
The AI calls verify-domain to check DNS propagation and reports back the verification status.
Manage contacts
“Add Jane Smith (jane@example.com) to audience aud_abc123.”
{
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Smith",
"audiences": ["aud_abc123"]
}
Manage templates
“Create a newsletter template with alias monthly-newsletter.”
{
"name": "Monthly Newsletter",
"alias": "monthly-newsletter",
"subject": "Monthly Update {{month}}",
"html": "<h1>{{month}} Update</h1>..."
}
Manage suppressions
“Suppress bounced@example.com for too many hard bounces.”
{
"email": "bounced@example.com",
"type": "bounce",
"reason": "too many hard bounces"
}
Set up webhooks
“Create a webhook that sends delivery and bounce events to my endpoint.”
{
"name": "Delivery Tracker",
"url": "https://myapp.com/webhooks/email",
"events": ["email.delivered", "email.bounced"]
}
Security notes
- API keys should never be committed to version control.
- In stdio mode, the API key is stored in the MCP client’s configuration.
- In HTTP mode, clients pass the API key per-session via Bearer token.
- Webhook URLs are validated against SSRF before creation.
- Delete operations prompt the AI to confirm with you first.
Troubleshooting
“API key required for stdio mode”
Set the EMAILIT_API_KEY environment variable or pass --key.
Domain not verified
Configure DNS records from create-domain output, then call verify-domain.
Email rejected / not sending Ensure domain is verified and sender address uses that domain.
Scheduled email can’t be canceled Must be at least 3 minutes before the scheduled time.
Retry fails Only hard-failed, errored, held, or suppressed emails can be retried.
Local development
git clone https://github.com/emailit/emailit-mcp.git
cd emailit-mcp
npm install
# Run in stdio mode
EMAILIT_API_KEY=your_key node src/index.js
# Run in HTTP mode
node src/index.js --http --port 3000
For more details, see the GitHub repository.