刮取mcp
 ](https://pypi.org/project/scrapling-fetch-mcp/)
帮助AI助手从受机器人保护的网站获取内容。使用Scrapling(patchright+curl cffi)绕过反自动化措施,返回干净的HTML或Markdown。
针对文档和参考资料的低容量检索进行了优化。不是为大容量抓取或数据采集而设计的。
需求:Python 3.10+, 紫外线
克劳德代码技能
最简单的方法是将其用作Claude Code技能。安装后,当您询问时,Claude将自动获取受机器人保护的URL,无需手动命令。
安装到您的项目中 (建议-仅在此项目上下文中加载):
git clone --depth=1 https://github.com/cyberchitta/scrapling-fetch-mcp /tmp/scrapling-fetch-mcp
cp -r /tmp/scrapling-fetch-mcp/skills/s-fetch .claude/skills/
rm -rf /tmp/scrapling-fetch-mcp或为所有项目安装 (加载到任何地方的上下文中):
git clone --depth=1 https://github.com/cyberchitta/scrapling-fetch-mcp /tmp/scrapling-fetch-mcp
cp -r /tmp/scrapling-fetch-mcp/skills/s-fetch ~/.claude/skills/
rm -rf /tmp/scrapling-fetch-mcp您第一次调用 /s-fetch,克劳德会读 skills/s-fetch/references/install.md 并运行一次性设置 (安装该工具并下载浏览器二进制文件)。之后,只是 自然地问:
"Fetch the docs at https://example.com/api"
"Find all mentions of 'authentication' on that page"
"Get me the installation instructions from their homepage"克劳德桌面(MCP服务器)
如果 /s-fetch skill已经安装了该工具,请跳到下面的配置。
否则,请先安装:
uv tool install git+https://github.com/cyberchitta/scrapling-fetch-mcp
uvx --from git+https://github.com/cyberchitta/scrapling-fetch-mcp scrapling install备注:浏览器安装下载数百MB,必须在首次使用前完成。如果服务器最初超时,请等待几分钟,然后重试。
将此添加到您的Claude Desktop MCP设置中并重新启动:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"scrapling-fetch": {
"command": "uvx",
"args": ["scrapling-fetch-mcp"]
}
}
}运作原理
克劳德自动使用的两个工具:
- 页面抓取 --检索具有分页支持的完整页面
- 模式提取 --查找与正则表达式匹配的内容
三个保护级别,自动升级:
- 基本的 --快速(1-2s),适用于大多数网站
- 隐秘 --中等(3-8s),无头铬
- 最大隐身 --彻底(10s+),完整的浏览器指纹
局限性
- 仅文本内容(文档、文章、参考文献)
- 不适用于大容量抓取或需要身份验证的网站
- 性能因站点复杂性和保护级别而异
许可证
Apache 2.0
