home / mcp / postmark mcp server

Postmark MCP Server

A Postmark MCP server exposing methods to send emails, manage templates, and retrieve delivery stats via MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "activecampaign-postmark-mcp": {
      "command": "node",
      "args": [
        "path/to/postmark-mcp/index.js"
      ],
      "env": {
        "DEFAULT_SENDER_EMAIL": "[email protected]",
        "POSTMARK_SERVER_TOKEN": "YOUR_POSTMARK_SERVER_TOKEN",
        "DEFAULT_MESSAGE_STREAM": "outbound"
      }
    }
  }
}

You can send emails via Postmark using an MCP-compatible server that runs alongside your applications. This MCP server handles email delivery, tracking, and template usage with secure logging and graceful shutdowns, letting you integrate Postmark-powered email workflows into your AI-assisted environment.

How to use

You run the MCP server in your environment and connect an MCP client to it. The server exposes tools to send plain emails, send templated emails, list available templates, and retrieve delivery statistics. Each operation uses your Postmark account credentials and defaults to a configured sender and message stream unless you override them per request.

How to install

Prerequisites you need before installing: - Node.js (v16 or higher) installed on your machine - A Postmark account with a server token Install steps for local development: 1) Clone the MCP server repository 2) Install dependencies with your preferred package manager 3) Create your environment file from the example and fill in credentials 4) Start the server and verify it is running

# 1) Clone the MCP server
git clone https://github.com/ActiveCampaign/postmark-mcp
cd postmark-mcp

# 2) Install dependencies
npm install
# or
yarn
# or
bun install

# 3) Prepare environment
cp .env.example .env
# Edit .env to add POSTMARK_SERVER_TOKEN, DEFAULT_SENDER_EMAIL, DEFAULT_MESSAGE_STREAM

# 4) Start the server
npm start
# or
yarn start
# or
bun start

Configuration and runtime defaults

Configure the server using environment variables. The following variables are required and used by default unless you override them per request: POSTMARK_SERVER_TOKEN, DEFAULT_SENDER_EMAIL, DEFAULT_MESSAGE_STREAM. The server automatically enables tracking of opens and links for all outgoing emails and uses the DEFAULT_MESSAGE_STREAM you provide.

POSTMARK_SERVER_TOKEN=your-postmark-server-token
[email protected]
DEFAULT_MESSAGE_STREAM=outbound

MCP configuration example

Use the following MCP configuration to run the Postmark MCP server locally. This example wires node to the index script and passes the required environment variables.

{
  "mcpServers": {
    "postmark": {
      "command": "node",
      "args": ["path/to/postmark-mcp/index.js"],
      "env": {
        "POSTMARK_SERVER_TOKEN": "your-postmark-server-token",
        "DEFAULT_SENDER_EMAIL": "[email protected]",
        "DEFAULT_MESSAGE_STREAM": "outbound"
      }
    }
  }
}

Usage examples by operation

This MCP server provides tools for common email workflows: sending a single email, sending an email with a template, listing templates, and getting delivery statistics.

Security and best practices

Keep your Postmark server token secret. Do not commit secrets to version control. Use the DEFAULT_SENDER_EMAIL and DEFAULT_MESSAGE_STREAM safely, and override them only when you need to route specific emails differently.

Notes and troubleshooting

If you encounter startup errors, ensure your environment file contains the required variables and that your Node.js version meets the minimum. Check logs for any authentication issues with Postmark and confirm that the server token has the correct permissions.

Available tools

sendEmail

Sends a single plain text email to a recipient with optional HTML body, sender, and tag.

sendEmailWithTemplate

Sends an email using a Predefined Postmark template alias or ID with template variables.

listTemplates

Lists all available Postmark templates in the connected account.

getDeliveryStats

Retrieves delivery statistics for a specified date range and optional tag.

Postmark MCP Server - activecampaign/postmark-mcp