emailmd

dev.emailmd由 emailmd.dev 发布官方发布者v0.13.2更新于 Oct 25, 2026

Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.

已验证Streamable HTTP可网页运行开发者工具沟通与协作

概览

AI 生成的概览

emailmd 把 Markdown 渲染成兼容邮件客户端的 HTML,检查草稿的送达问题,并生成可分享的预览,全部可由 AI 助手完成。

可以做什么
将 emailmd Markdown 渲染为完整的邮件安全 HTML 文档,同时返回纯文本部分、frontmatter 元数据、警告、字节大小和实时预览链接。在不渲染的情况下检查草稿,标出缺少替代文本、不安全链接、Gmail 大小限制、泛化链接文字和垃圾邮件触发词等问题。查阅 emailmd 文档页面(如按钮、frontmatter、主题或指令),在编写前确认语法。
适用场景
适合助手用 Markdown 起草或修改营销、事务性或简报邮件时使用,希望在发送前得到跨客户端可用的 HTML、纯文本版本,并快速排查送达问题。
运行要求
可作为托管远程端点使用,也可通过 npm 包在本地以 stdio 运行,后者需要 Node 20 或更高版本。未声明需要账号、API 密钥或环境变量。
安装前请注意
渲染工具会返回指向该文档的预览链接,任何拿到链接的人都可能看到邮件内容。检查工具只报告问题,修复需自行处理,部分被标记的建议可能是有意为之。

安装

在 SourceWeft 中

  1. 打开 控制台中的 emailmd,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/dev.emailmd%2Femailmd/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "emailmd": {
      "type": "http",
      "url": "https://www.emailmd.dev/api/mcp"
    }
  }
}

README

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.

[emailmd]

Install

bash
npm install emailmd

Quick Start

typescript
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 part

v0.3.0 migration: render() is now async. Update calls from render(md) to await 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:

markdown
::: chart- Spotify: 16,900- Apple Podcasts: 12,400- Web player: 6,200- RSS: 2,900:::

[KPI tiles, a bar chart and a sparkline, rendered by emailmd from plain markdown lists]

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.

bash
# Render to HTMLemailmd input.md
# Write to fileemailmd input.md -o output.html
# Plain text outputemailmd input.md --text
# Pipe from another commandecho "# Hello" | emailmd

Run 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.

bash
npm install @emailmd/react emailmd

Learn 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:

bash
# Hosted (Streamable HTTP)https://www.emailmd.dev/api/mcp
# Or run it locally over stdionpx emailmd mcp

Published 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.txt

Contributing

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

来源:README.md,提交 db9d638

工具

3

render

Render an email

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).

输入参数minifymarkdown必填partials

lint

Lint an email

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).

输入参数markdown必填partials

read_docs

Read emailmd docs

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.

输入参数page

版本历史

4
  1. v0.13.2最新Oct 6, 2026
  2. v0.12.0Oct 6, 2026
  3. v0.11.1Oct 2, 2026
  4. v0.11.0Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分