mcpField
H
HTML Email Playbook

HTML Email Playbook

Remote
docs.osamahassouna.comDeveloper Tools0Updated 2w ago

About HTML Email Playbook

HTML Email Playbook is a read-only MCP server and CLI for models generating HTML email. It supplies rules and component patterns for compatibility, responsive layouts, and faithful content rather than accessing or sending email.

Key features

  1. 01Browse four rule categories
  2. 02Retrieve rules and examples
  3. 03List six email components
  4. 04Fetch component HTML patterns
  5. 05CLI queries in JSON or Markdown

Use cases

  1. 01Generate responsive email HTML
  2. 02Build Outlook-compatible buttons
  3. 03Apply image-to-email content rules

MCP support

Exposes playbook rules and HTML component patterns through structured MCP tools. A hosted JSON-RPC endpoint is also available; it does not read or send email.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://docs.osamahassouna.com/api/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Packages
npmemail-playbook-mcp0.7.0

Tools

4

This tool takes no parameters.

Details

From the project README

email-playbook-mcp

npm license MCP

wellknown status

Stop AI models from generating broken HTML email. This MCP server + CLI feeds them the patterns that actually render in Outlook 2007+, Gmail, and Apple Mail — drawn from the HTML Email Playbook.

Without it, your model invents flex and grid (no email client supports those), hardcodes table widths that overflow on mobile, forgets the VML fallback for Outlook buttons, and makes up footer disclaimers that weren't in your design.

With it, the model calls structured tools to pull the exact patterns from the playbook and composes emails using those, instead of guessing from training data.

🔒 No email permissions, no inbox access. This is a knowledge MCP — it returns playbook rules and HTML patterns. It never reads your mail, sends mail, or asks for Gmail/Outlook/SMTP credentials. Confusable with inbox-integration MCPs but it's a different category entirely.

Install

# Global install (standard)
npm install -g email-playbook-mcp

# Or run on demand without installing
npx -y email-playbook-mcp@latest

Safe to install

  • One dependency — the official MCP SDK (@modelcontextprotocol/sdk), nothing else.
  • No postinstall scripts — installing runs no arbitrary code.
  • Read-only, no inbox — the tools only return playbook content. It never reads, sends, or touches email, never opens your inbox, and makes no network calls of its own.

Use it in Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

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

Restart Claude Desktop. The playbook tools appear in the model's tool list. Ask it to build an email and it'll call them automatically.

What happens under the hood

For an image-to-email or "build me a welcome email" prompt, the model typically calls:

1. list_categories                                    ← orient, page slugs
2. get_playbook_rules({ format: "checklist" })        ← every page's rules, ~16 KB
3. get_rule({ slug: "compatibility/responsive" })     ← just the pages it needs
4. list_components → get_component({ name: "buttons" }) ← components it needs
5. compose final HTML using those exact patterns

You don't write that prompt by hand — the model orients itself via the tool descriptions.

Use it in Cursor

Edit ~/.cursor/mcp.json:

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

Cline / Continue / Windsurf and other MCP-aware clients use the same shape — point a command entry at email-playbook-mcp.

Use it as a CLI

The same package ships a second binary for direct query + scripting:

$ email-playbook get-component buttons | jq '{name, slots, requires_vml}'
{
  "name": "buttons",
  "slots": ["text", "url", "background_color", "text_color", "width_px", "height_px"],
  "requires_vml": true
}

Other commands: list-categories, list-components, get-rules [category] [--checklist], get-rule <slug> [--examples]; add --md to get-rules / get-rule for readable markdown instead of JSON. The MCP tool names work as command names too (get_playbook_rules, get_rule, ...). Help text is generated from the bundled spec at runtime, never stale. Run email-playbook --help.

Run without installing globally:

npx -y -p email-playbook-mcp email-playbook list-categories

Tools

ToolReturns
list_categoriesThe 4 rule categories with page counts and page slugs
get_playbook_rules({ category?, format? })Rule pages: full (text + code, default, one category) or checklist (the rules to follow; leave out category for every page, about 16 KB)
get_rule({ slug, include_examples? })One rule page with its code (compatibility/responsive or responsive); include_examples: true adds the code as a separate array
list_componentsAll 6 components with metadata
get_component({ name })One component: HTML pattern, slots, VML/responsive flags

Components live in a separate dimension — use list_components / get_component, not get_playbook_rules.

What's in the playbook

SurfaceCountCovers
structure (rules)5Doctype, head, body container, header, body, footer
compatibility (rules)3Outlook MSO, RTL languages, responsive
production (rules)4Gmail 102KB clip, dark mode, preheader, bulletproof buttons
ai-generation (rules)7Absolute rules, asset policy, content fidelity, image placeholders, link tokens, output format, handoff checklist
Components6Buttons, spacing, images, inline icons, background images, text

The ai-generation category is the one to fetch first for image-to-email tasks. It encodes rules that override training-data instincts — use {{cta_url}} not https://example.com, reproduce only what's in the source, use placehold.co PNG blocks for every image you weren't given a real URL for, return HTML only.

What it doesn't do

  • Doesn't send email — generate the HTML here, send it through your existing platform.
  • Doesn't render previews — the Playground does (with a "From Image" tab if you have a screenshot).
  • Doesn't validate existing HTML — manual pass via the Handoff Checklist.

Hosted alternative

No install? Point any JSON-RPC 2.0 client at https://docs.osamahassouna.com/api/mcp. Same tools, same content, no auth.

curl -X POST https://docs.osamahassouna.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

License

MIT © Osama Hassouna

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.