@trishchuk/mcp-fetch-server
@trishchuk/mcp-fetch-server
AIエージェント(Claude Code、Claude Desktop、Cursor、Windsurf、Cline、Antigravityなど)向けに、アンチボット耐性のあるfetchツールを提供する、高性能なModel Context Protocol (MCP)サーバーです。
@trishchuk/fetchを搭載 — 本物のブラウザのTLS(JA3/JA4、ClientHello) およびHTTP/2フィンガープリントを正確に模倣する、ネイティブなcurl-impersonateスタイルのHTTPクライアントです。
🚀 なぜこのサーバーなのか?
標準のNode.js/Undici HTTPクライアントは、最新のボット対策システム(Cloudflare Turnstile / Under Attack Mode、DataDome、PerimeterX / HUMAN、Akamai、Kasada、AWS WAF)によって即座に検出されブロックされます。
さらに、標準のMCPフェッチツールは大きなペイロードで失敗したり、LLMのトークンコンテキストを肥大化させたりすることがよくあります。
@trishchuk/mcp-fetch-serverは両方の問題を解決します。
現実的なブラウザ偽装: 最新ブラウザ(Chrome、Safari、Firefox)の正確な暗号スイート、TLS拡張、ALPN順序、HTTP/2設定フレームを複製します。
LLMコンテキストセーフな切り詰め: レスポンスボディを2MB(
maxResponseBytes)でストリーミングし上限を設定します。サイズ超過のページはエラーでクラッシュする代わりに、きれいに切り詰められ、"truncated": trueでフラグが立てられます。ステートフルセッション:
sessionパラメータを使用して、複数のエージェントツール呼び出しにわたってCookie、ログイン状態、接続プールを維持します。スマートエンコーディング: MIMEタイプを自動検出し、HTML/JSON/XMLにはクリーンなUTF-8テキストを、バイナリファイル(画像、PDF、ドキュメント)にはBase64を返します。
Related MCP server: smart-webfetch-mcp
✅ 必要条件
Node.js >= 24 —
@trishchuk/fetchに必要です。プリビルドのネイティブバイナリは、macOS(arm64、x64)、Linux(x64/arm64、glibcおよびmusl)、Windows(x64)向けに提供されています。その他のプラットフォームは基盤となるクライアントでサポートされていません。
📦 インストールとセットアップ
オプション1: npxで実行(インストール不要)
サーバーはnpx経由で直接実行できます。
npx -y @trishchuk/mcp-fetch-serverオプション2: グローバルまたはローカルインストール
# Global
npm install -g @trishchuk/mcp-fetch-server
# Or clone & install locally
git clone https://github.com/x51xxx/mcp-fetch-server.git
cd mcp-fetch-server
npm install⚙️ MCPクライアント設定
Claude Code
CLI経由で直接追加:
# Using npx (recommended)
claude mcp add fetch -- npx -y @trishchuk/mcp-fetch-server
# Or using local path
claude mcp add fetch -- node /path/to/mcp-fetch-server/src/index.jsClaude Desktop
claude_desktop_config.jsonに追加:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"fetch": {
"command": "npx",
"args": ["-y", "@trishchuk/mcp-fetch-server"]
}
}
}Cursor / Windsurf / Antigravity (.mcp.json)
ワークスペース内に.mcp.jsonを作成または更新:
{
"mcpServers": {
"fetch": {
"command": "npx",
"args": ["-y", "@trishchuk/mcp-fetch-server"]
}
}
}🛠️ ツールリファレンス: fetch
入力パラメータ
パラメータ | 型 | デフォルト | 説明 |
|
| 必須 | 対象の絶対URL(例: |
|
|
| HTTPメソッド( |
|
|
| キーと値のペアとしてのリクエストヘッダー( |
|
|
| UTF-8文字列として送信されるリクエストボディ(JSON、フォームエンコード、生テキスト)。 |
|
|
| ブラウザフィンガープリントプリセット(例: |
|
|
| 宣言するOS: |
|
|
| プロキシURL: |
|
|
| 複数の呼び出しにわたってクライアント接続とCookie jarを共有するためのセッションID。 |
|
|
| カスタムDNSピン留め(例: |
|
|
| リダイレクトモード: |
|
|
| プロトコルバージョンを強制: |
|
|
| 最小TLSバージョン: |
|
|
| 最大TLSバージョン: |
|
|
| リクエスト全体のタイムアウト(ミリ秒)。 |
|
|
| ボディのバイト制限(最大2MB)。この値を超えるレスポンスは安全に切り詰められます。 |
|
|
| ボディの返却形式: |
レスポンススキーマ
1. 成功したHTTP交換
完了したHTTP転送は、標準のJSON結果を返します(redirect: "manual"の下での404、500、または3xxを含む):
{
"status": 200,
"statusText": "OK",
"ok": true,
"url": "https://example.com/data",
"redirected": false,
"headers": {
"content-type": "application/json; charset=utf-8",
"cache-control": "max-age=3600"
},
"bodyEncoding": "text",
"body": "{\"message\": \"Hello world\"}",
"truncated": false
}2. ネットワーク/トランスポート障害
ネットワーク接続が失敗した場合、タイムアウトした場合、またはURLが無効な場合、ツールはisError: trueを返します:
{
"error": true,
"code": "TIMEOUT",
"message": "failed to read response body: request or response body error: operation timed out"
}💡 エージェント向け使用例
1. 保護されたターゲットでのボット検出回避
{
"url": "https://protected-site.com/products",
"impersonate": "chrome_147",
"platform": "macos",
"headers": {
"Accept-Language": "en-US,en;q=0.9"
}
}2. 永続セッション(Cookie Jar)を使用したマルチステップスクレイピング
// Step 1: Login / Obtain Session Cookie
{
"url": "https://example.com/api/login",
"method": "POST",
"session": "agent-crawler-01",
"headers": { "Content-Type": "application/json" },
"body": "{\"user\":\"admin\",\"password\":\"secret\"}"
}
// Step 2: Access protected resource (session cookies automatically preserved)
{
"url": "https://example.com/api/dashboard",
"session": "agent-crawler-01"
}3. SOCKS5プロキシ経由のルーティング
{
"url": "https://geo-restricted.example.com",
"proxy": "socks5://user:pass@proxy.example.com:1080",
"impersonate": "safari_26"
}4. バイナリアセット(画像、PDF)の取得
{
"url": "https://example.com/report.pdf",
"encoding": "base64"
}5. SSRFセーフな取り込みのためのDNSピン留め
{
"url": "https://internal-origin.example.com/feed",
"resolve": {
"internal-origin.example.com": "192.0.2.42"
},
"redirect": "manual"
}🔬 偽装プリセットとフィンガープリント
@trishchuk/mcp-fetch-serverは幅広いブラウザフィンガープリントをサポートしています:
Chrome:
"chrome_100"…"chrome_149"(例:"chrome_147"、"chrome_131"、"chrome_116")Edge:
"edge_101"…"edge_148"Opera:
"opera_116"…"opera_131"Firefox:
"firefox_109"、"firefox_133"、"firefox_147"…、さらに"firefox_private_136"および"firefox_android_135"Safari:
"safari_15.3"…"safari_26.4"、さらにiOS/iPadバリアント("safari_ios_26"、"safari_ipad_26")OkHttp(Androidアプリ):
"okhttp_3.9"…"okhttp_5"動的:
"random"、"weighted_random"(フィンガープリントを自動ローテーション、sessionごとに固定)
バージョン番号はアンダースコアを使用します(chrome_147、chrome147ではありません)。未知の名前は、受け入れ可能なすべてのバリアントをリストしたInvalidArgエラーで即座に失敗します。
🧪 開発
npm install
npm start # run the server over stdio
npm test # end-to-end smoke tests, no network required
npm run format # format with Biome
npm run lint # lint with Biome
npm run check # format + lint check, also run before publishテストは、実際のサーバーをstdio経由で起動し、ローカルHTTPサーバーに対してMCPクライアントで駆動し、上限での切り詰め、リダイレクトモード、HEAD、base64ボディ、タイムアウト、トランスポートエラーをカバーします。
📄 ライセンス
MIT © Taras Trishchuk
Available Tools
1 toolfetchFetchA
HTTP fetch backed by @trishchuk/fetch: a curl-impersonate-style client that emulates a real browser TLS/HTTP2 fingerprint (JA3/JA4, ClientHello, ALPN) so requests are not flagged by fingerprint-based bot detection (Cloudflare, DataDome, PerimeterX, etc.) the way Node's default HTTP client is. Use it for GET/POST/etc. against sites that block or challenge plain scrapers.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to request. | |
| body | No | Request body, sent as UTF-8 text (e.g. JSON string, form-encoded string). | |
| proxy | No | Proxy URL: http://, https://, or socks5://, optionally with user:pass@. | |
| method | No | HTTP method. | GET |
| headers | No | Request headers. | |
| resolve | No | Hostname-to-IP pinning, e.g. { "example.com": "192.0.2.1" }. Useful to pin DNS for SSRF-safety or A/B hosts. | |
| session | No | Opaque session id. Reusing it across calls keeps the same underlying client and cookie jar (e.g. to stay logged in). | |
| encoding | No | How to return the body: "auto" picks text for text-like content-types and base64 otherwise. | auto |
| platform | No | Declared OS for the fingerprint. | |
| redirect | No | Redirect handling. Defaults to "follow". | |
| timeoutMs | No | Request deadline in milliseconds. | |
| httpVersion | No | Force HTTP/1.1 or HTTP/2 instead of negotiating. | |
| impersonate | No | Browser fingerprint profile, e.g. "chrome_147", "safari_26", "random". Defaults to the library default. | |
| tlsMaxVersion | No | ||
| tlsMinVersion | No | ||
| maxResponseBytes | No | Response body cap in bytes (max 2097152, i.e. 2MB, to keep tool output usable). A larger body is truncated to this size and flagged with "truncated": true, not rejected. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the critical behavioral trait of browser fingerprint emulation (JA3/JA4, TLS, HTTP/2) to avoid detection. Without annotations, this provides transparency about why requests succeed. However, it does not mention whether the tool is read-only or has side effects, though HTTP fetch is inherently non-destructive to local state.
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?
The description is extremely concise: two sentences that front-load the core purpose and differentiator, followed by usage guidance. Every sentence serves a purpose, and there is no redundancy or filler.
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?
Given the tool has 16 parameters, no annotations, and no output schema, the description is somewhat incomplete. It does not explain what the tool returns (e.g., status code, headers, body format) or that the response is a standard HTTP response. While the schema covers some constraints like maxResponseBytes, the agent lacks clarity on what to expect after invocation.
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 description coverage is 88%, so the input schema already documents most parameters. The description adds general context about the underlying library and fingerprinting motivation but does not provide additional details on individual parameters beyond what schema descriptions offer. The baseline of 3 is appropriate.
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?
The description clearly identifies the tool as an HTTP fetch client with browser fingerprint emulation to bypass bot detection. It specifies the verb 'fetch', the resource (URLs), and the unique value proposition (curl-impersonate style). This distinguishes it from standard HTTP clients and makes its purpose immediately obvious.
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?
The description explicitly states when to use the tool: 'against sites that block or challenge plain scrapers'. It contrasts with Node's default HTTP client, implying an alternative. However, it does not list explicit sibling tools or provide when-not-to-use guidance, such as for sites without bot detection.
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.
1 tool update
v0.1.0- First observed
fetch
TDQS
Scored across 1 tool
With only a single tool, there is no possibility of confusion with other tools. The tool's purpose is clearly described and distinct by default.
With only one tool, there is no pattern to judge. The name 'fetch' is simple and conventional, matching common HTTP client terminology, but the lack of a verb_noun convention is neutral.
A single tool for an HTTP fetch server is too minimal. Most similar servers would include additional tools for managing headers, cookies, or caching, making this feel under-scoped for its stated purpose of scraping.
The server only provides a basic fetch tool with no support for managing sessions, handling redirects, managing cookies, or performing other common HTTP operations. This leaves significant gaps for any realistic scraping workflow.
Maintenance
Related MCP Connectors
Reliable web fetching for AI agents with retry, circuit breaker, caching, and anti-bot bypass
Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.
Prompt-injection scanning and safe webpage fetching for AI agents reading untrusted content.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to perform undetectable browser automation that bypasses Cloudflare, antibots, and social media blocks. Provides 105 tools for element extraction, network debugging, and real-world web scraping with a 98.7% success rate on protected sites.2,220MIT
- AlicenseAqualityDmaintenanceContext-aware web fetching for LLMs, providing 7 tools to check page size, fetch with truncation, extract code/sections/links/tables, and paginate large documents.7MIT
- AlicenseAqualityDmaintenanceEnables LLMs to fetch and extract web content as markdown with browser impersonation to bypass basic bot detection.1MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with reliable web fetching capabilities, handling retries, caching, and anti-bot bypass automatically.MIT