npm package: @poststack.dev/mcp
Description: MCP server for interacting with the PostStack Email API
Latest version: 0.1.0

# @poststack.dev/mcp

MCP (Model Context Protocol) server for interacting with the [PostStack](https://poststack.dev) Email API. Allows AI assistants like Claude to send emails, manage domains, contacts, templates, broadcasts, and more.

## Setup

### Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows):

```json
{
	"mcpServers": {
		"poststack": {
			"command": "npx",
			"args": ["-y", "@poststack.dev/mcp"],
			"env": {
				"POSTSTACK_API_KEY": "sk_live_your_api_key_here"
			}
		}
	}
}
```

### Claude Code

```bash
claude mcp add poststack -- npx -y @poststack.dev/mcp -e POSTSTACK_API_KEY=sk_live_your_api_key_here
```

### Cursor / VS Code

Add to your MCP settings:

```json
{
	"poststack": {
		"command": "npx",
		"args": ["-y", "@poststack.dev/mcp"],
		"env": {
			"POSTSTACK_API_KEY": "sk_live_your_api_key_here"
		}
	}
}
```

## Environment Variables

| Variable             | Required | Description                                             |
| -------------------- | -------- | ------------------------------------------------------- |
| `POSTSTACK_API_KEY`  | Yes      | Your PostStack API key (`sk_live_...` or `sk_test_...`) |
| `POSTSTACK_BASE_URL` | No       | API base URL (defaults to `https://api.poststack.dev`)  |

## Available Tools

### Emails

- `send_email` — Send a single email
- `send_batch_emails` — Send multiple emails in one request
- `list_emails` — List emails with filters (status, domain, date range, recipient)
- `get_email` — Get email details and events
- `cancel_email` — Cancel a scheduled email
- `reschedule_email` — Reschedule a scheduled email

### Domains

- `create_domain` — Add a sending domain
- `list_domains` — List all domains
- `get_domain` — Get domain details with DNS records
- `verify_domain` — Trigger DNS verification
- `update_domain` — Update tracking/TLS settings
- `delete_domain` — Remove a domain

### Contacts

- `create_contact` — Create a contact
- `list_contacts` — Search and list contacts
- `get_contact` — Get contact details
- `update_contact` — Update contact info
- `delete_contact` — Delete a contact
- `unsubscribe_contact` — Unsubscribe a contact

### Templates

- `create_template` — Create an email template
- `list_templates` — List all templates
- `get_template` — Get template details
- `update_template` — Update a template
- `delete_template` — Delete a template

### Broadcasts

- `create_broadcast` — Create a broadcast to a segment
- `list_broadcasts` — List all broadcasts
- `get_broadcast` — Get broadcast details and stats
- `update_broadcast` — Update a draft broadcast
- `send_broadcast` — Send a broadcast
- `cancel_broadcast` — Cancel a broadcast

### Webhooks

- `create_webhook` — Create a webhook endpoint
- `list_webhooks` — List all webhooks
- `get_webhook` — Get webhook details
- `update_webhook` — Update a webhook
- `delete_webhook` — Delete a webhook

### Segments

- `create_segment` — Create a contact segment
- `list_segments` — List all segments
- `get_segment` — Get segment details
- `update_segment` — Rename a segment
- `delete_segment` — Delete a segment
- `add_contacts_to_segment` — Add contacts to a segment
- `remove_contact_from_segment` — Remove a contact from a segment

### Suppressions

- `list_suppressions` — List suppressed addresses
- `add_suppression` — Suppress an email address
- `remove_suppression` — Remove a suppression

### API Keys

- `create_api_key` — Create an API key
- `list_api_keys` — List API keys
- `get_api_key` — Get API key details
- `revoke_api_key` — Revoke an API key

### Mailboxes

- `create_mailbox` — Create a mailbox
- `list_mailboxes` — List all mailboxes
- `get_mailbox` — Get mailbox details
- `update_mailbox` — Update mailbox settings
- `delete_mailbox` — Delete a mailbox
- `change_mailbox_password` — Change mailbox password

## License

MIT