HatFetch
OfficialEnables scraping of websites protected by Akamai's anti-bot measures through automatic detection and escalation to browser-based rendering with residential proxies.
Enables scraping of websites protected by Cloudflare's anti-bot measures through automatic detection and escalation to browser-based rendering with residential proxies.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HatFetchread https://example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ฉ HatFetch
Give any LLM agent the power to read the modern web โ JavaScript sites and most bot-protected pages.
Clean Markdown out. Renders JS, rotates residential IPs, escalates to a real stealth browser only when needed.
HatFetch is a Model Context Protocol server that gives Claude, Cursor, and any MCP client the tools scrape, crawl, and screenshot โ turning web pages into clean, LLM-ready Markdown.
The difference from a plain fetch: HatFetch escalates automatically. It starts with a fast HTTP fetch; if the page is a JavaScript app that renders client-side, or it gets blocked by bot detection, HatFetch transparently escalates to a real stealth browser (Patchright) running through residential proxies. Your agent stops getting empty shells and Access Denied, and starts getting content.
What it does and doesn't do (honest version)
Target | Result |
Server-rendered sites (news, docs, blogs, forums, most catalogs) | โ Fast HTTP path |
JavaScript / SPA sites (React, Vue, client-rendered) | โ Auto-escalates to the browser and renders |
Geo-restricted content | โ Exit from any of 148+ countries |
Sites that block datacenter IPs / rate-limit by IP | โ Rotating residential IPs |
Many Cloudflare / anti-bot sites | โ Browser + residential fingerprint passes a large share |
The hardest anti-bot (aggressive Cloudflare, DataDome, PerimeterX) | โ ๏ธ Sometimes blocked โ HatFetch tells you honestly instead of returning a CAPTCHA page as "content" |
CAPTCHA-gated / login-required flows | โ Out of scope (needs an interactive solver) |
No tool passes 100% of anti-bot in 2026 โ anyone claiming otherwise is selling something. HatFetch gets you the calm-to-medium web reliably and a good share of the hard web, and is honest about the rest.
Recommended proxies โ ProxyHat residential IPs. Every feature in this package is tested end-to-end against ProxyHat and works great. First-class integration; also works with any proxy, or none.
Quick start
Add HatFetch to your MCP client โ no install step, npx handles it:
// Claude Desktop: claude_desktop_config.json ยท Cursor: ~/.cursor/mcp.json
{
"mcpServers": {
"hatfetch": {
"command": "npx",
"args": ["-y", "hatfetch"]
}
}
}For Claude Code:
claude mcp add hatfetch -- npx -y hatfetchThat's it. Ask your agent to "read https://example.com and summarize it" and it will use the scrape tool.
Related MCP server: markfetch-mcp
Getting blocked? ๐ง
Out of the box HatFetch fetches directly from your machine's IP. That's fine for open sites โ but most valuable pages sit behind bot detection that blocks datacenter and server IPs on sight. When that happens, HatFetch tells your agent exactly why, and how to fix it in one step: route through residential IPs.
{
"mcpServers": {
"hatfetch": {
"command": "npx",
"args": ["-y", "hatfetch"],
"env": {
"PROXYHAT_API_KEY": "your-proxyhat-api-key"
}
}
}
}That's the whole setup. Drop in your API key and HatFetch automatically looks up an active residential sub-user on your account, connects through the gateway, and rotates a fresh IP on every request โ retrying automatically when a site pushes back. Get a key (free trial) at proxyhat.com: 50M+ residential & mobile IPs across 148+ countries.
Explicit gateway credentials โ skip the API lookup and use a specific sub-user's proxy login:
{ "env": { "PROXYHAT_USERNAME": "your-proxy-username", "PROXYHAT_PASSWORD": "your-proxy-password" } }Pick a specific sub-user while still using the API key: add
"PROXYHAT_SUBUSER": "<uuid or name>".Bring your own proxy โ any HTTP(S) proxy:
"PROXY_URL": "http://user:pass@host:port".
Tools
scrape
Fetch a single URL and return its main content as Markdown.
Argument | Type | Default | Description |
| string | โ | Absolute |
| boolean |
| Strip nav/ads/footer and return just the article body. |
|
|
|
|
crawl
Breadth-first crawl a site and return every page as Markdown.
Argument | Type | Default | Description |
| string | โ | URL to start from. |
| number |
| Link depth to follow from the seed. |
| number |
| Maximum pages to fetch. |
| boolean |
| Only follow links on the seed's host. |
|
|
| Render mode per page (see |
screenshot
Render a URL in a real browser (residential + stealth) and return a PNG image.
Argument | Type | Default | Description |
| string | โ | Absolute |
Browser mode downloads a Chromium build (~150MB) on first use โ one-time, automatic. The HTTP path needs no browser.
Why HatFetch
Plain | Hosted scraping APIs | HatFetch | |
Clean Markdown for LLMs | โ | โ | โ |
Renders JavaScript / SPA sites | โ | โ | โ (auto) |
Runs locally, no API middleman | โ | โ | โ |
Gets past IP blocks & geo-walls | โ | โ | โ (residential) |
Gets past common anti-bot | โ | โ | โ (browser + residential) |
Bring your own proxies | โ | โ | โ |
Free & open source (MIT) | โ | โ | โ |
Per-request cost | free | ๐ฒ per page | free + proxy bandwidth |
Configuration
All configuration is via environment variables.
Variable | Description |
| Simplest. Your ProxyHat API key โ HatFetch auto-selects an active residential sub-user via the API. |
| With the API key: pick a specific sub-user by |
| Alternative to the API key: a sub-user proxy username (gateway login). |
| Sub-user proxy password (used with |
| ISO country code to exit from, or |
| Optional state/region to target (e.g. |
| Optional city to target (e.g. |
| Keep one IP for a session, e.g. |
| AI IP-quality filter: |
| Any generic |
HatFetch connects to the ProxyHat HTTP gateway (
gate.proxyhat.com:8080) and builds the targeting username for you. Prefer full API-driven provisioning (minting connection URLs viaPOST /v1/proxy-descriptors)? SetPROXY_URLto the minted URL instead.
Verify your setup
Run the built-in self-test to confirm your install and proxy credentials work end-to-end โ it compares your direct IP against the proxied exit IP and checks rotation:
PROXYHAT_API_KEY=your-key npx -y hatfetch --selftest โ Direct connection works โ your IP is 203.0.113.5
โ Proxy resolved โ ProxyHat residential (via API key)
โ Traffic is routed through the proxy โ exit IP is 183.88.219.209 (not your 203.0.113.5)
โ IP rotation works โ second request exited from 73.149.15.4
โ Scrape pipeline works โ fetched and parsed example.comOther commands: hatfetch --version, hatfetch --help.
How it works
HatFetch escalates from cheap to powerful, only paying for what a page needs:
HTTP fetch with a realistic User-Agent (direct or through your proxy). Detects blocks โ anti-bot status codes (
403/429/503) and challenge/block-page signatures from the major vendors (Cloudflare, DataDome, PerimeterX, Incapsula, Akamai) โ and retries through a fresh residential IP.Auto-escalate to the browser when the page is an empty JS shell, or was blocked/reset. A real Patchright Chromium (patched to defeat headless fingerprinting) loads the page through the residential proxy, waits for the network to settle, and scrolls to trigger lazy content.
Extract the main content with Mozilla Readability and convert to Markdown with Turndown.
Be honest โ if even the browser lands on a challenge/block page, HatFetch returns an actionable error instead of passing the block page off as content.
Safety: a built-in SSRF guard refuses internal/loopback/metadata addresses, and tool output is size-capped so a huge page can't blow your context window.
Development
npm install
npm run build # compile to dist/
npm test # vitest
npm run dev # run from source (tsx)Roadmap
searchtool (query โ results โ scrape)Structured extraction (CSS / schema)
Page actions (click, fill, login flows)
Optional CAPTCHA-solver hook for the hardest targets
Python edition
License
MIT ยฉ ProxyHat
Available Tools
3 toolscrawlCrawl a website to MarkdownA
Breadth-first crawl a site starting from a URL and return each page as clean Markdown. Follows in-domain links up to a depth/page limit. Same proxy and block-handling as scrape. Use to ingest a docs site or section of a site.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http(s) URL to start crawling from. | |
| render | No | Render mode per page (see scrape). Default 'auto'. 'browser' is slower but handles JS sites. | |
| maxDepth | No | Link depth from the seed. Default 2. | |
| maxPages | No | Max pages to fetch. Default 20. | |
| sameDomain | No | Only follow links on the seed's host. Default true. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes algorithm (breadth-first), restrictions (in-domain links, depth/page limit), and behavior relative to sibling 'scrape' (same proxy/block-handling). No annotations were provided, so description carries full burden; it covers core behavioral traits without contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each adding value. Front-loaded with purpose, followed by behavioral details and usage guidance. Zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a crawl tool with 5 parameters and no output schema, description covers algorithm, constraints, and expected result (Markdown). Lacks explicit mention of return format details, but the purpose is clear enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds context like 'breadth-first' and 'same proxy/block-handling as scrape' but does not elaborate on individual parameters beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Breadth-first crawl a site starting from a URL and return each page as clean Markdown.' The verb (crawl) and resource (website, Markdown) are specific, and the tool is distinguished from siblings 'scrape' and 'screenshot' by being a bulk crawl.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use to ingest a docs site or section of a site.' and mentions equivalence to 'scrape' in proxy/block-handling. However, it does not specify when not to use or list alternatives explicitly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scrapeScrape a web page to MarkdownA
Fetch a single URL and return its content as clean, LLM-ready Markdown. Renders JavaScript sites and gets past bot detection automatically: tries a fast HTTP fetch, then escalates to a real stealth browser through residential proxies when a page is an empty JS app or is blocked (Cloudflare, DataDome, 403/429). Use for docs, articles, product pages, SPAs, or any single page.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http(s) URL to fetch. | |
| render | No | How to fetch. 'auto' (default): HTTP first, escalate to a real browser if needed. 'http': fast, HTTP only. 'browser': force full JS rendering + stealth fingerprint. | |
| onlyMainContent | No | Extract just the main article/content, stripping nav/ads/footer. Default true. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses automatic escalation from HTTP to browser with stealth proxies for JS rendering and bot detection bypass. No annotations present, so description carries full burden; missing potential failure or rate limit info.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences front-loaded with main purpose, no fluff. Every sentence adds necessary context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, usage, behavior, and parameter details adequately for a simple fetch tool without output schema. Could mention error handling or timeouts.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. Description adds value by explaining 'render' enum behaviors (auto, http, browser) and 'onlyMainContent' default, going beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool fetches a single URL and returns LLM-ready Markdown. Distinguishes from siblings 'crawl' and 'screenshot' by specifying single-page focus and output format.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use for docs, articles, product pages, SPAs, or any single page,' providing clear context. Lacks explicit exclusions but effectively implies appropriate use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenshotScreenshot a web pageA
Render a URL in a real browser (through residential proxies + stealth) and return a PNG screenshot of the page. Use to see a page visually or capture JS-rendered content.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http(s) URL to screenshot. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes behavioral traits such as using a real browser, residential proxies, and stealth, which adds value beyond the schema. However, no annotations are provided and it does not disclose limitations, error handling, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded information, no wasted words. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the main purpose and output format (PNG) but lacks details on screenshot dimensions, error behavior, or prerequisites. With no output schema, more completeness would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'url' is well-described in the schema. The description adds that the output is a PNG screenshot from a browser context, but does not add substantial new meaning beyond the schema. Baseline is 3 for 100% coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it renders a URL in a real browser and returns a PNG screenshot. Includes specifics like residential proxies and stealth. However, does not explicitly differentiate from sibling tools (crawl, scrape) but the action is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context for use: 'to see a page visually or capture JS-rendered content.' Lacks explicit when-not or alternatives, but the context is sufficient for basic guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.5.1- First observed
crawl - First observed
scrape - First observed
screenshot
TDQS
Each tool has a distinct purpose: crawl for multi-page ingestion, scrape for single-page content, and screenshot for visual capture. No overlap in functionality.
All tool names are simple verbs (crawl, scrape, screenshot), following a consistent pattern without mixing styles or conventions.
Three tools is a minimal but reasonable set for a web fetching server. While it covers core needs, there is room for additional utilities like status checking or depth control.
The server covers essential operations for fetching web content (single, multi, visual). Minor gaps exist, such as options for crawl depth or page metadata, but agents can accomplish most tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Cloud scraping & crawling API for AI agents. Turn any URL into clean, LLM-ready markdown.
Clean Markdown and AI-readability scoring for any URL. Built for AI agents.
11Any web page as clean Markdown for agents. Hosted, no install. Free tier; Pro adds JS rendering.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to read web pages reliably, returning clean markdown content, hyperlinks, and metadata without navigation or ad noise.315MIT
- AlicenseAqualityCmaintenanceEnables AI agents to fetch any web page as clean markdown or screenshot it, turning URLs into LLM-ready context.211MIT
- AlicenseAqualityBmaintenanceEnables AI agents to read clean Markdown from any URL and assess source quality with AI-readability scores.63741MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to crawl and scrape websites, converting HTML to clean Markdown and structured metadata with support for JavaScript rendering, bot evasion, and SSRF protection.166MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ProxyHatCom/HatFetch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server