emailmd
The emailmd MCP server lets AI assistants render, lint, and look up docs for emailmd markdown emails.
render: Converts emailmd markdown into email-safe HTML, a plain-text MIME part, frontmatter metadata, warnings, byte count, and a live preview URL; optionally minifies HTML and supports named partials.
lint: Checks markdown for deliverability, accessibility, and readability problems such as missing alt text, http:// links, Gmail's 102KB clip limit, generic link text, and spam-trigger phrases.
read_docs: Fetches emailmd documentation pages on demand to verify syntax; calling with no arguments returns the docs index.
emailmd
Write markdown. Ship emails. No HTMHELL.
emailmd converts markdown into responsive, email-safe HTML that works across Gmail, Outlook, Apple Mail, Yahoo, and every other client.

Install
npm install emailmdRelated MCP server: dead-letter
Quick Start
import { render } from "emailmd";
const { html, text } = await render(`
# Welcome!
Thanks for signing up.
[Get Started](https://example.com){button}
`);
// html → complete email-safe HTML
// text → plain text version for text/plain MIME partv0.3.0 migration:
render()is now async. Update calls fromrender(md)toawait render(md). Requires Node 20+ (MJML 5).
Charts & Data
Bar charts, progress meters, sparklines, KPI tiles, step trackers, and star ratings, each written as a plain markdown list:
::: chart
- Spotify: 16,900
- Apple Podcasts: 12,400
- Web player: 6,200
- RSS: 2,900
:::
They are drawn from table cells and text glyphs rather than images or SVG, so they still render when the client blocks remote images, and they redraw themselves in the plain-text part instead of collapsing to a list of numbers. See the directives reference.
CLI
emailmd also ships with a command-line interface.
# Render to HTML
emailmd input.md
# Write to file
emailmd input.md -o output.html
# Plain text output
emailmd input.md --text
# Pipe from another command
echo "# Hello" | emailmdRun emailmd --help for all options.
React
@emailmd/react provides a live-preview hook (useEmailmd), an <EmailPreview /> iframe component, and <EmailmdBuilder /> — the full builder as a drop-in component for your own app.
npm install @emailmd/react emailmdLearn More
Docs — full syntax reference, theming, frontmatter, directives, and API
Templates — ready-made email templates you can copy and customize
Builder — live editor to write and preview emails in your browser
MCP
emailmd ships a Model Context Protocol server, so an AI assistant can render, lint, and preview emails for you. It exposes three tools — render (markdown to email-safe HTML), lint (flag deliverability problems without rendering), and read_docs (look up emailmd syntax) — over either transport:
# Hosted (Streamable HTTP)
https://www.emailmd.dev/api/mcp
# Or run it locally over stdio
npx emailmd mcpPublished to the official MCP registry as dev.emailmd/emailmd. See the MCP docs for per-client setup.
AI
Prefer plain context over tools? emailmd is just markdown, so AI is great at writing templates. Feed the full docs to your AI tool:
https://www.emailmd.dev/llms-full.txtContributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
emailmd is under active development. The API may change between minor versions until we hit 1.0 — breaking changes are always called out in the changelog. See Stability & Versioning for what the semver contract covers.
Acknowledgements
License
MIT
Available Tools
3 toolslintLint an emailAInspect
Check emailmd markdown for deliverability, accessibility, and readability problems without rendering it: missing alt text, http:// links, Gmail's 102KB clip limit, generic link text, spam-trigger phrases, and more. Fix warnings before sending; suggestions are sometimes intentional (e.g. transactional emails without an unsubscribe link).
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The emailmd markdown document, optionally starting with YAML frontmatter. | |
| partials | No | Named markdown partials spliced in wherever the document says "::: include <name>". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full burden. It discloses that the tool checks for problems and does not render, and notes that suggestions can be intentional. However, it does not describe the output format or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loads key information. It efficiently lists specific issues, but could be slightly more structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description fails to explain what the tool returns (e.g., list of warnings, success/failure). It also does not fully explain how the 'partials' parameter works, leaving some gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds minor value by mentioning 'emailmd markdown' and partials splicing, but does not significantly enhance parameter understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks emailmd markdown for deliverability, accessibility, and readability problems, listing specific issues like missing alt text and http:// links. It distinguishes itself from siblings (render, read_docs) by focusing on linting without rendering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies using the tool before sending to fix warnings, but does not explicitly state when not to use it or provide direct comparisons to alternatives. The context of 'check without rendering' is useful.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_docsRead emailmd docsAInspect
Fetch emailmd documentation from emailmd.dev. Call with no arguments for the index of all pages; pass page to read one (e.g. 'buttons', 'frontmatter', 'theme', 'directives/hero'). Read the relevant page before using syntax you are not sure about.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Docs page path, e.g. 'buttons' or 'directives/hero'. Omit for the index. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations, but description fully conveys it's a read-only fetch operation with no side effects. Transparent about external call. Could mention error behavior but acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first defines purpose, second adds usage details. No wasted words, front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one optional parameter and no output schema, description covers key behaviors. Lacks mention of response format, but not critical for a documentation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers parameter description (100% coverage), and description adds practical examples ('buttons', 'frontmatter', 'theme', 'directives/hero') and context for usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Fetch emailmd documentation from emailmd.dev', specifying the verb (fetch), resource (documentation), and source. Distinct from sibling tools lint and render.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit usage: call with no arguments for index, pass page for specific page. Also advises reading relevant page before using uncertain syntax. Lacks explicit when-not-to-use but sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
renderRender an emailAInspect
Render emailmd markdown into email-safe HTML. Returns html (the complete email document), text (the plain-text MIME part), meta (frontmatter), warnings (non-fatal repairs made while rendering; aim for none), htmlBytes, and previewUrl (a live browser preview of this exact document to share with the user).
| Name | Required | Description | Default |
|---|---|---|---|
| minify | No | Minify the HTML. Recommended for sending; helps stay under Gmail's 102KB clip limit. | |
| markdown | Yes | The emailmd markdown document, optionally starting with YAML frontmatter. | |
| partials | No | Named markdown partials spliced in wherever the document says "::: include <name>". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry full behavioral disclosure. It mentions warnings (non-fatal repairs) and previewUrl, which gives insight into side effects. It does not detail auth requirements, rate limits, or error handling, but the key behavioral traits are addressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the core purpose ('Render emailmd markdown into email-safe HTML') and then enumerates return fields. It is concise but could be more structured (e.g., separate sentences for purpose and outputs).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema or annotations, the description lists all return fields and clarifies the nature of warnings. It lacks explicit error handling or failure modes, but for a render tool with 3 parameters, it provides sufficient context for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description adds no additional meaning to the parameters beyond what is in the schema; it only describes return values. The parameter details (minify, markdown, partials) are already well-documented in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool renders 'emailmd' markdown into email-safe HTML, and lists the specific return fields (html, text, meta, warnings, htmlBytes, previewUrl). This verb+resource pair is distinct from sibling tools 'lint' and 'read_docs' which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for converting markdown to email HTML, and sibling tools provide context for when not to use it (e.g., use 'lint' for validation, 'read_docs' for docs). However, it does not explicitly state when to prefer this tool over alternatives or mention any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a unique and well-defined purpose: lint checks for issues, render converts to HTML, read_docs fetches documentation. There is no overlap or ambiguity between them.
All tool names are single lowercase verbs (lint, render, read_docs), following a consistent and predictable pattern.
Three tools is an ideal count for a focused utility like emailmd, providing essential functionality without unnecessary complexity.
The tools cover the complete workflow: checking (lint), converting (render), and learning (read_docs). No obvious gaps for the server's purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Analyze, audit, fix and diff HTML, MJML, Maizzle and React Email across 21 email clients.
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Create, edit, review, and explicitly publish Live or Snapshot Markdown Documents in mdedit.ai.
Publish Markdown from any agent: POST Markdown, get a gorgeous shareable URL.
Related MCP Servers
FlicenseNot gradedqualityFmaintenanceEnables AI models to manage CloudMailin email data, including listing addresses, messages, and sending emails with markdown support.- AlicenseAqualityAmaintenanceMCP server that converts .eml email exports (Gmail, Outlook, and other archives) into clean Markdown with YAML front matter — splitting reply threads, stripping signatures and quoted history, extracting attachments, and parsing calendar invites. Built for feeding archived email into RAG and LLM pipelines.47PolyForm Noncommercial 1.0.0
- AlicenseAqualityAmaintenanceLocal-first visual design workspace for AI assistants. Compose wireframes and branded multi-page HTML/CSS documents with live preview, annotations, brand and asset libraries, typed data collections, layout validation, PDF export, and draft-only Gmail handoff.1413119MIT
- AlicenseAqualityDmaintenanceProvides email validation and domain configuration auditing tools for AI assistants, enabling single address checks, bulk list cleaning, SPF verification, and full mail setup grading (A-F) with actionable fixes.474MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anypost/emailmd'
If you have feedback or need assistance with the MCP directory API, please join our Discord server