# ClearFetch > Unblocked Web Context Layer and Model Context Protocol (MCP) Infrastructure for AI Agents. Turn any live webpage - with zero 403 blocks, Cloudflare Turnstile, or anti-bot hurdles - into clean, token-optimized Markdown, typed JSON, and full-page PNG/WebP screenshots in a single tool call. - [Website](https://clearfetch.dev): Official portal, dashboard, and API key management. - [Web Reader API](https://clearfetch.dev/read): Bypass Cloudflare/DataDome and convert URLs to clean LLM Markdown. - [Structured Extractor](https://clearfetch.dev/extract): Deterministic JSON Schema + prompt extraction via built-in LLM inference. - [Search & RAG Engine](https://clearfetch.dev/search): Concurrent web search and unified Markdown bundles for RAG. - [Web Screenshot API](https://clearfetch.dev/screenshot): Full-page, dark-mode, Retina, and CSS-element screenshot specifications. - [MCP Server](https://clearfetch.dev/mcp): Setup guide for Claude Desktop, Cursor, Windsurf, and Cline (`npx -y clearfetch`). - [Live Playground](https://clearfetch.dev/playground): Interactive URL reader and live screenshot testing sandbox. - [API Documentation](https://clearfetch.dev/docs): Complete REST API reference, Python SDK (LangChain/LlamaIndex/CrewAI), and n8n node. - [Pricing](https://clearfetch.dev/pricing): Free 500 credits and transparent 30-day plans (PayPal & Crypto). - [FAQ](https://clearfetch.dev/faq): Technical answers on anti-bot bypass, caching, and zero-risk billing. - [npm Package](https://www.npmjs.com/package/clearfetch): Official Model Context Protocol (MCP) server. - [PyPI Package](https://pypi.org/project/clearfetch/): Official Python SDK for LangChain & LlamaIndex. - [n8n Community Node](https://www.npmjs.com/package/n8n-nodes-clearfetch): Official n8n workflow integration node. - [GitHub Repository](https://github.com/zenkdom/clearfetch): Open-source server code, client SDKs, and examples. ## Key Capabilities - **Automated Anti-Bot Bypass**: Native residential proxy rotation and Turnstile/DataDome solvers bypass Cloudflare, Akamai, and AWS WAF challenges without manual proxy management. - **LLM Token Optimization**: Strips noisy HTML boilerplate, ads, navigation bars, SVG clusters, and inline styling, delivering up to 80% token savings compared to raw web pages. - **Strictly Typed JSON Extraction**: Accepts user-defined JSON schemas and extracts structured entities using LLM-guided extraction. - **Stealth Web Screenshot API**: Renders pages in headless Chromium with Cloudflare/DataDome bypass to return PNG, JPEG, or WebP screenshots (full-page, Retina HiDPI, mobile, dark mode, ad-blocking, CSS element cropping). - **Model Context Protocol (MCP) Support**: Compatible with Claude Desktop, Cursor IDE, Windsurf, LibreChat, and any MCP client. - **Transparent 30-Day Billing**: Fixed 30-day cycles with no surprise recurring overdraft charges; supports Credit Card / PayPal and Cryptocurrency (USDT, TON, SOL, BTC, ETH). ## Model Context Protocol (MCP) ### Quick Start Run instantly via npx without local installation: ```bash npx -y clearfetch ``` ### Claude Desktop Configuration (`claude_desktop_config.json`) ```json { "mcpServers": { "clearfetch": { "command": "npx", "args": ["-y", "clearfetch"], "env": { "CLEARFETCH_API_KEY": "cf_live_your_api_key_here" } } } } ``` ### Cursor IDE Configuration (`.cursor/mcp.json`) ```json { "mcpServers": { "clearfetch": { "command": "npx", "args": ["-y", "clearfetch"], "env": { "CLEARFETCH_API_KEY": "cf_live_your_api_key_here" } } } } ``` ### Available MCP Tools 1. `clearfetch_read`: Fetches any target URL (handling JavaScript rendering and anti-bot challenges) and returns clean, token-optimized Markdown. - Parameters: - `url` (string, required): The target webpage URL to read. - `stealth` (string, optional): Proxy mode: `"auto"` (standard with automatic anti-bot escalation) or `"force"` (immediate residential stealth). 2. `clearfetch_extract`: Extracts structured JSON matching a specified JSON schema from a webpage. - Parameters: - `url` (string, required): The target webpage URL. - `json_schema` (object, required): A JSON Schema describing the target data structure. - `prompt` (string, optional): Specific guidance or instructions for the extractor. 3. `clearfetch_search`: Performs real-time web search and content retrieval. - Parameters: - `query` (string, required): Search query keywords. - `limit` (integer, optional): Maximum number of search results (1-10). 4. `clearfetch_screenshot`: Captures a PNG, JPEG, or WebP screenshot of any target URL (full-page, mobile, dark mode, Retina, ad-free, or CSS element-cropped) and returns a native MCP image block. - Parameters: - `url` (string, required): Target HTTP/HTTPS webpage URL. - `format` (string, optional): `"png"`, `"jpeg"`, or `"webp"` (default `"png"`). - `full_page` (boolean, optional): Capture full scrollable height. - `dark_mode` (boolean, optional): Emulate dark color scheme. - `block_ads` (boolean, optional): Block ads and cookie-consent banners (default `true`). - `selector` (string, optional): CSS selector to crop tightly around an element. ## REST API Reference Base URL: `https://api.clearfetch.dev` All authenticated requests require the header: `Authorization: Bearer ` ### Endpoints - `POST /v1/read`: Fetch and convert webpage to Markdown (1 credit standard, 3 stealth, 0 on error). - Body: `{"url": "https://example.com", "stealth": "auto"}` - Response: `{"success": true, "url": "https://example.com", "title": "Example Domain", "markdown": "# Example...", "metadata": {"status_code": 200, "cached": false, "stealth_used": false, "estimated_tokens": 25, "latency_ms": 180, "credits_used": 1}}` - `POST /v1/extract`: Extract AI-structured JSON matching your schema from a URL (3 credits on success, 0 on error). - Body: `{"url": "https://example.com", "prompt": "Extract product name and USD price", "stealth": "auto", "json_schema": {...}}` - Response: `{"success": true, "url": "https://example.com", "data": {...}, "metadata": {"status_code": 200, "cached": false, "stealth_used": false, "estimated_tokens": 110, "latency_ms": 620, "credits_used": 3}}` - `POST /v1/search`: Perform search and page extraction (2 credits on success, 0 on error). - Body: `{"query": "latest AI news", "limit": 5}` - `POST /v1/screenshot` (and `GET /v1/screenshot`): Capture full-page, mobile, dark-mode, or CSS-element screenshots (PNG/JPEG/WebP). Costs 3 credits on success, 0 on error. - Body: `{"url": "https://example.com", "format": "png", "full_page": true, "dark_mode": true, "block_ads": true}` - Response: JSON with `image_base64`, `data_uri`, `width`, `height`, `size_bytes`, `metadata` (or raw image bytes when `response_type: "binary"`). - `GET /v1/usage`: Retrieve account quota, credits balance, and active plan details. ## Python SDK (`clearfetch`) Installation: ```bash pip install clearfetch ``` Usage: ```python from clearfetch import ClearFetch client = ClearFetch(api_key="cf_live_your_api_key") doc = client.read("https://news.ycombinator.com") print(doc.title) print(doc.markdown) extracted = client.extract( url="https://quotes.toscrape.com/", json_schema={"type": "object", "properties": {"quotes": {"type": "array"}}, "required": ["quotes"]}, prompt="Extract the top 2 quotes and authors", ) print(extracted.data) shot = client.screenshot("https://example.com", full_page=True, dark_mode=True, output_path="page.png") print(shot.width, shot.height, shot.size_bytes) ``` ## Pricing & Tiers - **Free Tier**: 500 free credits upon registration (no credit card required), 5 concurrent streams, 60 req/min. - **Starter Plan** ($19/mo): 10,000 credits, full stealth anti-bot solvers, standard priority. - **Growth Plan** ($79/mo): 60,000 credits, 20 concurrent connections, 300 req/min, priority residential proxy pool. - **Scale Plan** ($249/mo): 250,000 credits, 50 concurrent streams, dedicated high-speed extraction engine. ## Support & Contact - Email: support@clearfetch.dev - Website: https://clearfetch.dev - Dashboard: https://clearfetch.dev/dashboard