Emailens MCP — Claude Code MCP server: what it does, how to install
Tests HTML, MJML, and React Email templates across 21 email clients, catching broken CSS, dark mode flaws, and Gmail clipping risks.
claude mcp add --transport http mcp https://emailens.dev/api/mcpWhat Emailens MCP 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.
What it helps with
- 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 for the agent
- 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.
How to install Emailens MCP
1Platform CLI: remote server
claude mcp add --transport http mcp https://emailens.dev/api/mcp2Platform CLI
claude mcp add --env EMAILENS_API_KEY=<EMAILENS_API_KEY> --transport stdio emailens-mcp -- npx -y @emailens/mcpReplace <…> with your own values
1Platform CLI: remote server
codex mcp add emailens-mcp --url https://emailens.dev/api/mcp2Platform CLI
codex mcp add emailens-mcp --env EMAILENS_API_KEY=<EMAILENS_API_KEY> -- npx -y @emailens/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"emailens-mcp": {
"url": "https://emailens.dev/api/mcp"
}
}
}{
"mcpServers": {
"emailens-mcp": {
"command": "npx",
"args": [
"-y",
"@emailens/mcp"
],
"env": {
"EMAILENS_API_KEY": "<EMAILENS_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"emailens-mcp": {
"type": "http",
"url": "https://emailens.dev/api/mcp"
}
}
}{
"servers": {
"emailens-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@emailens/mcp"
],
"env": {
"EMAILENS_API_KEY": "<EMAILENS_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http emailens-mcp https://emailens.dev/api/mcp2Platform CLI
gemini mcp add -e EMAILENS_API_KEY=<EMAILENS_API_KEY> emailens-mcp npx -y @emailens/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Emailens MCP
How to install Emailens MCP in Claude Code?
Run claude mcp add --transport http mcp https://emailens.dev/api/mcp for the remote service, or run claude mcp add --env EMAILENS_API_KEY=<EMAILENS_API_KEY> --transport stdio emailens-mcp -- npx -y @emailens/mcp to use the local stdio runner.
What does Emailens MCP do?
It audits newsletter markup against 21 email clients, spotting unsupported CSS rules, bad contrast in dark mode, and payload size issues. It accepts HTML, MJML, and React Email templates.
Why are source line numbers omitted for MJML and React Email?
The engine compiles MJML and JSX into HTML before running checks. Because line positions in the output do not match the original template files, the tools suppress coordinates to prevent misleading edits.