@resonia/veilmail-mcp
A Model Context Protocol (MCP) server that exposes Veil Mail API operations as tools for AI agents, enabling email sending, template management, audience management, and analytics retrieval through natural language.
README
@resonia/veilmail-mcp
A Model Context Protocol (MCP) server that exposes Veil Mail API operations as tools for AI agents. This allows AI assistants like Claude, ChatGPT, Cursor, and other MCP-compatible clients to send emails, manage templates, work with audiences, and retrieve analytics through natural language.
Veil Mail is the only email API with a first-class MCP server. Resend, SendGrid, Mailgun, and Postmark don't offer MCP integrations — connecting them to Claude or Cursor requires hand-building a server. This one ships as
npx @resonia/veilmail-mcpand drops straight into Claude Desktop or any MCP client with a single config entry. Ten tools covering emails, domains, templates, audiences, campaigns, and analytics.Related: Veil Mail Node.js SDK · Full MCP docs · AI assistant integration guides
Installation
npm install @resonia/veilmail-mcp
Or run directly with npx:
npx @resonia/veilmail-mcp
Configuration
The server requires a Veil Mail API key to authenticate requests. Set it via the VEILMAIL_API_KEY environment variable.
| Variable | Required | Default | Description |
|---|---|---|---|
VEILMAIL_API_KEY |
Yes | - | Your Veil Mail API key (e.g., veil_live_xxxxx) |
VEILMAIL_BASE_URL |
No | https://api.veilmail.xyz |
Custom API base URL (useful for self-hosted instances) |
You can obtain an API key from the Veil Mail Dashboard.
Usage with Claude Desktop
Add the following to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"veilmail": {
"command": "npx",
"args": ["@resonia/veilmail-mcp"],
"env": {
"VEILMAIL_API_KEY": "veil_live_xxxxx"
}
}
}
}
Restart Claude Desktop after updating the configuration. You should see the Veil Mail tools available in the tools menu.
Usage with Other MCP Clients
Any MCP-compatible client can use this server. Start it as a subprocess communicating over stdio:
VEILMAIL_API_KEY=veil_live_xxxxx npx @resonia/veilmail-mcp
Available Tools
send_email
Send an email via Veil Mail. Supports HTML content, templates, attachments, and scheduling.
| Parameter | Type | Required | Description |
|---|---|---|---|
from |
string | Yes | Sender email address (must be from a verified domain) |
to |
string | Yes | Recipient email address |
subject |
string | Yes | Email subject line |
html |
string | No | HTML content of the email |
text |
string | No | Plain text fallback content |
templateId |
string | No | Template ID to use instead of html/text |
templateData |
object | No | Data to populate template variables |
cc |
string | No | CC recipient email address |
bcc |
string | No | BCC recipient email address |
replyTo |
string | No | Reply-to email address |
scheduledFor |
string | No | ISO 8601 datetime to schedule the email |
get_email
Get details of a sent email by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Email ID |
list_emails
List sent emails with optional filters.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
number | No | Number of emails to return (max 100) |
status |
string | No | Filter by status: queued, sent, delivered, bounced, failed |
validate_email
Validate an email address. Checks syntax, MX records, disposable domain, and role address.
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Email address to validate |
list_templates
List available email templates.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
number | No | Number of templates to return |
get_template
Get a specific email template by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Template ID |
list_domains
List verified sending domains. No parameters required.
list_audiences
List email audiences/contact lists. No parameters required.
add_subscriber
Add a subscriber to an audience.
| Parameter | Type | Required | Description |
|---|---|---|---|
audienceId |
string | Yes | Audience ID to add the subscriber to |
email |
string | Yes | Subscriber email address |
firstName |
string | No | Subscriber first name |
lastName |
string | No | Subscriber last name |
get_analytics
Get email analytics overview including delivery rates, opens, clicks, and bounces.
| Parameter | Type | Required | Description |
|---|---|---|---|
days |
number | No | Number of days to look back (default: 30) |
Example Interactions
Once configured, you can ask your AI assistant things like:
- "Send a welcome email to user@example.com from hello@mydomain.com"
- "List all my email templates"
- "Show me email analytics for the past 7 days"
- "Validate the email address test@example.com"
- "Add john@example.com to my newsletter audience"
- "What's the delivery rate for my recent emails?"
Security Considerations
- Never expose API keys in prompts or conversation history. Always use environment variables.
- Use test mode keys (
veil_test_xxxxx) during development to avoid sending real emails. - Review email content before sending. The AI assistant will use the
send_emailtool, so verify recipient addresses and content are correct. - Scope API keys appropriately. Create dedicated API keys for MCP usage with only the permissions needed.
- Rotate keys regularly. If you suspect an API key has been compromised, rotate it immediately in the Veil Mail dashboard.
Development
# Clone the repository
git clone https://github.com/resonia/veil-mail.git
cd veil-mail/packages/mcp-server
# Install dependencies
bun install
# Build
bun run build
# Run locally
VEILMAIL_API_KEY=veil_test_xxxxx node dist/index.js
# Type check
bun run typecheck
# Watch mode
bun run dev
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。