# Emailens MCP

Tests HTML, MJML, and React Email templates across 21 email clients, catching broken CSS, dark mode flaws, and Gmail clipping risks.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: emailens
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/emailens/mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/emailens-mcp

## What it does

Email clients vary wildly in CSS rendering. This MCP server tests email templates against compatibility records covering 298 layout and styling properties. It processes raw HTML, MJML files, Maizzle markup, and React Email components by compiling them first so testing mirrors the final payload.

The `analyze_email` tool groups findings by property and severity instead of repeating warnings per client. That prevents huge JSON payloads from consuming the model's context window. Line and column positions are returned for plain HTML files, but omitted for MJML and JSX because compilation alters source line numbers.

The `audit_email` tool inspects dark mode text contrast, image issues, broken links, spam indicators, and Gmail file size limits. Basic checks run locally via `npx` without an account. An API key is required only when using the hosted remote endpoint or capturing visual screenshots.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://emailens.dev/api/mcp`
- Environment variables: `EMAILENS_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http mcp https://emailens.dev/api/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env EMAILENS_API_KEY=<EMAILENS_API_KEY> --transport stdio emailens-mcp -- npx -y @emailens/mcp
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add emailens-mcp --url https://emailens.dev/api/mcp
```

2. **Platform CLI**
```bash
codex mcp add emailens-mcp --env EMAILENS_API_KEY=<EMAILENS_API_KEY> -- npx -y @emailens/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "emailens-mcp": {
            "url": "https://emailens.dev/api/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "emailens-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@emailens/mcp"
            ],
            "env": {
                "EMAILENS_API_KEY": "<EMAILENS_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "emailens-mcp": {
            "type": "http",
            "url": "https://emailens.dev/api/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "emailens-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@emailens/mcp"
            ],
            "env": {
                "EMAILENS_API_KEY": "<EMAILENS_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http emailens-mcp https://emailens.dev/api/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e EMAILENS_API_KEY=<EMAILENS_API_KEY> emailens-mcp npx -y @emailens/mcp
```
Replace <…> with your own values

## When to use it
- audit email templates across 21 rendering engines
- detect unsupported CSS properties before sending newsletters
- inspect dark mode contrast and text visibility issues
- check HTML size to prevent email clipping in Gmail

## Example prompts
- Inspect welcome.mjml with Emailens and list issues specific to Outlook desktop.
- Run audit_email on template.html to verify dark mode contrast and Gmail clipping.
- Analyze this raw HTML snippet with analyze_email for Gmail and Apple Mail.

## Similar
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [tldraw](https://affpapa.org/en/nevibecode/mcp/tldraw.md) — MCP server · ★ 51104
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16073
- [mcp-server-chart](https://affpapa.org/en/nevibecode/mcp/mcp-server-chart.md) — MCP server · ★ 4406
- [Dembrandt](https://affpapa.org/en/nevibecode/mcp/dembrandt.md) — MCP server · ★ 3851
- [RevoGrid DataGrid MCP Pro](https://affpapa.org/en/nevibecode/mcp/revogrid-datagrid-mcp-pro.md) — MCP server · ★ 3451

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
