An MCP (Model Context Protocol) server that exposes the Posta email API as tools for AI assistants.
go build -o posta-mcp .The server requires two environment variables:
| Variable | Description |
|---|---|
POSTA_BASE_URL |
Your Posta instance URL (e.g. https://posta.example.com) |
POSTA_API_KEY |
API key generated from your Posta workspace |
{
"mcpServers": {
"posta": {
"command": "/path/to/posta-mcp",
"env": {
"POSTA_BASE_URL": "https://posta.example.com",
"POSTA_API_KEY": "your-api-key"
}
}
}
}You can also run it with go run during development:
{
"mcpServers": {
"posta": {
"command": "go",
"args": ["run", "/path/to/mcp-server"],
"env": {
"POSTA_BASE_URL": "https://posta.example.com",
"POSTA_API_KEY": "your-api-key"
}
}
}
}Send a single email.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
from |
string | yes | Sender email address |
to |
string[] | yes | Recipient email addresses |
subject |
string | yes | Email subject line |
html |
string | no | HTML body |
text |
string | no | Plain-text body |
headers |
object | no | Custom email headers |
list_unsubscribe_url |
string | no | List-Unsubscribe header URL |
list_unsubscribe_post |
boolean | no | Enable one-click unsubscribe |
send_at |
string | no | ISO 8601 datetime to schedule the email |
Send an email using a pre-defined template.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
template_id |
number | no | Template numeric ID (preferred) |
template |
string | no | Template name (fallback) |
language |
string | no | Template language variant |
from |
string | no | Sender email address |
to |
string[] | yes | Recipient email addresses |
template_data |
object | no | Key-value data rendered into the template |
Send batch emails to multiple recipients using a template.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
template_id |
number | no | Template numeric ID (preferred) |
template |
string | no | Template name (fallback) |
language |
string | no | Default language for all recipients |
from |
string | no | Sender email address |
recipients |
array | yes | List of { email, language?, template_data? } objects |
Get the delivery status of a sent email.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
email_id |
string | yes | The email UUID |
Returns: status, error message (if any), retry count, timestamps.
Retry sending a failed email. Only emails with status failed can be retried.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
email_id |
string | yes | The email UUID to retry |
This project is licensed under the Apache License 2.0. See LICENSE for details.
Copyright © 2026 Jonas Kaninda