ClearFetch MCP
AI एजेंटों को बॉट-विरोधी सुरक्षा से अप्रभावित वेब रीडिंग, संरचित JSON निष्कर्षण और लाइव खोज की सुविधा देता है। Cloudflare Turnstile, DataDome और 403 Forbidden की बाधाओं को पार करके, Claude, Cursor और स्वायत्त एजेंट फ़्रेमवर्क को सीधे साफ़-सुथरा, टोकन-अनुकूलित Markdown प्रदान करता है।
दस्तावेज़
ClearFetch — Model Context Protocol (MCP) & SDKs for AI Agents
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.
🚀 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:
- Navigate to Settings → Community Nodes.
- Click Install a community node.
- Enter
n8n-nodes-clearfetchand 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
packages/mcp-server: Model Context Protocol server published to npm asclearfetch.packages/python-sdk: Python SDK with LangChain/LlamaIndex support published to PyPI asclearfetch.packages/n8n-nodes-clearfetch: Official n8n community node.
🔑 Getting an API Key
Create a free account and get your API key at clearfetch.dev.
📄 License
MIT License. See LICENSE for details.