MCP Server · v1.1.3 · MIT

Any URL in.
Clean Markdown out.

clean-markdown-mcp is an MCP server that turns any web page into clean, LLM-ready Markdown. No ads, no nav bars, no cookie banners, no scripts. Built for RAG pipelines and AI agents, where junk in means junk out.

$ npm install -g clean-markdown-mcp

How the cleaning works

Three stages, one clean document. Give it a Wikipedia page, get back the article, not the chrome around it.

01

Fetch

Pulls the page with a 20-second timeout and a 5 MB size cap. Redirects are validated at every hop, and private or loopback addresses are refused outright.

02

Clean

Runs Mozilla Readability, the engine behind Firefox Reader View, to isolate the real article and discard navigation, sidebars, ads, and comment sections.

03

Convert

Turndown renders the result as GitHub-flavoured Markdown, preserving headings, lists, tables, and code blocks. Non-article pages fall back to cleaned text instead of failing.

Use it with Claude Desktop

Add this to your claude_desktop_config.json, restart, then ask it to scrape any page to Markdown.

// macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
// Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "clean-markdown": {
      "command": "npx",
      "args": ["-y", "clean-markdown-mcp"]
    }
  }
}

Works the same in Cursor, Windsurf, or any MCP client. Also listed on the official MCP Registry as io.github.damonwill78-a11y/clean-markdown.

The tool it exposes

One tool, scrape_url, returns the page title, source, word count, and the clean Markdown.

ParameterTypeDescription
urlstringThe page to scrape. Must be http:// or https://.
includeLinksbooleanKeep hyperlinks in the Markdown. Default true. Set false for cleaner prose.
renderJsbooleanLoad the page in a real browser first, for JavaScript-built sites. Default false. Requires Playwright.

For JavaScript-heavy pages, install Playwright once (npm install playwright && npx playwright install chromium) and pass renderJs: true. Playwright is not a bundled dependency, so a normal install stays small and fast.

Need it at scale?

Run it locally

One page at a time, on your machine. Free and open source under the MIT license.

Get the source →

Run it hosted

Batch scraping, hosted JavaScript rendering, and a pay-per-page API with no infrastructure to run. Same engine, as an Apify Actor.

Open the Actor →

Built safe by default