About AhaSend
AhaSend is a Go MCP server module for teams using AhaSend to manage email operations through AI agents. Its tools cover sending, diagnostics, domains, campaigns, contacts, and account management, with API-key scopes controlling access.
Key features
- 01Send and schedule email
- 02Diagnose delivery and bounce issues
- 03Manage domains and templates
- 04Manage contacts, lists, and campaigns
- 05Configure webhooks and account resources
Use cases
- 01Send a one-off or template email
- 02Investigate a failed message
- 03Manage a campaign and its recipients
- 04Update domains, contacts, or webhooks
MCP support
The module builds an MCP server using the official Go MCP SDK. The host application can serve it over stdio, HTTP, or another SDK transport; tools and permissions depend on API-key scopes.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://mcp.ahasend.com/mcpclaude mcp add --transport http com-ahasend https://mcp.ahasend.com/mcp{"mcpServers":{"com-ahasend":{"type":"http","url":"https://mcp.ahasend.com/mcp"}}}Open in Cursor{"servers":{"com-ahasend":{"type":"http","url":"https://mcp.ahasend.com/mcp"}}}Open in VS Code{"mcpServers":{"com-ahasend":{"type":"http","url":"https://mcp.ahasend.com/mcp"}}}{"mcpServers":{"com-ahasend":{"serverUrl":"https://mcp.ahasend.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEahasend-mcp
A Go module with MCP tools for AhaSend. With these tools, an AI agent can send email, find out why an email failed, and manage domains, templates, contacts, lists, campaigns, webhooks, routes, suppressions, SMTP credentials and sub-accounts.
Each tool calls the AhaSend v2 API through ahasend-go. The API key's scopes decide what the agent can do.
The module builds a server with the official Go MCP SDK. Your program chooses how to serve it: stdio, HTTP, or any other SDK transport.
go get github.com/AhaSend/ahasend-mcp
Example
server, err := ahasendmcp.NewServer(
&mcp.Implementation{Name: "my-app", Version: "1.0.0"},
ahasendmcp.Options{
Client: api.NewAPIClient(api.WithAPIKey(apiKey)),
AccountID: accountID,
DashboardBaseURL: "https://dash.ahasend.com",
ConfirmationKey: key, // at least 32 random bytes
},
)
if err != nil {
return err
}
return server.Run(ctx, &mcp.StdioTransport{})
Options
| Field | What it does |
|---|---|
Client | The ahasend-go client, with the API key. Required. |
AccountID | The account the tools work on. Required. |
DashboardBaseURL | The AhaSend dashboard URL, used in campaign links. Required. |
ConfirmationKey | A secret of at least 32 bytes that signs campaign send questions. Required. |
Scopes | The API key's scopes. Only tools the key can use are shown. nil shows every tool. |
Toolsets | Show only these toolsets. nil shows all. |
ReadOnly | Show only tools that change nothing. |
Stateless | Set to true if you serve over stateless HTTP. |
MaxRecipientsPerSend | The most recipients for one send. Default 50. |
ReadInbound | Let the message tools return email the account received. Off by default. |
Blocked | If set, every tool call returns this text as an error and does nothing. |
Recorder | Gets one record per tool call: tool name, success, error kind and time taken. Never the inputs or results. |
If you serve many users, build a new server for each request with that
user's key and scopes. This is cheap. Use the same ConfirmationKey on
every instance.
Catalogue() lists every tool with the scopes it needs.
OfferedScopes() lists every scope the tools use, for a page where a user
picks scopes.
Tools
| Toolset | Tools |
|---|---|
sending | send_email, send_conversation_email, send_template_email, cancel_scheduled_email |
diagnostics | list_messages, get_message, diagnose_message, get_deliverability_stats, get_bounce_stats, get_delivery_time_stats |
domains | list_domains, get_domain, add_domain, check_domain_dns, update_domain, delete_domain |
templates | list_templates, get_template, create_template, update_template, delete_template, get_template_draft, discard_template_draft, publish_template, list_template_versions, get_template_version, restore_template_version, list_campaign_templates, get_campaign_template, create_campaign_template, update_campaign_template, delete_campaign_template |
audience | list_contacts, get_contact, create_contact, upsert_contacts, update_contact, delete_contact, list_contact_lists, list_lists, get_list, create_list, update_list, delete_list, list_list_contacts, add_contacts_to_list, upsert_list_contact, remove_contact_from_list |
campaigns | list_campaigns, get_campaign, create_campaign, update_campaign, delete_campaign, duplicate_campaign, send_campaign_test, send_campaign, schedule_campaign, unschedule_campaign, get_campaign_stats, list_campaign_recipients |
management | get_account, list_webhooks, get_webhook, create_webhook, update_webhook, delete_webhook, list_routes, get_route, create_route, update_route, delete_route, list_suppressions, add_suppression, remove_suppression, list_smtp_credentials, get_smtp_credential, delete_smtp_credential, list_sub_accounts, get_sub_account, create_sub_account, update_sub_account, get_sub_account_usage |
Each tool needs the scopes its API endpoint needs. send_campaign and
schedule_campaign also need campaigns:read and lists:read. The
campaign template tools also need campaigns:read.
List tools return 20 items by default and at most 100. Pass the returned cursor to get the next page.
There are no tools to create API keys or SMTP credentials, change account settings, billing or team members, remove all suppressions, or delete or suspend sub-accounts.
Safety rules
Campaign sends need a person's yes. send_campaign and
schedule_campaign show the user a form with the send time, the number of
contacts, the campaign name, subject, sender and lists. They send only if
the user answers yes. If the campaign changes after the question, the tool
asks again. If the client cannot show a form, the tool sends nothing and
returns a link to the campaign in the dashboard.
One-off sends have a recipient limit. A single send to more than
MaxRecipientsPerSend recipients (default 50) is refused. Use a campaign
for bulk email.
Received email is hidden by default. Anyone can send email to an
account's inbound addresses, and that email can contain text that tries to
trick the agent. Unless ReadInbound is on, the message tools do not return
received email. When it is on, received messages are marked
untrusted: true.
Errors
When the API refuses a call, the tool returns an error with the API's message and what to do next.
Trying it locally
cmd/ahasend-mcp-dev serves every tool over stdio with your own API key.
It is for testing only.
go build -o ahasend-mcp-dev ./cmd/ahasend-mcp-dev
claude mcp add ahasend \
-e AHASEND_API_KEY=... -e AHASEND_ACCOUNT_ID=... \
-- ./ahasend-mcp-dev
Set AHASEND_BASE_URL to use an API other than the default.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.