# Postmark MCP

> Postmark MCP lets your AI client handle all transactional email tasks. Dispatch plain text or rich HTML emails using stored templates, monitor real-time delivery statistics, and dive into raw SMTP logs to find out exactly why an email bounced. It manages spam complaints, tracks bounces across large volumes, and keeps track of every template layout—all from a single chat window.

## Overview
- **Category:** communication-messaging
- **Price:** Free
- **Tags:** transactional-email, smtp-delivery, email-templates, bounce-tracking, email-api, delivery-metrics

## Description

This MCP lets your AI client manage Postmark directly via conversational prompts. You don't need to log into the dashboard or copy-paste any IDs anymore. Need to send a welcome email? Just ask, and it uses templates to dispatch the message. If something goes wrong—say, an email bounces—it pulls detailed SMTP traces so you can see exactly what the recipient server rejected. It also lets you check current delivery stats or list recent spam complaints without leaving your chat window. Everything is available through Vinkius, meaning you connect once and gain access to this powerful communication suite right alongside other services you use.

## Tools

### delete_template
Removes an existing email template from the Postmark account.

### update_server_config
Changes or updates the specified name for your sending server configuration.

### get_bounce_logs
Retrieves detailed SMTP logs showing why a specific email delivery attempt failed.

### list_bounces
Provides an overview list of recent emails that bounced for any reason.

### get_delivery_stats
Pulls current operational metrics, including open rates and total bytes sent by the server.

### get_server_config
Retrieves the full, current configuration details for your Postmark account.

### list_spam_complaints
Lists recent records of emails that were reported as spam by recipients.

### list_templates
Retrieves a list of all available email templates stored in the system.

### send_email
Sends an ad-hoc email using either plain text or full HTML content.

### send_with_template
Sends a fully formatted, personalized email by mapping data to an existing template ID.

## Prompt Examples

**Prompt:** 
```
Can you check if we had any hard bounces yesterday, and tell me why?
```

**Response:** 
```
I checked `list_bounces`. You had exactly 2 hard bounces related to the `@test.local` domain. Fetching `get_bounce_logs` for UUID `192...`, the upstream MTA rejected it throwing a `550 5.1.1 User Unknown` SMTP code. The inbox genuinely doesn't exist.
```

**Prompt:** 
```
List all active Postmark templates, then delete the one clearly named 'Legacy Promo'.
```

**Response:** 
```
Listing your templates... Found 5 active. I have identified 'Legacy Promo' mapped to `template_id` 89321. I'm now invoking `delete_template` on 89321. The layout has been completely purged from your Postmark server.
```

**Prompt:** 
```
Send a welcome email through Postmark using template ID `10101` to `user@example.com`.
```

**Response:** 
```
Dispatched gracefully using `send_with_template`. Postmark accepted the request to route template `10101` towards `user@example.com` specifying the sender address `admin@yourdomain.com`. It resolved via message UUID `abc-123`.
```

## Capabilities

### Send formatted emails
Dispatch both simple text messages and complex HTML emails using pre-approved templates.

### Investigate delivery failures
Retrieve specific SMTP logs to pinpoint the exact reason an email was rejected, like a DNS timeout or invalid user format.

### Check bounce history
List recent bounces and get high-level metrics on deliverability health across your entire sending volume.

### Manage email content
View, list, or delete old templates to keep your mailing architecture clean and up to date.

### Audit server settings
Get current operational details for the Postmark account or update specific server configurations as needed.

## Use Cases

### A user reports a 'hard bounce'
The support agent asks the agent to run 'list_bounces'. The AI finds the UUID and then calls 'get_bounce_logs' on that ID, immediately telling the agent: 'It failed with SMTP code 550. The mailbox doesn't exist.' This solves the problem in two steps instead of ten clicks.

### A developer needs to send a test message
The QA team member asks the agent to use 'send_with_template', specifying the template ID and target user. The AI sends the formatted email, allowing the tester to validate that the system correctly maps all variables before production deployment.

### A marketing manager needs cleanup
The agent is asked to 'list_templates' to see what content exists. Seeing an outdated layout, the manager instructs it to use 'delete_template', purging the old asset and keeping the server clean.

### A technical user needs server data
The backend engineer asks the agent for current settings using 'get_server_config'. This provides an instant audit trail of credentials and webhooks, preventing them from having to manually check multiple dashboard tabs.

## Benefits

- Stop logging into Postmark dashboards just to check if a bounce happened. You can ask your agent to run 'list_bounces' and get an immediate summary of the issue, saving time and clicks.
- Debugging failed deliveries is no longer guesswork. By calling 'get_bounce_logs', you pull the raw SMTP trace needed to pinpoint whether the failure was due to a bad DNS record or an invalid user address.
- Managing content gets simple. Instead of navigating complex template menus, you can use 'list_templates' and 'delete_template' via natural conversation to clean up old assets.
- You get immediate insight into your sending volume by calling 'get_delivery_stats'. This gives you crucial metrics on open rates and total bytes sent without needing a dedicated reporting tool.
- The agent can send messages in two ways: using the simple 'send_email' for quick alerts, or using 'send_with_template' to ensure brand consistency across all outgoing communications.

## How It Works

The bottom line is you talk to your AI client like talking to an employee who has read the Postmark API documentation and can execute commands instantly.

1. Subscribe to this MCP and enter your unique Postmark Server Token.
2. Your AI client authenticates with Vinkius, giving it immediate access to all available email tools.
3. You ask your agent to perform a task—like 'check the bounce logs for yesterday'—and receive actionable data directly in chat.

## Frequently Asked Questions

**How do I check if an email failed using Postmark MCP?**
You use the `get_bounce_logs` tool. This pulls detailed SMTP traces, telling you exactly what rejection code was returned (like 550) and why the recipient server rejected it.

**Can I send a personalized email with Postmark MCP?**
Yes, use `send_with_template`. This tool allows you to map specific data points into your existing HTML templates so every message looks professional and customized.

**What is the difference between sending an email and using a template with Postmark MCP?**
Sending a plain `send_email` is for quick, simple text messages. Using `send_with_template` ensures your message uses rich HTML formatting and variable mapping defined in a stored layout.

**Do I need to run 'list_bounces' every time an email fails?**
No, you can ask the agent to list recent bounces first using `list_bounces` for an overview. Then, if you need deep detail on one specific bounce, use `get_bounce_logs`.

**How do I keep my templates organized with Postmark MCP?**
You can view all your assets using `list_templates`. When a template is retired, you should run `delete_template` to keep the system clean and reduce clutter.