Skip to main content
Glama
x51xxx

@trishchuk/mcp-fetch-server

by x51xxx

@trishchuk/mcp-fetch-server

npm version License: MIT MCP Compatible Node.js

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は両方の問題を解決します。

  1. 現実的なブラウザ偽装: 最新ブラウザ(Chrome、Safari、Firefox)の正確な暗号スイート、TLS拡張、ALPN順序、HTTP/2設定フレームを複製します。

  2. LLMコンテキストセーフな切り詰め: レスポンスボディを2MB(maxResponseBytes)でストリーミングし上限を設定します。サイズ超過のページはエラーでクラッシュする代わりに、きれいに切り詰められ、"truncated": trueでフラグが立てられます。

  3. ステートフルセッション: sessionパラメータを使用して、複数のエージェントツール呼び出しにわたってCookie、ログイン状態、接続プールを維持します。

  4. スマートエンコーディング: MIMEタイプを自動検出し、HTML/JSON/XMLにはクリーンなUTF-8テキストを、バイナリファイル(画像、PDF、ドキュメント)にはBase64を返します。


Related MCP server: 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.js

Claude Desktop

claude_desktop_config.jsonに追加:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.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

string

必須

対象の絶対URL(例: https://example.com/api)。

method

string

"GET"

HTTPメソッド(GETPOSTPUTDELETEPATCHHEADなど)。

headers

object

undefined

キーと値のペアとしてのリクエストヘッダー({"Authorization": "Bearer ..."})。

body

string

undefined

UTF-8文字列として送信されるリクエストボディ(JSON、フォームエンコード、生テキスト)。

impersonate

string

"chrome_147"

ブラウザフィンガープリントプリセット(例: "chrome_147""safari_26""random")。

platform

string

undefined

宣言するOS: "windows""macos""linux""android"、または"ios"

proxy

string

undefined

プロキシURL: http://https://、またはsocks5://user:pass@host:portをサポート)。

session

string

undefined

複数の呼び出しにわたってクライアント接続とCookie jarを共有するためのセッションID。

resolve

object

undefined

カスタムDNSピン留め(例: {"example.com": "1.2.3.4"})。SSRFセーフなテスト。

redirect

string

"follow"

リダイレクトモード: "follow""manual"、または"error"

httpVersion

string

undefined

プロトコルバージョンを強制: "http1"または"http2"

tlsMinVersion

string

undefined

最小TLSバージョン: "1.0""1.1""1.2""1.3"

tlsMaxVersion

string

undefined

最大TLSバージョン: "1.0""1.1""1.2""1.3"

timeoutMs

number

undefined

リクエスト全体のタイムアウト(ミリ秒)。

maxResponseBytes

number

2097152

ボディのバイト制限(最大2MB)。この値を超えるレスポンスは安全に切り詰められます。

encoding

string

"auto"

ボディの返却形式: "auto"(テキスト系MIMEタイプはテキスト、バイナリはbase64)、"text"、または"base64"


レスポンススキーマ

1. 成功したHTTP交換

完了したHTTP転送は、標準のJSON結果を返します(redirect: "manual"の下での404500、または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"
  }
}
// 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_147chrome147ではありません)。未知の名前は、受け入れ可能なすべてのバリアントをリストした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

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Tools

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Enables 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.
    1,589
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Drop-in MCP replacement for the built-in WebFetch tool. Adds domain-scoped custom HTTP headers via YAML config, with bot-block detection, HTML-to-text extraction, retries, proxies, and prompt-injection sanitization.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Context-aware web fetching for LLMs, providing 7 tools to check page size, fetch with truncation, extract code/sections/links/tables, and paginate large documents.
    7
    MIT

View all related MCP servers

Related MCP Connectors

  • Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.

  • Deterministic AI agent microtools, no accounts/API keys. fetch_extract: 98% token cut. 38 tools.

  • Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.

View all MCP Connectors

Latest Blog Posts

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/x51xxx/mcp-fetch-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server