Provides an MCP server implementation for sending emails via Postmark, offering tools for email management, template management, and delivery statistics tracking.
Postmark MCP Server
An MCP server implementation for Postmark email services.
Features
Exposes a Model Context Protocol (MCP) server for sending emails via Postmark
Simple configuration via environment variables
Comprehensive error handling and graceful shutdown
Secure logging practices (no sensitive data exposure)
Automatic email tracking configuration
Related MCP server: Gmail MCP Server
Feedback
We'd love to hear from you! Please share your feedback and suggestions through our feedback form.
Requirements
Node.js (v16 or higher recommended)
A Postmark account and server token
Setup
Clone the repository:
git clone https://github.com/ActiveCampaign/postmark-mcp cd postmark-mcpInstall dependencies:
npm installConfigure environment variables:
Copy
.env.exampleto.env:cp .env.example .envEdit
.envand fill in your Postmark credentials and settings.
| 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
Quick Install via Cursor Deeplink
You can quickly install this MCP server in Cursor by clicking the following button:
Note: After clicking the button, you'll need to:
Set your
POSTMARK_SERVER_TOKENin the MCP configurationSet your
DEFAULT_SENDER_EMAILin the MCP configurationSet your
DEFAULT_MESSAGE_STREAMin the MCP configuration (defaults to "outbound")
Claude and Cursor MCP Configuration Example
Tool Reference
This section provides a complete reference for the Postmark MCP server tools, including example prompts and expected payloads for each.
Table of Contents
Email Management Tools
1. sendEmail
Sends a single text email.
Example Prompt:
Expected Payload:
Response Format:
2. sendEmailWithTemplate
Sends an email using a pre-defined template.
Example Prompt:
Expected Payload:
Response Format:
Template Management Tools
3. listTemplates
Lists all available templates.
Example Prompt:
Response Format:
Statistics & Tracking Tools
4. getDeliveryStats
Retrieves email delivery statistics.
Example Prompt:
Expected Payload:
Response Format:
Implementation Details
Automatic Configuration
All emails are automatically configured with:
TrackOpens: trueTrackLinks: "HtmlAndText"Message stream from
DEFAULT_MESSAGE_STREAMenvironment 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 (
infofor normal operations,errorfor errors)Excludes sensitive information from logs
Provides clear operation status and results
For more information about the Postmark API, visit