Skip to content

AI Integration (MCP + CLI)

This playbook is published as an MCP server + terminal CLI so AI clients and dev workflows can pull rules and components into whatever they’re building. The model (or you) calls structured tools, you stay out of copy-paste hell, and the same rules ship to every surface.

Pick your client and paste. The config uses npx so there’s no global install step — email-playbook-mcp@latest is pulled on first launch and cached.

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

{
"mcpServers": {
"email-playbook": {
"command": "npx",
"args": ["-y", "email-playbook-mcp@latest"]
}
}
}

Restart Claude Desktop. The four tools appear in the model’s tool list automatically.

Four tools. All read-only, all deterministic, all serving the same content you read on this site.

ToolWhat it returns
list_categoriesThe four rule categories (structure, compatibility, production, ai-generation) with page counts.
get_playbook_rulesFull rule pages for a category — title, description, body, all code examples.
list_componentsAll six components (buttons, spacing, images, inline-icon, background-images, text) with metadata: subcategory, VML flag, responsive flag.
get_componentFull record for one component — title, description, narrative, HTML pattern, slots, examples.

The model uses these to discover and quote the exact playbook patterns instead of hallucinating its own table layout from training data. Components live in their own dimension — use list_components / get_component, not get_playbook_rules.

The same package ships a terminal command for direct use:

Terminal window
email-playbook --help
email-playbook list-categories
email-playbook get-rules structure
email-playbook list-components
email-playbook get-component buttons

Output is pretty-printed JSON to stdout, so it pipes cleanly:

Terminal window
email-playbook get-component buttons | jq '.slots'
email-playbook list-components | jq -r '.[] | select(.requires_vml) | .name'

Exit codes are scripting-friendly: 0 success, 1 runtime error, 2 usage error.

Skip the install. Send JSON-RPC 2.0 requests to https://docs.osamahassouna.com/api/mcp.

Terminal window
curl https://docs.osamahassouna.com/api/mcp

Returns server info and supported methods.

Terminal window
curl -X POST https://docs.osamahassouna.com/api/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Terminal window
curl -X POST https://docs.osamahassouna.com/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_component",
"arguments": { "name": "buttons" }
}
}'

Returns the bulletproof button pattern, its slots, and metadata.

Once installed, ask the model something like:

“Build me a transactional welcome email with a CTA button. Use the email playbook tools to follow the patterns exactly.”

The model will typically:

  1. Call list_categories to orient itself.
  2. Call get_playbook_rules for structure and compatibility to get the boilerplate + responsive pattern.
  3. Call list_components and get_component for the components it needs (button, spacer).
  4. Assemble the email using the exact HTML patterns from the playbook.

The output renders correctly in Outlook + Gmail + Apple Mail because it never deviated from the playbook’s table layout, VML, and inline-style conventions.