HTML to Markdown — Claude Code MCP server: converting HTML to Markdown
HTML to Markdown is a Claude Code MCP server that transforms messy web markup into clean CommonMark or Djot. The Rust engine parses broken tags and extracts page metadata.
MIT ★ 889 updated 2026-11-24
claude mcp add html-to-markdown -- npx -y @xberg-io/html-to-markdown-cliWhat HTML to Markdown does
The server transforms raw HTML into Markdown over a local stdio connection. At its core, a Rust engine runs tiered parsing through a byte scanner and html5ever repair routines. Content stays intact despite broken tags and malformed entities. Processing speeds hit 19–116 MB/s on large text corpuses.
Beyond standard page text, it parses head tags to extract Open Graph and JSON-LD metadata. It formats tables with GitHub Flavored Markdown pipes and can output Djot markup instead of Markdown. Running the server requires Node.js with npx.
What it helps with
- converting HTML to Markdown
- extract Open Graph and JSON-LD metadata from pages
- format broken tables into GitHub Flavored Markdown
- generate clean Djot documents from web markup
Example prompts for the agent
- Convert
sample.htmlinto clean Markdown - Extract Open Graph metadata and text from this HTML snippet
- Transform this web page markup into Djot format
How to install HTML to Markdown
Platform CLI
claude mcp add html-to-markdown -- npx -y @xberg-io/html-to-markdown-cliPlatform CLI
codex mcp add html-to-markdown -- npx -y @xberg-io/html-to-markdown-cliConfig file
{
"mcpServers": {
"html-to-markdown": {
"command": "npx",
"args": [
"-y",
"@xberg-io/html-to-markdown-cli"
]
}
}
}Config file
{
"servers": {
"html-to-markdown": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@xberg-io/html-to-markdown-cli"
]
}
}
}Platform CLI
gemini mcp add html-to-markdown npx -y @xberg-io/html-to-markdown-cliStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about HTML to Markdown
How do I install HTML to Markdown in Claude Code?
Run claude mcp add html-to-markdown -- npx -y @xberg-io/html-to-markdown-cli in your terminal.
What does HTML to Markdown do?
It converts malformed or complex HTML documents into clean Markdown or Djot files while preserving table layouts and document metadata.
What is required to run HTML to Markdown?
The server runs via stdio and requires a local Node.js environment with npx.