Skip to main content

A maximum fault-tolerant, stealth-enabled MCP server for web searching and fetching.

Project description

SearchFetch (MCP Server)

A fault-tolerant, stealth-enabled Model Context Protocol (MCP) server for web searching and content fetching. Built for AI Agents (Cursor, Claude Code, OpenCode), it uses a stealth browser engine to fetch pages, dynamically handles SPAs/React, and converts bloat into token-optimized Markdown.

Features

  • Stealth Engine: Powered by CloakBrowser C++ patches + humanize logic. The browser renders and moves like a real user, reducing bot-detection scores.
  • Fault Tolerance: Auto-healing browser sessions, grace-period timeouts for SPAs, and network-level blocking of tracking scripts and media.
  • Token-Optimized Output: Strips base64 images, SVGs, scripts, and inline styles from the DOM before Markdown conversion.
  • Dual Runtime: Natively supports zero-install execution via both Python (uvx) and Node.js (npx).
  • Template-Driven Extraction: Structured extraction via shared JSON templates (GitHub, npm, PyPI, crates.io, docs pages, Docker Hub, and more). Supports custom inline templates.

Usage & Installation

You do not need to install this repository manually. Configure your agent to use the zero-install commands npx or uvx.

Claude Desktop Configuration

Option A: Python (uvx - Recommended)

{
  "mcpServers": {
    "searchfetch": {
      "command": "uvx",
      "args": ["searchfetch"]
    }
  }
}

Option B: Node.js (npx)

{
  "mcpServers": {
    "searchfetch": {
      "command": "npx",
      "args": ["-y", "searchfetch"]
    }
  }
}

Cursor / IDE Configuration

Add via the MCP panel in Cursor settings:

  • Type: command
  • Command: uvx searchfetch (or npx -y searchfetch)

Available Tools

1. websearch

Search the web through the template pipeline. DuckDuckGo and Google are built-in; custom search templates can be selected by name.

Parameter Type Default Description
query string required The search query string.
engine string "duckduckgo" "duckduckgo", "google", or a custom search template name.
max_results number 10 Maximum number of results to return.
region string/null null Region/language code (e.g. "us-en", "de-de"). DDG maps directly; Google maps to gl/hl.
safe_search boolean/null null Enable safe search. null uses the template default.
block_media boolean true Block images, media, and fonts at the network layer.

2. webfetch

Fetch a page with the stealth browser and extract structured Markdown using a template. Falls back to generic Markdown extraction for unknown pages.

Parameter Type Default Description
url string required Full URL (must start with http/https).
template string "auto" "auto", a built-in name, or inline JSON template.
start_index number 0 Character offset for pagination.
max_length number 10000 Maximum characters per request.
block_media boolean true Block images, videos, and fonts at the network layer.

Template extraction supports text, markdown, attribute, and html formats; nested children; repeated sections; URL-decoding transforms; per-template cookies; and per-template resource blocking.

Built-in templates live in templates/*.json and are shared by the Node.js and Python implementations.


Local Development

# Install dependencies
npm install
pip install -e ".[dev]"

# Run tests
npm test                # runs all tests (JS + Python)
npm run test:js         # Node.js unit tests (built-in test runner)
npm run test:py         # Python unit tests (pytest)

# Lint
npm run lint            # runs all linters
npm run lint:js         # ESLint
npm run lint:py         # Ruff

# Format
npm run format          # auto-format all source files
npm run format:check    # check formatting without changes

# MCP inspector (for manual testing)
npm run inspector-js    # test with MCP Inspector (Node.js)
npm run inspector-py    # test with MCP Inspector (Python)

Architecture

This repository uses a flat dual-manifest structure (package.json and pyproject.toml in the root). Both runtimes (index.js for Node, server.py for Python) share the same templates/*.json files and maintain feature parity.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

searchfetch-3.2.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

searchfetch-3.2.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file searchfetch-3.2.1.tar.gz.

File metadata

  • Download URL: searchfetch-3.2.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for searchfetch-3.2.1.tar.gz
Algorithm Hash digest
SHA256 d4588590a55819e8c3475e4fd7499c3ec465be29ea932ad18f3c23b23c8051aa
MD5 dea82cbce7e8577a771492bbcebd9d80
BLAKE2b-256 e8fe234e8eee2efb6f83752858a43d0ad58fdc4bf0a4fadffdfa1328c651dacb

See more details on using hashes here.

Provenance

The following attestation bundles were made for searchfetch-3.2.1.tar.gz:

Publisher: publish.yml on maxylev/searchfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file searchfetch-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: searchfetch-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for searchfetch-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 585cb079b6c7d0e1d3313eb34a67665b996ff378554a2334f1006eeb7c3f18ad
MD5 a12cc4e66dc16e3eff365357c83d61c9
BLAKE2b-256 581a5036b0d5b73cd574470e75c7355c5464706cedc7241e94f75d386ef8898d

See more details on using hashes here.

Provenance

The following attestation bundles were made for searchfetch-3.2.1-py3-none-any.whl:

Publisher: publish.yml on maxylev/searchfetch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page