Skip to main content
MCP server CX Codex

HTML to Markdown MCP Server — Claude Code MCP server for clean Markdown

Turns web pages into clean Markdown and strips scripts, styles and navigation. Useful when an agent needs an article or docs page without the clutter.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add html-to-markdown-mcp-server -- docker run -i --rm docker.io/sunshad0w/html2md-mcp
Open on GitHub

What HTML to Markdown MCP Server does

Point the server at a URL and it hands back Markdown with tables, images and links kept in place. Scripts, styles, headers and footers get dropped, so the payload shrinks by roughly 90-95% and fits an agent's context more easily. Extraction runs on trafilatura and BeautifulSoup4, with stream processing and a cap on how much gets downloaded.

JavaScript-heavy sites are covered by a Playwright browser mode: it runs the page's scripts and waits for a chosen load state. You can also attach your own browser profile with cookies to reach pages behind a login. Chrome has to be closed first, or the profile stays locked.

Docker is the simplest route — the image ships with Chromium, so nothing else needs installing. Caching is off unless you pass use_cache, which pays off when the same URL comes up again and again.

What it helps with

  • pull article text out of raw HTML without ads or scripts
  • keep tables and images intact through a Markdown conversion
  • read a React or Vue single-page app that renders client-side
  • reach a logged-in page using your own browser session
  • shrink a large HTML page to something that fits the context window

Example prompts for the agent

  • Convert https://example.com/article to Markdown with html_to_markdown
  • Run html_to_markdown on https://example.com/docs with include_images: false and include_tables: true
  • Fetch the dashboard with html_to_markdown using fetch_method: playwright and use_user_profile: true

How to install HTML to Markdown MCP Server

Platform CLI

claude mcp add html-to-markdown-mcp-server -- docker run -i --rm docker.io/sunshad0w/html2md-mcp

Step 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 MCP Server

How do I install HTML to Markdown MCP Server in Claude Code?

Run claude mcp add html-to-markdown-mcp-server -- docker run -i --rm docker.io/sunshad0w/html2md-mcp. The Docker image already bundles Playwright with Chromium.

What does HTML to Markdown MCP Server do?

It converts an HTML page into Markdown while removing elements like scripts and navigation. Tables, links and images survive the conversion.

How do I convert a page that needs JavaScript to render?

Set fetch_method to playwright so the server launches a browser and waits for the page. For pages behind a login, add use_user_profile: true and close Chrome beforehand.

Similar MCP servers

All MCP servers for Browser and scraping →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor