{
  "markdown": "# clean-markdown-mcp\n\nAn [MCP](https://modelcontextprotocol.io) server that turns any URL into **clean,\nLLM-ready Markdown** — no ads, no nav bars, no cookie banners, no scripts.\n\nBuilt for RAG pipelines and AI agents, where junk in the input means junk in the\noutput.\n\n```\nGive it:  https://en.wikipedia.org/wiki/Markdown\nGet back: # Markdown\n\n          Markdown is a lightweight markup language for creating\n          formatted text using a plain-text editor...\n```\n\n## Install\n\n```bash\nnpm install -g clean-markdown-mcp\n```\n\n## Use it with Claude Desktop\n\nAdd this to your `claude_desktop_config.json`:\n\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"clean-markdown\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"clean-markdown-mcp\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop, then ask it to *\"scrape https://example.com to Markdown.\"*\n\nWorks the same way in Cursor, Windsurf, or any other MCP client — point it at the\n`clean-markdown-mcp` command.\n\n## The tool it exposes\n\n**`scrape_url`**\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| `url` | string | The page to scrape. Must be `http://` or `https://`. |\n| `includeLinks` | boolean | Keep hyperlinks in the Markdown. Default `true`. Set `false` for cleaner prose. |\n| `renderJs` | boolean | Load the page in a real browser first, for JavaScript-built sites. Default `false`. Requires Playwright — see below. |\n\nReturns the page title, source, word count, and the clean Markdown.\n\n## How the cleaning works\n\n1. **Fetch** — with a 20-second timeout, a 5 MB size cap, and redirects validated\n   at every hop.\n2. **Clean** — runs [Mozilla Readability](https://github.com/mozilla/readability),\n   the engine behind Firefox Reader View, to isolate the real article and discard\n   navigation, sidebars, ads, and comment sections.\n3. **Convert** — [Turndown](https://github.com/mixmark-io/turndown) renders it as\n   GitHub-flavoured Markdown, preserving headings, lists, tables, and code blocks.\n\nIf a page isn't article-shaped, it falls back to a cleaned `<body>` rather than\nfailing, so you still get usable text.\n\n## JavaScript-heavy sites (optional)\n\nSome sites build their content with JavaScript after loading. A plain fetch\nreturns almost nothing for those. To handle them, install Playwright once:\n\n```bash\nnpm install playwright && npx playwright install chromium\n```\n\nThen pass `renderJs: true`. The difference on such a page is dramatic:\n\n| Mode | Result |\n| --- | --- |\n| Default | ~3 words — just navigation links |\n| `renderJs: true` | ~190 words — the full content |\n\nPlaywright is **not** a dependency of this package, so a normal install stays\nsmall and fast. Without it, `renderJs` returns a clear message telling you how to\nenable it.\n\n## Security\n\nThe scraper refuses private, loopback, and link-local addresses — including cloud\nmetadata endpoints like `169.254.169.254` — and re-validates every redirect hop.\nThis matters because an MCP server runs on your machine, with access to your\nlocal network.\n\n## Need to scrape at scale?\n\nThis package handles one page at a time, locally. For **batch scraping**,\n**hosted JavaScript rendering**, and a pay-per-page API with no infrastructure to\nrun, the same engine is available as a hosted Actor:\n\n**https://apify.com/perforated_hummingbird/url-to-markdown**\n\n## Known limitations\n\n- Some sites block automated traffic. That's a site policy, not a bug here.\n- Non-UTF-8 pages may render with garbled characters.\n- No `robots.txt` enforcement — you are responsible for how you use it.\n\n## Local development\n\n```bash\nnpm install\nnpm run build\nnode dist/try.js https://example.com          # quick test\nnode dist/try.js https://example.com --render # with JS rendering\n```\n\n## License\n\nMIT\n",
  "bytes": 3841,
  "sha": "be6f2dcc9723532ba4a56174a3ee238dad17ae07d687790256d4c7f224275aef",
  "repo_slug": "damonwill78-a11y/clean-markdown-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_damonwill78_a11y_clean_markdow_ed67b867/readme"
}