@trishchuk/fetch MCP
A high-performance Model Context Protocol (MCP) server providing a fetch tool for AI agents — Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Antigravity, and others.
Powered by @trishchuk/fetch — a native curl-impersonate-style HTTP client that sends requests with browser-compatible TLS (JA3/JA4, ClientHello) and HTTP/2 profiles. This page calls the server @trishchuk/fetch MCP; it is published on npm as @trishchuk/mcp-fetch-server.
Why this server
Many sites classify HTTP clients by network characteristics — TLS and HTTP/2 fingerprints — before serving content, so standard Node.js/Undici clients are often refused on public pages that a browser opens normally. Standard MCP fetching tools also tend to fail on large payloads or overflow LLM context windows.
@trishchuk/fetch MCP addresses both problems:
- Browser-compatible network profiles — uses the cipher suites, TLS extensions, ALPN order and HTTP/2 settings of modern browsers (Chrome, Safari, Firefox). It is an HTTP client, not a browser: it does not execute JavaScript or pass challenge pages.
- LLM context-safe truncation — streams and caps response bodies at 2MB (
maxResponseBytes). Oversized pages are cleanly truncated and flagged with"truncated": truerather than crashing with errors. - Stateful sessions — maintain cookies, session state and connection pools across multiple agent tool calls using the
sessionparameter. - Smart encoding — automatically detects MIME types and returns clean UTF-8 text for HTML/JSON/XML or Base64 for binary files (images, PDFs, documents).
Requirements
- Node.js ≥ 24 — required by
@trishchuk/fetch. - Prebuilt native binaries ship for macOS (arm64, x64), Linux (x64/arm64, glibc and musl), and Windows (x64). Other platforms are not supported by the underlying client.
Installation & Setup
Run with npx (no installation needed)
npx -y @trishchuk/mcp-fetch-server
Global or local installation
# 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
Claude Code
# Using npx (recommended)
claude mcp add fetch -- npx -y @trishchuk/mcp-fetch-server
# Or using a local path
claude mcp add fetch -- node /path/to/mcp-fetch-server/src/index.js
Claude Desktop
Add to 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)
Create or update .mcp.json in your workspace with the same mcpServers block shown above.
Tool Reference: fetch
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | Target absolute URL (e.g. https://example.com/api). |
method | string | "GET" | HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, etc.). |
headers | object | — | Request headers as key-value pairs. |
body | string | — | Request body sent as a UTF-8 string (JSON, form-encoded, raw text). |
impersonate | string | "chrome_147" | Browser fingerprint preset (e.g. "chrome_147", "safari_26", "random"). |
platform | string | — | Declared OS: "windows", "macos", "linux", "android", or "ios". |
proxy | string | — | Proxy URL: http://, https://, or socks5:// (supports user:pass@host:port). |
session | string | — | Session ID for sharing client connections and cookie jars across multiple calls. |
resolve | object | — | Custom DNS pinning (e.g. {"example.com": "1.2.3.4"}). SSRF-safe testing. |
redirect | string | "follow" | Redirect mode: "follow", "manual", or "error". |
httpVersion | string | — | Force protocol version: "http1" or "http2". |
tlsMinVersion | string | — | Minimum TLS version: "1.0", "1.1", "1.2", "1.3". |
tlsMaxVersion | string | — | Maximum TLS version: "1.0", "1.1", "1.2", "1.3". |
timeoutMs | number | — | Overall request timeout in milliseconds. |
maxResponseBytes | number | 2097152 | Body limit in bytes (max 2MB). Responses exceeding this are safely truncated. |
encoding | string | "auto" | Body return format: "auto" (text for textual MIME types, base64 for binary), "text", or "base64". |
Response Schemas
Successful HTTP exchange
Any completed HTTP transfer returns a standard JSON result (including 404, 500, or 3xx under redirect: "manual"):
{
"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
}
Network / transport failure
If the network connection fails, times out, or the URL is invalid, the tool returns isError: true:
{
"error": true,
"code": "TIMEOUT",
"message": "failed to read response body: request or response body error: operation timed out"
}
Usage Examples for Agents
Request a page with a browser profile
{
"url": "https://example.com/docs/api",
"impersonate": "chrome_147",
"platform": "macos",
"headers": {
"Accept-Language": "en-US,en;q=0.9"
}
}
Multi-step requests with a persistent session (cookie jar)
// Step 1: sign in to your own account to obtain a session cookie
{
"url": "https://example.com/api/login",
"method": "POST",
"session": "agent-session-01",
"headers": { "Content-Type": "application/json" },
"body": "{\"user\":\"admin\",\"password\":\"secret\"}"
}
// Step 2: request a page that needs the session (cookies are preserved automatically)
{
"url": "https://example.com/api/dashboard",
"session": "agent-session-01"
}
Route through a SOCKS5 proxy
{
"url": "https://example.com",
"proxy": "socks5://user:[email protected]:1080",
"impersonate": "safari_26"
}
Fetch binary assets (images, PDFs)
{
"url": "https://example.com/report.pdf",
"encoding": "base64"
}
DNS pinning for SSRF-safe ingestion
{
"url": "https://internal-origin.example.com/feed",
"resolve": {
"internal-origin.example.com": "192.0.2.42"
},
"redirect": "manual"
}
Impersonation Presets & Fingerprints
@trishchuk/fetch MCP supports a wide range of browser profiles:
- Chrome:
"chrome_100"…"chrome_149"(e.g."chrome_147","chrome_131","chrome_116") - Edge:
"edge_101"…"edge_148" - Opera:
"opera_116"…"opera_131" - Firefox:
"firefox_109","firefox_133","firefox_147"…, plus"firefox_private_136"and"firefox_android_135" - Safari:
"safari_15.3"…"safari_26.4", plus iOS/iPad variants ("safari_ios_26","safari_ipad_26") - OkHttp (Android apps):
"okhttp_3.9"…"okhttp_5" - Dynamic:
"random","weighted_random"(rotates fingerprints automatically, pinned persession)
Note: the underlying client, @trishchuk/fetch, ships as native prebuilt binaries per-platform. If you're on an unsupported platform, run the server on a supported host or via a container.