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
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.
Keeping it current
The playbook grows with new pages and fixes, so install email-playbook-mcp@latest and never pin a version in your client config. The hosted endpoint is always current.
A local copy can still fall behind (a pinned version, a cached global install). When the bundled rules are more than 90 days old, the local server says so, without any network call:
- MCP server: one short update note in the server instructions and on the first tool result of a session, addressed to the AI client, so it can tell you how to update.
- CLI: one line on stderr; stdout stays clean JSON.
Use it in Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
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:
You don't write that prompt by hand — the model orients itself via the tool descriptions.
Use it in Cursor
Edit ~/.cursor/mcp.json:
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:
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:
Tools
Components live in a separate dimension — use list_components / get_component, not get_playbook_rules.
What's in the playbook
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.
License
MIT © Osama Hassouna