MCP Server
Create and manage Templated email templates from Claude Desktop or any MCP client — using your own model, with no AI credits consumed.
MCP Server
Templated ships a Model Context Protocol server, so any MCP-capable client — Claude Desktop, Claude Code, agent frameworks — can create and manage templates in your account.
Bring your own model. Your AI authors the email HTML; Templated stores, renders, and exports it. Template creation via MCP never consumes Templated AI-generation or import credits — the only limit that applies is your plan's template storage cap. The one exception is the optional generate_image tool, which is metered against your AI image credits (see Tools).
Connect
You need an API key: in Templated, go to Integrations → API Keys and create one (tmpl_sk_...). Keys are scoped to a single account with editor permissions.
Option A — stdio (npm package)
Add to your MCP client config (Claude Desktop shown):
{
"mcpServers": {
"templated": {
"command": "npx",
"args": ["-y", "@templatedemails/mcp"],
"env": { "TEMPLATED_API_KEY": "tmpl_sk_..." }
}
}
}Environment variables:
| Variable | Required | Description |
|---|---|---|
TEMPLATED_API_KEY | Yes | Your tmpl_sk_ API key |
TEMPLATED_API_URL | No | API base (default https://app.templated.email/api) |
TEMPLATED_ACCOUNT_SLUG | No | Skip account auto-resolution |
Option B — remote (no install)
Point a custom connector at the hosted endpoint:
POST https://app.templated.email/api/mcp
Authorization: Bearer tmpl_sk_...The remote endpoint is stateless (single JSON responses, no SSE stream) and enforces per-key rate limits: 60 requests/min overall, 20 write tool calls/min.
Tools
| Tool | Writes | Description |
|---|---|---|
list_templates | — | List the account's templates (summaries) |
get_template | — | Fetch one template, including stored content |
create_template | ✓ | Create a template from email HTML the client model authored. Stored in HTML editor mode; no AI credits consumed |
update_template | ✓ | Patch name, description, HTML, or status |
duplicate_template | ✓ | Clone a template ("(Copy)" suffix) |
generate_image | ✓ | Generate an AI image (hosted HTTPS URL to embed in template HTML). Metered — see below |
export_html | — | Return the send-ready HTML + thumbnail URL |
create_template and duplicate_template are subject to your plan's template storage cap — the error message says so explicitly when you hit it. That cap is about stored templates, not AI usage: deleting unused templates frees capacity immediately.
generate_image is the one metered tool: it runs on Templated's image model, so each call consumes one of your plan's monthly AI image credits (the same pool the in-app editor uses; paid plans only). Args: prompt (required), aspect (1:1 | 16:9 | 4:5), optional template_id to attach the image to a template. The "never consumes credits" guarantee applies to template authoring — where your model does the work — not to server-side image generation.
Resources
The server exposes context your model should read before authoring:
| URI | Content |
|---|---|
templated://guides/authoring-html | Email-safe HTML rules (tables, inline CSS, 600px, bulletproof buttons). Read before every create_template |
templated://brand-kit | The account's brand colors, fonts, and tone |
templated://templates | Current template list |
Prompts
| Prompt | Purpose |
|---|---|
create-sales-preview | Build a personalized preview email for a prospect (args: prospect_name, optional industry, brand_notes, offer), then create + export it |
How it relates to the REST API
Every MCP tool is a thin wrapper over the REST API — the same auth, permissions, and limits apply. MCP-created templates appear in your dashboard with source api and open in the HTML editor. To convert one to visual blocks, use the HTML import endpoint (this does consume a design-import credit, since it runs Templated's conversion AI).
Errors
| Error | Meaning |
|---|---|
401 INVALID_API_KEY | Missing, malformed, or revoked key |
403 storage limit | Template cap reached — delete a template or upgrade |
429 MCP_RATE_LIMITED | Per-key request limit hit; honor Retry-After |
429 AI_IMAGE_LIMIT_* | Monthly/daily AI image credits exhausted (generate_image only) |
403 PLAN_LIMIT | AI image generation requires a paid plan (generate_image on Free) |
422 | Image prompt declined by the provider's content filter — reword it |
JSON-RPC -32000 | Write rate limit hit; retry after the stated delay |