Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

MCP

Under active development

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

ToolWhat it does
diagnose_templateInspect a template for common issues — schema problems, missing alt text, WCAG AA contrast, oversized images, malformed merge tags.
get_templateFetch one template by ID, including its design JSON.
list_templatesList templates in a project (cursor-paginated).

AI generation

ToolWhat it does
ai_generate_designGenerate or edit a design with the AI Assistant from a freeform prompt.
import_html_to_designTurn an existing HTML email or page into an editable Unlayer design.

Render, export & convert

ToolWhat it does
convert_designConvert a design between Full and Simple schema forms.
export_designExport a saved template or inline design to production-ready HTML.
render_emailRender an email design (HTML output tuned for email clients).
render_preview_imageRender a design to a PNG preview image (S3-hosted URL).

Workspace & account

ToolWhat it does
get_my_subscriptionLook up the caller's plan, entitlements, and remaining AI credits.
list_recent_releasesFetch recent Unlayer editor releases — what's new, what changed, what's deprecated.
list_workspacesList the workspaces the caller has access to.

Discovery

ToolWhat it does
search_documentationFull-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 redactionAuthorization, Cookie, and X-Unlayer-Project-Id are redacted from server logs.
  • 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.