Skip to main content

Helps AI assistants access text content from bot-protected websites. MCP server that fetches HTML/markdown from sites with anti-automation measures using Scrapling.

Project description

Scrapling Fetch MCP

License PyPI version

An MCP server that helps AI assistants access text content from websites that implement bot detection, bridging the gap between what you can see in your browser and what the AI can access.

Intended Use

This tool is optimized for low-volume retrieval of documentation and reference materials (text/HTML only) from websites that implement bot detection. It has not been designed or tested for general-purpose site scraping or data harvesting.

Note: This project was developed in collaboration with Claude Sonnet 3.7, using LLM Context.

Installation

  1. Requirements:

    • Python 3.10+
    • uv package manager
  2. Install dependencies and the tool:

uv tool install scrapling
scrapling install
uv tool install scrapling-fetch-mcp

Setup with Claude

Add this configuration to your Claude client's MCP server configuration:

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

Available Tools

This package provides two distinct tools:

  1. s-fetch-page: Retrieves complete web pages with pagination support
  2. s-fetch-pattern: Extracts content matching regex patterns with surrounding context

Example Usage

Fetching a Complete Page

Human: Please fetch and summarize the documentation at https://example.com/docs

Claude: I'll help you with that. Let me fetch the documentation.

<mcp:function_calls>
<mcp:invoke name="s-fetch-page">
<mcp:parameter name="url">https://example.com/docs</mcp:parameter>
<mcp:parameter name="mode">basic</mcp:parameter>
</mcp:invoke>
</mcp:function_calls>

Based on the documentation I retrieved, here's a summary...

Extracting Specific Content with Pattern Matching

Human: Please find all mentions of "API keys" on the documentation page.

Claude: I'll search for that specific information.

<mcp:function_calls>
<mcp:invoke name="s-fetch-pattern">
<mcp:parameter name="url">https://example.com/docs</mcp:parameter>
<mcp:parameter name="mode">basic</mcp:parameter>
<mcp:parameter name="search_pattern">API\s+keys?</mcp:parameter>
<mcp:parameter name="context_chars">150</mcp:parameter>
</mcp:invoke>
</mcp:function_calls>

I found several mentions of API keys in the documentation:
...

Functionality Options

  • Protection Levels:

    • basic: Fast retrieval (1-2 seconds) but lower success with heavily protected sites
    • stealth: Balanced protection (3-8 seconds) that works with most sites
    • max-stealth: Maximum protection (10+ seconds) for heavily protected sites
  • Content Targeting Options:

    • s-fetch-page: Retrieve entire pages with pagination support (using start_index and max_length)
    • s-fetch-pattern: Extract specific content using regular expressions (with search_pattern and context_chars)

Tips for Best Results

  • Start with basic mode and only escalate to higher protection levels if needed
  • For large documents, use the pagination parameters with s-fetch-page
  • Use s-fetch-pattern when looking for specific information on large pages
  • The AI will automatically adjust its approach based on the site's protection level

Limitations

  • Designed only for text content: Specifically for documentation, articles, and reference materials
  • Not designed for high-volume scraping or data harvesting
  • May not work with sites requiring authentication
  • Performance varies by site complexity

License

Apache 2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrapling_fetch_mcp-0.1.5.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapling_fetch_mcp-0.1.5-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file scrapling_fetch_mcp-0.1.5.tar.gz.

File metadata

  • Download URL: scrapling_fetch_mcp-0.1.5.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for scrapling_fetch_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fb72e50021155247ed880b19c1e19baaee756c59495e76836fb39bdfc8771306
MD5 b93ab5482dfaae0732ccceed5ad64094
BLAKE2b-256 627dcade5117650960da3f02f20e34313b7e1cc71c2f64859a7948dc6c7311fe

See more details on using hashes here.

File details

Details for the file scrapling_fetch_mcp-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for scrapling_fetch_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b5cf1e0cb3df081372438b0d31fa092624543c880ddd81a479c99744c6976b97
MD5 ac741ce91bc4bff72fe0316b6b3e5854
BLAKE2b-256 122802ec160cafc9d9fde932ea8ec99f3312cc9d69200dbae66b2725cafef645

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page