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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.