npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@iflow-mcp/postmark-mcp

v1.0.0

Published

Official Postmark MCP server for sending emails via Claude and AI assistants

Readme

Official Postmark MCP Server   NPM Version  MIT licensed

Send emails with Postmark using Claude and other MCP-compatible AI assistants.

Features

  • Exposes a Model Context Protocol (MCP) server for sending emails via your Postmark account
  • Simple configuration via environment variables
  • Comprehensive error handling and graceful shutdown
  • Secure logging practices (no sensitive data exposure)
  • Automatic email tracking configuration

Useful Docs

Feedback

We'd love to hear from you! Please share your feedback and suggestions using our feedback form.

Follow us on X - @postmarkapp


Setup

Requirements

Installation (Local Development)

Clone the repository:

git clone https://github.com/ActiveCampaign/postmark-mcp
cd postmark-mcp

Install dependencies:

npm install
# or
yarn
# or
bun install

Configuration (Local Development)

Create your own environment file from the example

cp .env.example .env

Edit your .env to contain your Postmark credentials and settings.

Important: This is intended for local development purposes only. Secrets should never be stored in version control and .env type files should be added to .gitignore.

| Variable | Description | Required | |---------------------------|--------------------------------------------------|------------| | POSTMARK_SERVER_TOKEN | Your Postmark server API token | Yes | | DEFAULT_SENDER_EMAIL | Default sender email address | Yes | | DEFAULT_MESSAGE_STREAM | Postmark message stream (e.g., 'outbound') | Yes |

Run the server:

npm start
# or
yarn start
# or
bun start

Cursor Quick Install

After installing the MCP, update your configuration to set:

  • POSTMARK_SERVER_TOKEN
  • DEFAULT_SENDER_EMAIL
  • DEFAULT_MESSAGE_STREAM (default: outbound)

Claude and Cursor MCP Configuration Example

{
  "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": "your-message-stream"
      }
    }
  }
}

Tools

This section provides a complete reference for the Postmark MCP server tools including example prompts and payloads.

Table of Contents

Email Management Tools

1. sendEmail

Sends a single text email.

Example Prompt:

Send an email using Postmark to [email protected] with the subject "Meeting Reminder" and the message "Don't forget our team meeting tomorrow at 2 PM. Please bring your quarterly statistics report (and maybe some snacks).""

Expected Payload:

{
  "to": "[email protected]",
  "subject": "Meeting Reminder",
  "textBody": "Don't forget our team meeting tomorrow at 2 PM. Please bring your quarterly statistics report (and maybe some snacks).",
  "htmlBody": "HTML version of the email body", // Optional
  "from": "[email protected]", // Optional, uses DEFAULT_SENDER_EMAIL if not provided
  "tag": "meetings" // Optional
}

Response Format:

Email sent successfully!
MessageID: message-id-here
To: [email protected]
Subject: Meeting Reminder

2. sendEmailWithTemplate

Sends an email using a pre-defined template.

Example Prompt:

Send an email with Postmark template alias "welcome" to [email protected] with the following template variables:
{
  "name": "John Doe",
  "product_name": "MyApp",
  "login_url": "https://myapp.com/login"
}

Expected Payload:

{
  "to": "[email protected]",
  "templateId": 12345, // Either templateId or templateAlias must be provided, but not both
  "templateAlias": "welcome", // Either templateId or templateAlias must be provided, but not both
  "templateModel": {
    "name": "John Doe",
    "product_name": "MyApp",
    "login_url": "https://myapp.com/login"
  },
  "from": "[email protected]", // Optional, uses DEFAULT_SENDER_EMAIL if not provided
  "tag": "onboarding" // Optional
}

Response Format:

Template email sent successfully!
MessageID: message-id-here
To: [email protected]
Template: template-id-or-alias-here

Template Management Tools

3. listTemplates

Lists all available templates.

Example Prompt:

Show me a list of all the email templates available in our Postmark account.

Response Format:

📋 Found 2 templates:

• Basic
  - ID: 12345678
  - Alias: basic
  - Subject: none

• Welcome
  - ID: 02345679
  - Alias: welcome
  - Subject: none

Statistics & Tracking Tools

4. getDeliveryStats

Retrieves email delivery statistics.

Example Prompt:

Show me our Postmark email delivery statistics from 2025-05-01 to 2025-05-15 for the "marketing" tag.

Expected Payload:

{
  "tag": "marketing", // Optional
  "fromDate": "2025-05-01", // Optional, YYYY-MM-DD format
  "toDate": "2025-05-15" // Optional, YYYY-MM-DD format
}

Response Format:

Email Statistics Summary

Sent: 100 emails
Open Rate: 45.5% (45/99 tracked emails)
Click Rate: 15.2% (15/99 tracked links)

Period: 2025-05-01 to 2025-05-15
Tag: marketing

Implementation Details

Automatic Configuration

All emails are automatically configured with:

  • TrackOpens: true
  • TrackLinks: "HtmlAndText"
  • Message stream from DEFAULT_MESSAGE_STREAM environment variable

Error Handling

The server implements comprehensive error handling:

  • Validation of all required environment variables
  • Graceful shutdown on SIGTERM and SIGINT
  • Proper error handling for API calls
  • No exposure of sensitive information in logs
  • Consistent error message formatting

Logging

  • Uses appropriate log levels (info for normal operations, error for errors)
  • Excludes sensitive information from logs
  • Provides clear operation status and results

For more information about the Postmark API, visit Postmark's Developer Documentation.

License

MIT © ActiveCampaign