html-to-markdown
MCP server for converting HTML to Markdown using Turndown.js. Fetch web pages and convert them to clean, formatted Markdown.
claude mcp add --transport stdio levz0r-html-to-markdown-mcp npx -y html-to-markdown-mcp
How to use
The html-to-markdown MCP server accepts HTML content or a URL and returns Markdown-formatted text. It uses Turndown.js under the hood to preserve headings, links, code blocks, lists, tables, and other formatting while stripping away extraneous page elements. The server can fetch HTML automatically when given a URL, or it can convert raw HTML you provide directly. Tools exposed by this MCP include the html_to_markdown tool, which supports parameters such as url, html, includeMetadata, maxLength, and saveToFile. Typical workflows involve either fetching a page and converting it to Markdown for quick notes, or converting a block of HTML you already have into clean Markdown for documentation or shareable content. This MCP is commonly used with Claude, Claude Code, Cursor, Codex, or during local development to automate HTML-to-Markdown conversions in your pipelines.
How to install
Prerequisites:
- Node.js and npm installed on your system
- Access to run npm install globally or within your environment
Install the MCP server globally (recommended for general use):
npm install -g html-to-markdown-mcp
Or run via npx without installation:
npx -y html-to-markdown-mcp
Verify installation:
html-to-markdown-mcp --version
Usage (as a quick check):
# Run the MCP server (example)
html-to-markdown-mcp
Once installed, configure your MCP client (Claude/Codex/Cursor) to point at the server using the command and arguments shown in the mcp_config section.
Additional notes
Environment and configuration tips:
- If you need to fetch large pages, consider using maxLength to avoid token-heavy responses.
- The server auto-strips scripts and styles from fetched pages to produce cleaner Markdown.
- When working behind a proxy, ensure your environment variables (HTTP_PROXY, HTTPS_PROXY) are set so the fetch step works.
- If using local development paths for local scripts, reference the absolute path to the index.js when using the Local Development guidance.
- For Claude Desktop and Cursor configurations, you can either use npx as shown or install globally and reference the binary name directly.
- Common issues: network fetch failures, permissions errors when using global installations, and mismatched Node versions. Ensure your Node.js version is compatible with the html-to-markdown-mcp package and that npm can access the registry.
Related MCP Servers
mcp-pinecone
Model Context Protocol server to allow for reading and writing from Pinecone. Rudimentary RAG
mcp-arr
MCP server for *arr media management suite
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
obsidian
MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes
mcp-tidy
CLI tool to visualize and manage MCP server configurations in Claude Code. List servers, analyze usage statistics, and clean up unused servers
markdown-to-html
A Model Context Protocol (MCP) server that Convert Markdown to HTML.