Clean Markdown

io.github.damonwill78-a11y由 GitHub 账号 damonwill78-a11y 发布v1.1.3更新于 Oct 27, 2026

Any URL to clean, LLM-ready Markdown for RAG. Strips ads, nav, and boilerplate.

发布方自己的服务:Clean

概览

AI 生成的概览

本地 MCP 服务器,抓取网页并返回去除广告、导航和样板内容的干净 Markdown,便于 LLM 使用。

可以做什么
  • 按 URL 抓取单个网页,返回页面标题、来源、字数与清洗后的 Markdown
  • 可选择保留或去掉超链接,并可选用真实浏览器渲染由 JavaScript 生成的页面
  • 清洗使用 Mozilla Readability,再转换为 GitHub 风格 Markdown,保留标题、列表、表格和代码块
  • 页面不是文章结构时回退到清洗后的正文,而不是直接失败
适用场景
适合把网页内容送入 RAG 流程或代理上下文时使用,希望得到可读的正文而不是充满导航、广告和 Cookie 提示的原始 HTML。它在本机一次处理一个页面。
运行要求
以本地 npm 包 clean-markdown-mcp 运行,可通过 npx 或全局安装,需要 Node.js。未声明任何账号、API 密钥或环境变量。可选的 JavaScript 渲染需另行安装 Playwright 及其 Chromium 浏览器。需要网络访问。
安装前请注意
它会从你的机器抓取任意 URL,README 说明会拒绝私有、回环和链路本地地址并逐跳校验重定向,但仍应只指向可信站点。它不执行 robots.txt,抓取内容如何使用由你负责,部分站点会拦截自动访问。README 还提到另有按页计费的托管服务用于批量抓取。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Clean Markdown,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

clean-markdown-mcp

[Clean Markdown MCP server]

An MCP server that turns any URL 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 the input means junk in the output.

Give it:  https://en.wikipedia.org/wiki/MarkdownGet back: # Markdown
          Markdown is a lightweight markup language for creating          formatted text using a plain-text editor...

Install

bash
npm install -g clean-markdown-mcp

Use it with Claude Desktop

Add this to your claude_desktop_config.json:

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

Restart Claude Desktop, then ask it to "scrape https://example.com to Markdown."

Works the same way in Cursor, Windsurf, or any other MCP client — point it at the clean-markdown-mcp command.

The tool it exposes

scrape_url

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 — see below.

Returns the page title, source, word count, and the clean Markdown.

How the cleaning works

  1. Fetch — with a 20-second timeout, a 5 MB size cap, and redirects validated at every hop.
  2. Clean — runs Mozilla Readability, the engine behind Firefox Reader View, to isolate the real article and discard navigation, sidebars, ads, and comment sections.
  3. Convert — Turndown renders it as GitHub-flavoured Markdown, preserving headings, lists, tables, and code blocks.

If a page isn't article-shaped, it falls back to a cleaned <body> rather than failing, so you still get usable text.

JavaScript-heavy sites (optional)

Some sites build their content with JavaScript after loading. A plain fetch returns almost nothing for those. To handle them, install Playwright once:

bash
npm install playwright && npx playwright install chromium

Then pass renderJs: true. The difference on such a page is dramatic:

ModeResult
Default~3 words — just navigation links
renderJs: true~190 words — the full content

Playwright is not a dependency of this package, so a normal install stays small and fast. Without it, renderJs returns a clear message telling you how to enable it.

Security

The scraper refuses private, loopback, and link-local addresses — including cloud metadata endpoints like 169.254.169.254 — and re-validates every redirect hop. This matters because an MCP server runs on your machine, with access to your local network.

Need to scrape at scale?

This package handles one page at a time, locally. For batch scraping, hosted JavaScript rendering, and a pay-per-page API with no infrastructure to run, the same engine is available as a hosted Actor:

https://apify.com/perforated_hummingbird/url-to-markdown

Known limitations

  • Some sites block automated traffic. That's a site policy, not a bug here.
  • Non-UTF-8 pages may render with garbled characters.
  • No robots.txt enforcement — you are responsible for how you use it.

Local development

bash
npm installnpm run buildnode dist/try.js https://example.com          # quick testnode dist/try.js https://example.com --render # with JS rendering

License

MIT

来源:README.md,提交 b67f394

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Clean 集成