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 分