md-beautifier
MCP server that converts raw Markdown into a complete, self-contained HTML document with clean typographic styling, syntax highlighting, and automatic light/dark mode.
README
md-beautifier
An MCP server that turns raw Markdown into a complete, self-contained HTML document
rendered with clean typographic styling — serif fonts, syntax highlighting, and
automatic light/dark mode. Your LLM agent can hand it the raw markdown it wrote and
get back a ready-to-embed <html> string (all CSS inlined, works offline, no CDN).
Packaged as a single Node.js container, run with Docker Compose.
The tool
| Name | render_markdown_to_html |
| Transport | MCP Streamable HTTP at http://<host>:3010/mcp (stdio mode also supported) |
| Input | markdown (required), title, subtitle (optional) |
| Output | Full HTML document as a text string |
Example of how an agent calls it:
render_markdown_to_html(markdown="<raw md>", title="Holiday Guide")
Quick start
docker compose up -d --build
Verify it is healthy and reachable:
curl http://localhost:3010/health
Test a render directly:
curl -s -X POST http://localhost:3010/mcp \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
Connecting Open WebUI (>= 0.6.31)
Open WebUI only supports Streamable HTTP MCP servers natively, so this is the default transport.
- Admin Settings → External Tools → + Add Server
- Type:
MCP (Streamable HTTP) - Server URL:
http://host.docker.internal:3010/mcphost.docker.internalworks when Open WebUI itself runs in Docker on the same host.- Use
http://localhost:3010/mcpif Open WebUI runs natively on the host. - From another machine, use the host's LAN IP.
- Auth:
Noneby default. If you setMCP_API_TOKENin.env, chooseBearerand enter the token. - Save, then enable the tool for a model and make sure function calling is on for that model so the agent can invoke it.
Configuration
| Variable | Default | Purpose |
|---|---|---|
PORT |
3010 |
HTTP port the MCP endpoint listens on |
HOST |
0.0.0.0 |
Bind address |
MCP_TRANSPORT |
http |
http (Streamable HTTP) or stdio |
MCP_API_TOKEN |
(empty) | If set, requests must carry Authorization: Bearer <token> |
stdio mode (for other clients)
Some clients (e.g. Claude Desktop, opencode) can launch stdio MCP servers directly:
docker compose run --rm -e MCP_TRANSPORT=stdio md-beautifier
or run natively:
npm install && MCP_TRANSPORT=stdio node src/server.js
Styling
The embedded stylesheet lives in src/styles.js — a single place to tweak fonts,
colors, and layout. Current look:
- Clean minimal article layout, ~46rem reading width
- Serif type stack:
Iowan Old Style / Palatino Linotype / Palatino / Georgia - Syntax highlighting via highlight.js (common languages), palette tuned to the theme
- Automatic light/dark via
prefers-color-scheme - Styled tables, blockquotes, task lists,
kbd, images
Raw HTML in markdown is escaped (not executed), so the tool is safe to run on untrusted input.
Development
npm install
npm test # unit tests for the renderer
npm start # run locally on :3010
Layout
├── docker-compose.yml # runs the service, maps :3010
├── Dockerfile # node:22-alpine
├── src/
│ ├── server.js # entry: HTTP/stdio transport + wiring
│ ├── mcp.js # MCP server + tool definition
│ ├── renderer.js # markdown-it + highlight.js
│ └── styles.js # embedded CSS template
└── test/renderer.test.js
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。