MCP server

Connect an AI agent with MCP

A Model Context Protocol server that gives Claude, Cursor, and other MCP clients direct, typed access to the real Postline API — send email, verify domains, and manage suppressions and webhooks, using the same API key you'd use with curl.

Read the AI integration guide

What it is

The Postline MCP server is hosted at https://api.srs-postline.com/mcp over Streamable HTTP. There is nothing to download or build locally. It uses your existing srs_test_ or srs_live_ API key as a Bearer secret.

Every tool call goes straight to the real REST API. There is no simulated or cached data layer — a send_email call queues a real message the same as a curl request would.

Available tools

  • send_email, get_email, list_emails — queue a message, check its status, list recent sends.
  • create_domain, list_domains, verify_domain — register a sending domain and re-run DNS checks.
  • check_suppression, add_suppression, remove_suppression — read and manage the suppression list.
  • list_webhooks, create_webhook, delete_webhook — manage event endpoints.

Connect it

Claude connects in one command. Codex reads the Bearer key from an environment variable, then adds the hosted server:

claude mcp add --scope user --transport http postline https://api.srs-postline.com/mcp \
  --header "Authorization: Bearer srs_test_xxx"

export POSTLINE_API_KEY='srs_test_xxx'
codex mcp add postline --url https://api.srs-postline.com/mcp \
  --bearer-token-env-var POSTLINE_API_KEY

Safety rules built in

  • send_email has no way to be called without an idempotencyKey — retries cannot double-send.
  • Every tool surfaces Postline's real HTTP status with a plain-English hint (401 bad key, 403 unverified domain, 422 suppressed recipient, 429/503 back off) instead of swallowing errors.
  • remove_suppression is documented as for the recipient's or user's explicit request only — not a way to force a blocked send through.
  • There is no get_analytics tool. Postline does not expose an aggregated analytics endpoint yet; list_emails and list_domains return raw data for the agent to summarize itself.

Machine-readable references

  • /.well-known/mcp/server-card.json — structured discovery card for this server.
  • /.well-known/agent-skills/postline-email-integration/SKILL.md — Claude Skill covering both the MCP server and direct REST calls.
  • /llms.txt — condensed index of the integration rules for agent context windows.