MCP
Unlayer's MCP server is under active development and coming soon. The endpoint, install commands, and connection instructions on this page describe the shape of what's shipping. Interested? Tell us how you'd use it — email support@unlayer.com or use the in-product chat in Console, and we'll loop you in early.
The Model Context Protocol (MCP) is an open standard for connecting AI clients — Claude Desktop, Cursor, Codex, Claude Code — to external tools and data sources. Unlayer's MCP server is a hosted Streamable HTTP endpoint at:
https://api.unlayer.com/mcp
Point any MCP-compatible client at that URL with a bearer token and you get a typed surface over your Unlayer workspace — no glue code, no custom integration.
Tools
The first release ships 13 tools that wrap the Cloud API, grouped by what they do:
Templates
| Tool | What it does |
|---|---|
diagnose_template | Inspect a template for common issues — schema problems, missing alt text, WCAG AA contrast, oversized images, malformed merge tags. |
get_template | Fetch one template by ID, including its design JSON. |
list_templates | List templates in a project (cursor-paginated). |
AI generation
| Tool | What it does |
|---|---|
ai_generate_design | Generate or edit a design with the AI Assistant from a freeform prompt. |
import_html_to_design | Turn an existing HTML email or page into an editable Unlayer design. |
Render, export & convert
| Tool | What it does |
|---|---|
convert_design | Convert a design between Full and Simple schema forms. |
export_design | Export a saved template or inline design to production-ready HTML. |
render_email | Render an email design (HTML output tuned for email clients). |
render_preview_image | Render a design to a PNG preview image (S3-hosted URL). |
Workspace & account
| Tool | What it does |
|---|---|
get_my_subscription | Look up the caller's plan, entitlements, and remaining AI credits. |
list_recent_releases | Fetch recent Unlayer editor releases — what's new, what changed, what's deprecated. |
list_workspaces | List the workspaces the caller has access to. |
Discovery
| Tool | What it does |
|---|---|
search_documentation | Full-text search over docs.unlayer.com — useful for grounding an AI client's answers in our docs. |
Each tool's schema is fully typed; MCP clients introspect them on connection (tools/list), so the AI client knows exactly what arguments each tool accepts and what it returns.
Authentication
Every request must carry a Bearer token in the Authorization header. The MCP server accepts the same three token types as the Cloud API: API Key (unlayer_sk_*), Personal Access Token (unlayer_pat_*), or an OAuth 2.1 access token (handled automatically by directory-listed MCP clients like Claude Desktop, via PKCE + Dynamic Client Registration).
See Authentication for step-by-step instructions on how to get each token type from Console.
Connecting from an MCP client
Claude Desktop
Add Unlayer as a Connector from the Connectors Directory (once listed) or manually with:
{
"mcpServers": {
"unlayer": {
"url": "https://api.unlayer.com/mcp"
}
}
}
Claude Desktop walks the user through the OAuth flow on first use.
Cursor / Codex / Claude Code
Any client that supports MCP over Streamable HTTP can connect with the same URL plus a bearer token. For local development and CI, an API key is the simplest path:
export UNLAYER_API_KEY=unlayer_sk_...
Production guarantees
- Origin allowlist — the server enforces an allowed-origin list (Anthropic Connectors Directory requirement).
- Request limits — 1 MiB request body cap, 240s upstream timeout (sized for AI-heavy tools like
ai_generate_design). - Tool-result truncation — results larger than 140K characters are truncated (under Anthropic's 150K cap).
- Header redaction —
Authorization,Cookie, andX-Unlayer-Project-Idare redacted from server logs.
Related
- Cloud API — the REST surface every MCP tool wraps.
- Skills — packaged context for AI coding agents that work alongside MCP.
- SDK — alternative way to call the same endpoints from code.
- CLI — terminal tool for managing templates and projects.
- Model Context Protocol specification — upstream protocol docs.