ClearFetch MCP

Equips AI agents with anti-bot resilient web reading, structured JSON extraction, and live search. Bypasses Cloudflare Turnstile, DataDome, and 403 Forbidden roadblocks to deliver clean, token-optimized Markdown directly to Claude, Cursor, and autonomous agent frameworks.

Documentation

ClearFetch β€” Model Context Protocol (MCP) & SDKs for AI Agents

PyPI version npm version License: MIT Python 3.10+ Node.js 18+

The Official Model Context Protocol (MCP) Server & Client SDKs for ClearFetch.
Bypass Cloudflare Turnstile, DataDome, and anti-bot challenges to deliver clean, token-optimized Markdown and structured JSON directly into your AI workflows.

Website β€’ API Documentation β€’ PyPI SDK β€’ npm MCP Server


πŸš€ Quick Install & Distribution Packages

1. Model Context Protocol (MCP) Server for Cursor & Claude Desktop

Run instantly without cloning or local installation:

npx -y clearfetch

Claude Desktop Configuration (claude_desktop_config.json)

{
  "mcpServers": {
    "clearfetch": {
      "command": "npx",
      "args": ["-y", "clearfetch"],
      "env": {
        "CLEARFETCH_API_KEY": "cf_live_your_api_key_here"
      }
    }
  }
}

Cursor IDE Configuration (.cursor/mcp.json)

{
  "mcpServers": {
    "clearfetch": {
      "command": "npx",
      "args": ["-y", "clearfetch"],
      "env": {
        "CLEARFETCH_API_KEY": "cf_live_your_api_key_here"
      }
    }
  }
}

Available MCP Tools

  • clearfetch_read: Fetches any protected URL and returns token-optimized, clean Markdown.
  • clearfetch_extract: Extracts strictly-typed JSON matching your provided JSON schema.
  • clearfetch_search: Performs concurrent web search and scrapes top results into a single context object.

2. Python SDK (clearfetch)

Install from PyPI:

pip install clearfetch

Basic Usage

from clearfetch import ClearFetch

client = ClearFetch(api_key="cf_live_your_api_key_here")

# 1. Read protected webpage as clean Markdown
doc = client.read("https://www.bloomberg.com/markets", stealth="auto")
print(doc.title)
print(doc.markdown)

# 2. Extract structured JSON using JSON Schema
schema = {
    "type": "object",
    "properties": {
        "market_indices": {"type": "array", "items": {"type": "string"}},
        "top_stories": {"type": "array", "items": {"type": "string"}}
    },
    "required": ["market_indices"]
}
data = client.extract("https://www.bloomberg.com/markets", schema=schema)
print(data.data)

LangChain Integration

from clearfetch.integrations.langchain import ClearFetchTool

tool = ClearFetchTool(api_key="cf_live_your_api_key_here")
response = tool.run("https://news.ycombinator.com")
print(response)

LlamaIndex Integration

from clearfetch.integrations.llamaindex import ClearFetchReader

reader = ClearFetchReader(api_key="cf_live_your_api_key_here")
documents = reader.load_data(urls=["https://en.wikipedia.org/wiki/Artificial_intelligence"])

3. n8n Community Node (n8n-nodes-clearfetch)

In your n8n instance:

  1. Navigate to Settings β†’ Community Nodes.
  2. Click Install a community node.
  3. Enter n8n-nodes-clearfetch and confirm.

πŸ“‘ REST API Reference

All requests authenticate using standard Bearer authorization: Authorization: Bearer cf_live_....

Read Webpage (POST https://api.clearfetch.dev/v1/read)

curl -X POST https://api.clearfetch.dev/v1/read \
  -H "Authorization: Bearer cf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/protected-page",
    "stealth": "auto",
    "only_main_content": true
  }'

Extract Structured Data (POST https://api.clearfetch.dev/v1/extract)

curl -X POST https://api.clearfetch.dev/v1/extract \
  -H "Authorization: Bearer cf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://store.example.com/item/123",
    "json_schema": {
      "type": "object",
      "properties": {
        "product_name": { "type": "string" },
        "price_usd": { "type": "number" }
      },
      "required": ["product_name", "price_usd"]
    }
  }'

Search & Scrape (POST https://api.clearfetch.dev/v1/search)

curl -X POST https://api.clearfetch.dev/v1/search \
  -H "Authorization: Bearer cf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Model Context Protocol servers 2026",
    "limit": 3,
    "scrape_results": true
  }'

πŸ“¦ Packages in this Repository


πŸ”‘ Getting an API Key

Create a free account and get your API key at clearfetch.dev.


πŸ“„ License

MIT License. See LICENSE for details.