AI agents & MCP
Let AI agents send email through MailingCore via the MCP server and agent-readable docs.
MailingCore is built to be driven by AI agents. There are two ways in: the MCP server for tool-calling agents, and machine-readable docs for anything that reads the web.
MCP server
@mailingcore/mcp-server (v0) exposes MailingCore as Model Context Protocol tools over stdio. Add it to your MCP client (for example Claude Desktop):
{
"mcpServers": {
"mailingcore": {
"command": "npx",
"args": ["-y", "@mailingcore/mcp-server"],
"env": { "MAILINGCORE_API_KEY": "mc_live_xxx" }
}
}
}
The API key lives only in the server process — it is never passed as a tool argument. Configuration is via environment variables: MAILINGCORE_API_KEY (required), MAILINGCORE_BASE_URL (default https://api.mailingcore.com), MAILINGCORE_TIMEOUT_MS (default 30000).
Tools
| Tool | Does | Scope |
|---|---|---|
send_email | Send a transactional email with raw HTML | email:send |
send_template | Send a published template by slug, filling {{variables}} | email:send |
get_logs | List recent send logs (paginated) | email:read |
list_templates | List templates so the agent can find published slugs | templates:read |
Give the MCP server an API key scoped to just what your agent needs.
Agent-readable docs
For agents that read the web rather than call tools:
/llms.txt— a compact index of the docs for LLMs./agents.md— how an agent should use MailingCore.GET /v1/agents/capabilities— a machine-readable descriptor (auth, scopes, limits, error codes, endpoints, webhooks).
See API keys & scopes to create a scoped key.