npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

email-design-mcp

v0.3.0

Published

MCP server for AI-assisted email template design and generation

Readme

email-design-mcp

An open-source MCP server that enables AI assistants to design and generate professional, responsive email templates.

Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client.

Features

  • Generate emails from natural language - Describe what you want, get production-ready MJML + HTML
  • Brand memory - Save brand colors, fonts, and tone once, use across all emails
  • Expert design built-in - Professional spacing, typography, color usage, and CTA patterns enforced automatically
  • Iterative refinement - Say "make the headline bigger" or "remove the testimonials section" in plain English
  • Layout variety - 12 layout variants across 4 email types prevent repetitive designs
  • Live preview - Local preview server with hot reload at http://localhost:3947
  • Validation - Checks size limits, dark mode, accessibility, links, and more
  • Export - Get HTML, MJML, or both for any generated email
  • Guided workflows - MCP prompts walk you through creating welcome, newsletter, promotional, and transactional emails
  • No API keys needed - Uses the host AI model (Claude, GPT, etc.) for generation

Quick Start

Install

npm install -g email-design-mcp

Connect to Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "email-design": {
      "command": "email-design-mcp"
    }
  }
}

Connect to Cursor / VS Code

Add to .cursor/mcp.json or VS Code MCP settings:

{
  "mcpServers": {
    "email-design": {
      "command": "npx",
      "args": ["email-design-mcp"]
    }
  }
}

Usage

1. Set up your brand (optional but recommended)

Option A — Auto-extract from website:

"Set up a brand from https://acme.com"

The server fetches the site and extracts colors, fonts, logo, and name automatically.

Option B — Manual setup:

"Set up a brand called Acme with primary color #FF6B35, secondary #1A1A2E, casual tone, targeting young professionals"

You can also combine both — provide a URL for auto-extraction and override specific values manually.

2. Generate an email

"Create a welcome email for new subscribers"

The server composes an expert prompt stack with design rules, brand context, and layout instructions. The AI generates MJML, which is compiled to responsive HTML.

3. Refine

"Make the headline bigger and change the button to say 'Start Free Trial'"

Refinements target specific sections without regenerating the whole email. Version history lets you undo changes.

4. Export

"Export the email as HTML"

Get the final HTML or MJML ready to paste into your ESP.

Tools

| Tool | Description | |------|-------------| | setup_brand | Save a brand profile (colors, fonts, tone) | | generate_email | Generate an email from a natural language prompt | | refine_email | Iterate on a generated email with feedback | | compile_mjml | Compile raw MJML to HTML | | validate_email | Check email for best practices | | export_email | Export as HTML, MJML, or both | | screenshot_to_email | Convert a design description to a branded email |

Guided Workflows (MCP Prompts)

These prompts walk you through creating specific email types with smart defaults:

| Prompt | Description | |--------|-------------| | welcome-email | Welcome email for new subscribers | | newsletter | Newsletter with featured content | | promotional | Sale/launch email with urgency | | transactional | Receipt, confirmation, or shipping notification |

Templates

4 bundled MJML templates with placeholder variables:

  • Welcome - Hero image + intro text + CTA
  • Newsletter - Featured article + content grid + footer
  • Promotional - Hero offer + product showcase + urgency
  • Transactional - Order confirmation with itemized details

Validation Checks

| Check | What it verifies | |-------|-----------------| | Email size | Under Gmail's 102KB clipping threshold | | Dark mode | color-scheme: light dark declaration | | Alt text | All images have meaningful alt attributes | | Links | All <a> tags have href attributes | | Unsubscribe | Footer contains unsubscribe link | | Text ratio | Sufficient text relative to images | | Viewport | Mobile viewport meta tag | | Preheader | Hidden preview text for inbox | | Title | HTML title tag present | | Inline styles | Styles inlined for email client compatibility |

Storage

Data is stored at ~/.email-design-mcp/:

~/.email-design-mcp/
  brands/           # Brand profiles (JSON)
  history/          # Generated email history (JSON)
  config.json       # Optional config (history retention, preview port)

History is automatically cleaned up after 30 days (configurable in config.json).

Development

git clone https://github.com/anthropics/email-design-mcp.git
cd email-design-mcp
npm install
npm run dev        # Watch mode
npm test           # Run tests
npm run typecheck  # Type check
npm run build      # Compile TypeScript

Architecture

See ARCHITECTURE.md for the full design document.

Stack: TypeScript, Node.js, MJML, Zod, MCP SDK

Key design decisions:

  • No external AI API calls - the host model does generation
  • Prompt engineering layer (expert system prompts + design rules + layout variants) is the core differentiator
  • MJML for email rendering ensures Outlook/Gmail/mobile compatibility
  • Local JSON storage keeps it simple with no database dependency

License

MIT