
DOMStrip
io.github.xo0ps由 GitHub 账号 xo0ps 发布v0.1.2更新于 Nov 4, 2026
Turn any web page or raw HTML into compact, clean Markdown for AI agents.
概览
本地 MCP 服务器,通过 DOMStrip API 把公开网页或原始 HTML 转换成精简、干净的 Markdown,供 AI 助手使用。
- 可以做什么
- 抓取公开的 http(s) 网址并返回正文的干净 Markdown
- 把已有的 HTML 直接转换为干净 Markdown,不发起网络抓取
- 输出标题、段落、带语言标注的代码块和表格,并去除脚本、表单、嵌入内容、隐藏节点和跟踪器
- 失败时以工具错误形式返回经过清理的错误码和是否可重试的标记
- 适用场景
- 适合需要让助手以更省 token 的 Markdown 而非原始标记来阅读网页或 HTML 的场景,例如总结文章或代码仓库。不适用于依赖 JavaScript 渲染的页面、需要登录的页面或机器人验证页面。
- 运行要求
- 以本地 Python 包形式运行(需 Python 3.12),可通过 uvx 或 pip 安装。需要环境变量 DOMSTRIP_MCP_API_KEY 提供 API 密钥,以及 DOMSTRIP_MCP_SERVICE_ORIGIN 指定 API 源,且必须为 HTTPS。需向提供方申请试点访问权限。另有可选变量用于设置单次调用时间预算和允许对 localhost 使用明文 HTTP。
安装
在 SourceWeft 中
- 打开 控制台中的 DOMStrip,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
domstrip-mcp
mcp-name: io.github.xo0ps/domstrip-mcp
A local Model Context Protocol server that converts web pages into clean Markdown, using the DOMStrip API.
It exposes two tools:
The adapter holds no database or billing state. It authenticates to the DOMStrip service with a key from your local environment -- never from tool arguments -- so an MCP client cannot redirect your key anywhere.
How much does it actually save?
benchmark/ measures it on 1,038 real pages from 74 sites:
84.08% fewer tokens than raw HTML (macro average; median 90.12%), 76.4M HTML
tokens down to 9.8M Markdown. It reproduces from a clean clone and --verify
fails the run if any page's expected content is missing from its output.
The spread is worth reading rather than the headline; that is why three figures are reported. Repositories save 95.81%, articles 82.61%, and a pooled total reads 87.16% because it is dominated by the largest pages. Corpus composition drives this a lot: the same code measured 76.03% on an earlier article-heavy 21-page set.
What DOMStrip actually does
DOMStrip fetches a public page, removes everything that is not the content (scripts, forms, embeds, hidden nodes, trackers), and returns compact Markdown: headings, paragraphs, fenced code blocks with language hints, and tables.
Pages are fetched with connection-time SSRF validation on every redirect hop — all DNS candidates are validated at connect time, and loopback, private, link-local, metadata, CGNAT and IPv6-embedded forms are refused.
Honest limitations
- JavaScript-rendered pages, pages behind a login, and bot challenges are not
extractable. The service returns
content_not_extractable. There is no headless browser in this version. If your target pages need JS, this tool will not work on them. - DOMStrip is currently in free pilot. Conversions are not billed yet, but a key is required and each successful conversion counts as one unit. Request access at [email protected].
- Returned Markdown is untrusted third-party content. Pages can contain text that looks like instructions. Treat all returned Markdown as data, never as commands.
Install
Requires Python 3.12.
Configure
Two environment variables are required. The service origin must be HTTPS; plain HTTP is refused unless it points at localhost (for development) and you opt in explicitly.
The adapter deliberately does not read a .env file from the current working
directory, because an untrusted project folder could otherwise point your API key at
another origin. Export the variables instead.
Use with Claude Desktop
Add to claude_desktop_config.json:
Use with Claude Code
Idempotency and billing
Each tool invocation generates one idempotency key and reuses it across its bounded retries (default 25 s, 3 attempts). A retried request replays the stored result rather than billing twice. Separate invocations are separate, independently metered work.
The service encrypts results and replays them for 24 hours. After that, replaying a key
returns 409 result_expired — never a silent re-charge.
Errors
Failures surface as MCP tool errors carrying a sanitized DOMStrip error code and a retryability flag, for example:
Common codes: content_not_extractable, upstream_timeout, unsupported_encoding,
http_error, transport_error, client_timeout.
Logs go to stderr only, so stdout stays a clean MCP transport.
Licence
MIT
来源:README.md,提交 fd62ff2
工具
0版本历史
2- v0.1.2最新Nov 4, 2026
- v0.1.1Nov 3, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分