{
  "markdown": "<div align=\"center\">\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"./docs/wordmark-dark.svg\">\n  <img src=\"./docs/wordmark-light.svg\" alt=\"emailens / mcp\" width=\"444\">\n</picture>\n\n**Email rendering analysis for AI assistants**\n\n[![CI](https://github.com/emailens/mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/emailens/mcp/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@emailens/mcp)](https://www.npmjs.com/package/@emailens/mcp)\n[![license](https://img.shields.io/npm/l/@emailens/mcp)](./LICENSE)\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)\n[![Smithery](https://smithery.ai/badge/@emailens/emailens-mcp)](https://smithery.ai/server/emailens/emailens-mcp)\n[![GitHub stars](https://img.shields.io/github/stars/emailens/mcp?style=flat)](https://github.com/emailens/mcp/stargazers)\n\n</div>\n\nMCP server for email compatibility analysis. Analyze, preview, diff, and fix emails across 21 email clients, plus capture real screenshots and create shareable links with an optional API key.\n\nSend **HTML, MJML, Maizzle or React Email**. Set `format` and the template is compiled before analysis, so what gets checked is the HTML your readers actually receive.\n\nWhy your assistant needs this: across the 255 CSS and HTML features we track, only 6 are fully supported in every major email client ([see the data](https://emailens.dev/email-css/report)). Ask Claude to check your email before you send it.\n\nBuilt on [`@emailens/engine`](https://github.com/emailens/engine). Also available as a [GitHub Action](https://github.com/marketplace/actions/emailens-email-preview-check).\n\n## Install\n\n```bash\nnpx -y @emailens/mcp\n```\n\n## Setup\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"emailens\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@emailens/mcp\"]\n    }\n  }\n}\n```\n\n### Claude Code\n\n```bash\nclaude mcp add emailens -- npx -y @emailens/mcp\n```\n\n### With API Key (optional, unlocks screenshots + sharing)\n\n```json\n{\n  \"mcpServers\": {\n    \"emailens\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@emailens/mcp\"],\n      \"env\": {\n        \"EMAILENS_API_KEY\": \"ek_live_...\"\n      }\n    }\n  }\n}\n```\n\nGet your free API key at [emailens.dev/settings/api-keys](https://emailens.dev/settings/api-keys).\n\n### Remote (no install)\n\nUse the hosted endpoint: no npm or Node.js needed. API key required.\n\n```json\n{\n  \"mcpServers\": {\n    \"emailens\": {\n      \"url\": \"https://emailens.dev/api/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer ek_live_...\"\n      }\n    }\n  }\n}\n```\n\n## Tools\n\n### Local Tools (no account needed)\n\n#### `preview_email`\n\nFull email compatibility preview: transforms HTML for 21 clients, analyzes CSS, generates scores, simulates dark mode, checks inbox preview and email size.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML source |\n| `clients` | string[] | No | Filter to specific client IDs |\n| `format` | enum | No | `\"html\"`, `\"jsx\"`, `\"mjml\"`, `\"maizzle\"` |\n\n#### `analyze_email`\n\nQuick CSS compatibility analysis; returns per-client scores and one finding per problem. Faster than `audit_email` when you only need CSS compatibility.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML source |\n| `format` | enum | No | Input format |\n| `detail` | enum | No | `\"summary\"` (default) or `\"full\"` |\n| `clients` | string[] | No | Only report these client IDs |\n\n**One finding per problem, not one per client.** The engine reports per client\nbecause a score is per client, and per selector because a fix is per selector.\nOn an ordinary newsletter `border-radius` arrives twelve times (two clients\nthat drop it, six selectors that use it) with the same sentence in every copy.\nThat was 286KB of JSON, about 73,000 tokens, for an 11KB email.\n\nFindings group by property, severity and message, listing the clients affected,\nwith positions merged across all of them. The same email now returns 40KB.\n\n```json\n{\n  \"property\": \"border-radius\",\n  \"severity\": \"warning\",\n  \"clients\": [\"outlook-windows\", \"outlook-windows-legacy\"],\n  \"message\": \"Does not support \\\"border-radius\\\". Round corners can be used in VML…\",\n  \"fixType\": \"structural\",\n  \"hasFix\": true,\n  \"loc\": { \"line\": 61, \"column\": 28, \"offset\": 2753, \"length\": 171 },\n  \"alsoAtLines\": [62, 64, 75, 78, 87]\n}\n```\n\nFix snippets are not included; they were 93KB of that 286KB, and `fix_email`\nproduces them for the issues you decide to act on. `hasFix` tells you one is\navailable; `fixType` tells you whether the repair is markup or CSS.\n\nPass `detail: \"full\"` for the engine's per-client shape with snippets, and\n`clients: [\"gmail-web\", \"outlook-windows\"]` to report only what you care about:\nthe fastest further saving, roughly halving the response for two clients.\nScores stay whole-email either way: narrowing the report does not change what\nthe email is worth elsewhere. An unknown client ID is rejected by name; an\nempty result would read as \"this email is fine for that client\".\n\n**Source positions.** For HTML input, every warning carries `loc` (`line`,\n`column`, `offset`, `length`) for the first occurrence, plus `alsoAtLines` for\nany others, so an assistant can edit the exact source and knows where the rest\nare. `audit_email` positions its other findings the same way.\n\n```json\n{\n  \"property\": \"border-radius\",\n  \"loc\": { \"line\": 7, \"column\": 8, \"offset\": 142, \"length\": 25 },\n  \"alsoAtLines\": [12, 19]\n}\n```\n\nLater occurrences are line numbers rather than full positions on purpose: this\nresponse is read by a model paying for every token, and a real newsletter can\nproduce over a thousand occurrences; carrying them all in full nearly doubles\nthe payload.\n\nPositions are reported for `html` input only. JSX, MJML and Maizzle are compiled\nbefore analysis, so a line number would point into generated output rather than\nthe file you have open: the tools omit it instead of returning one that looks\nauthoritative.\n\n#### `audit_email`\n\nComprehensive quality audit: CSS compatibility, spam scoring, link validation, accessibility, images, inbox preview, size (Gmail clipping), template variables, content overflow, visual bugs, dark-mode and mobile text contrast, and design consistency.\n\nThe last three cover what a light desktop preview cannot show: text that disappears when a client forces dark mode or when the email's own dark block repaints a surface without re-colouring the text on it, contrast below the email's breakpoint, and colours that differ by value but not to a reader.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML source |\n| `format` | enum | No | Input format |\n| `detail` | enum | No | `\"summary\"` (default) or `\"full\"` |\n| `clients` | string[] | No | Only report these client IDs |\n| `skip` | string[] | No | Checks to skip (e.g. `[\"spam\", \"images\"]`) |\n\n#### `fix_email`\n\nGenerate a structured fix prompt for compatibility issues. Returns markdown with fix instructions that the AI can apply directly.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML to fix |\n| `format` | enum | No | Controls fix syntax |\n| `scope` | enum | No | `\"all\"` or `\"current\"` |\n| `selectedClientId` | string | No | Client ID for scoped fixes |\n\n#### `list_clients`\n\nList all 21 supported email clients with IDs, names, engines, and dark mode support.\n\n#### `diff_emails`\n\nCompare two email HTML versions; shows score changes, fixed issues, and introduced issues per client.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `before` | string | Yes | Original email HTML |\n| `after` | string | Yes | Modified email HTML |\n| `format` | enum | No | Input format |\n\n#### `check_deliverability`\n\nCheck email deliverability for a domain: SPF, DKIM, DMARC, MX, BIMI records with a score and actionable issues.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `domain` | string | Yes | Domain to check (e.g. `\"company.com\"`) |\n\n### Hosted Tools (require `EMAILENS_API_KEY`)\n\n#### `capture_screenshots`\n\nCapture real email screenshots across 21 clients in real browsers. Screenshots are hosted on CDN.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML source |\n| `format` | enum | No | Input format |\n| `clients` | string[] | No | Filter clients |\n| `modes` | string[] | No | `[\"light\"]`, `[\"dark\"]`, or `[\"light\", \"dark\"]` |\n| `title` | string | No | Name for the preview |\n\nFree plan: 30 previews/day. [Sign up](https://emailens.dev?ref=mcp)\n\n#### `share_preview`\n\nCreate a shareable link. Recipients see the full analysis without an account.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `html` | string | Yes | Email HTML source |\n| `title` | string | No | Display title |\n| `format` | enum | No | Input format |\n\nRequires Dev plan ($9/mo). Share links expire after 7 days (Dev) or never (Pro).\n\n## Template formats\n\n`format` accepts `html` (the default), `mjml`, `maizzle` and `jsx` (React\nEmail). Anything but `html` is compiled before analysis and also decides the\nsyntax the fix snippets come back in.\n\nCompiling matters more than it sounds. An email client renders the *output*, so\nthat is what has to be checked: handed a raw `<mjml>` document, an HTML parser\nfinds no CSS in it and reports a perfectly clean email. An answer like that is\nworse than an error, because an assistant will repeat it.\n\n**The compilers are not bundled.** MJML alone pulls 56MB, and this server is\nusually started with `npx`, so the engine keeps them as optional peer\ndependencies:\n\n```bash\nnpm install mjml                                              # MJML\nnpm install @maizzle/framework                                # Maizzle\nnpm install sucrase react @react-email/components @react-email/render  # React Email\n```\n\nThey have to be installed where the server runs, which is not always somewhere\nyou control. If it is not, compile the template yourself and send the resulting\nHTML with `format: \"html\"`: the tools say so when they hit this.\n\n## Supported Email Clients (21)\n\n| Client | ID | Dark Mode | Notes |\n|---|---|---|---|\n| Gmail | `gmail-web` | Yes | |\n| Gmail Android | `gmail-android` | Yes | |\n| Gmail iOS | `gmail-ios` | Yes | |\n| Outlook 365 | `outlook-web` | Yes | |\n| Outlook Windows | `outlook-windows` | No | |\n| Outlook Windows Legacy | `outlook-windows-legacy` | No | Deprecated Oct 2026 |\n| Outlook iOS | `outlook-ios` | Yes | New in v0.4.0 |\n| Outlook Android | `outlook-android` | Yes | New in v0.4.0 |\n| Outlook for Mac | `outlook-macos` | Yes | New in v0.10.0 |\n| Apple Mail | `apple-mail-macos` | Yes | |\n| Apple Mail iOS | `apple-mail-ios` | Yes | |\n| Yahoo Mail | `yahoo-mail` | Yes | |\n| Yahoo Mail Android | `yahoo-mail-android` | Yes | New in v0.10.0 |\n| Yahoo Mail iOS | `yahoo-mail-ios` | Yes | New in v0.10.0 |\n| Samsung Mail | `samsung-mail` | Yes | |\n| Thunderbird | `thunderbird` | No | |\n| HEY Mail | `hey-mail` | Yes | |\n| Proton Mail | `protonmail` | Yes | New in v0.10.0 |\n| AOL Mail | `aol` | Yes | New in v0.10.0 |\n| Fastmail | `fastmail` | Yes | New in v0.10.0 |\n| Superhuman | `superhuman` | Yes | |\n\n## Releasing\n\nTwo publishes: npm, and the MCP registry. The registry listing sat five\nreleases behind because nothing pushed `server.json`, so that half is a\nworkflow now. [RELEASING.md](./RELEASING.md) has the details and the four\nplaces the version has to agree.\n\n## Development\n\n```bash\nbun install\nbun run build\nbun test\nbun run typecheck\n```\n\n## License\n\nMIT\n\n---\n\nIf this saved you from an Outlook surprise, [a star](https://github.com/emailens/mcp) helps other email developers find it.\n",
  "bytes": 11780,
  "sha": "6ca8ecb28ac0528694659a5f4694c3db9da817f77af83688a7e7d2a1922f783f",
  "repo_slug": "emailens/mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_emailens_mcp_297c5829/readme"
}