DocumentationAI agents & MCP

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

ToolDoesScope
send_emailSend a transactional email with raw HTMLemail:send
send_templateSend a published template by slug, filling {{variables}}email:send
get_logsList recent send logs (paginated)email:read
list_templatesList templates so the agent can find published slugstemplates: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.