Skip to main content
Glama
Scrapling Fetch MCP

Scrapling Fetch MCP

by cyberchitta

scrapling-fetch-mcp

License PyPI version

帮助 AI 助手从受机器人保护的网站获取内容。使用 Scrapling (patchright + curl-cffi) 来绕过反自动化措施,返回纯净的 HTML 或 Markdown。

针对文档和参考资料的低频检索进行了优化。不适用于高频抓取或数据采集。

要求:Python 3.10+,uv

Claude Code 技能

使用此工具最简单的方法是将其作为 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/
cp -r /tmp/scrapling-fetch-mcp/skills/s-fetch-setup .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/
cp -r /tmp/scrapling-fetch-mcp/skills/s-fetch-setup ~/.claude/skills/
rm -rf /tmp/scrapling-fetch-mcp

然后让 Claude 运行 /s-fetch-setup — 它将安装工具和浏览器二进制文件(下载量较大),然后自动移除自身。之后,只需自然地提问即可:

"Fetch the docs at https://example.com/api"
"Find all mentions of 'authentication' on that page"
"Get me the installation instructions from their homepage"

Related MCP server: mult-fetch-mcp-server

Claude Desktop (MCP 服务器)

如果您已经运行过 /s-fetch-setup,则工具已安装 — 请直接跳至下方的配置部分。

否则请先安装:

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
Windows: %APAPPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "scrapling-fetch": {
      "command": "uvx",
      "args": ["scrapling-fetch-mcp"]
    }
  }
}

工作原理

包含两个由 Claude 自动使用的工具:

  • 页面获取 — 获取完整页面,支持分页

  • 模式提取 — 查找匹配正则表达式的内容

三种保护级别,自动升级:

  • basic — 快速 (1-2秒),适用于大多数网站

  • stealth — 中等 (3-8秒),无头 Chromium

  • max-stealth — 全面 (10秒以上),完整浏览器指纹

局限性

  • 仅限文本内容(文档、文章、参考资料)

  • 不适用于高频抓取或需要身份验证的网站

  • 性能因网站复杂度和保护级别而异

许可证

Apache 2.0

Available Tools

2 tools
s_fetch_pageA

Fetches a complete web page with pagination support. Retrieves content from websites with bot-detection avoidance. For best performance, start with 'basic' mode (fastest), then only escalate to 'stealth' or 'max-stealth' modes if basic mode fails. Content is returned as 'METADATA: {json}\n\n[content]' where metadata includes length information and truncation status.

Args:
    url: URL to fetch
    mode: Fetching mode (basic, stealth, or max-stealth)
    format: Output format (html or markdown)
    max_length: Maximum number of characters to return.
    start_index: On return output starting at this character index, useful if a previous fetch was truncated and more content is required.

Inputs: url (required), mode, format, max_length, +1 more. Returns: result

s_fetch_patternA

Extracts content matching regex patterns from web pages. Retrieves specific content from websites with bot-detection avoidance. For best performance, start with 'basic' mode (fastest), then only escalate to 'stealth' or 'max-stealth' modes if basic mode fails. Returns matched content as 'METADATA: {json}\n\n[content]' where metadata includes match statistics and truncation information. Each matched content chunk is delimited with '॥๛॥' and prefixed with '[Position: start-end]' indicating its byte position in the original document, allowing targeted follow-up requests with s-fetch-page using specific start_index values.

Args:
    url: URL to fetch
    search_pattern: Regular expression pattern to search for in the content
    mode: Fetching mode (basic, stealth, or max-stealth)
    format: Output format (html or markdown)
    max_length: Maximum number of characters to return.
    context_chars: Number of characters to include before and after each match

Inputs: url (required), search_pattern (required), mode, format, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: s_fetch_page retrieves entire web pages with pagination support, while s_fetch_pattern extracts specific content matching regex patterns. Their descriptions explicitly differentiate them, with no overlap in functionality that would cause confusion.

    Naming Consistency5/5

    Both tools follow a consistent 's_fetch_' prefix pattern with descriptive suffixes ('page' and 'pattern'), maintaining perfect naming consistency. The snake_case convention is applied uniformly across both tool names.

    Tool Count3/5

    With only 2 tools, the server feels somewhat thin for a web scraping domain that typically requires more operations like navigation, form handling, or session management. While the tools are well-designed, the limited count may restrict agent capabilities for complex scraping tasks.

    Completeness4/5

    The tools cover the core web scraping operations of fetching pages and extracting patterns with bot-detection avoidance. However, there are notable gaps for a complete scraping workflow, such as no tools for navigating between pages, handling authentication, managing sessions, or interacting with dynamic content beyond basic fetching.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers