searchfetch 2.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SearchFetch (MCP Server)
2
2
 
3
- A maximum fault-tolerant, stealth-enabled Model Context Protocol (MCP) server for web searching and content fetching. Built specifically for AI Agents (Cursor, Claude Desktop, OpenHands), it completely bypasses bot detection (Cloudflare Turnstile, Datadome), dynamically handles SPAs/React, and converts bloat into token-optimized Markdown.
3
+ A maximum fault-tolerant, stealth-enabled Model Context Protocol (MCP) server for web searching and content fetching. Built specifically for AI Agents (Cursor, Claude Code, OpenCode), it completely bypasses bot detection (Cloudflare Turnstile, Datadome), dynamically handles SPAs/React, and converts bloat into token-optimized Markdown.
4
4
 
5
5
  ## Features
6
6
  * **Maximum Fault Tolerance:** Implements auto-healing browser sessions, grace-period timeouts for clunky SPAs, and network-level aborting of tracking scripts and media.
@@ -51,34 +51,34 @@ Add it via the **MCP panel** in Cursor settings:
51
51
  ## Available Tools
52
52
 
53
53
  ### 1. `websearch`
54
- Searches the web using DuckDuckGo or Google. Returns a clean list of titles, URLs, and snippets. Excellent for researching general knowledge, news, and finding URLs.
54
+ Searches the web through the v3 template pipeline. DuckDuckGo and Google are built-in templates, and custom search templates can be selected by name.
55
55
 
56
56
  **Parameters:**
57
57
  * **`query`** *(string, required)*: The search query string.
58
- * **`engine`** *(string, optional)*: Search engine to use. Can be `"duckduckgo"` or `"google"`. Default is `"duckduckgo"`.
58
+ * **`engine`** *(string, optional)*: Search engine/template to use. Can be `"duckduckgo"`, `"google"`, or a custom search template name. Default is `"duckduckgo"`.
59
59
  * **`max_results`** *(number, optional)*: Maximum number of results to return. Default is `10`.
60
- * **`region`** *(string, optional)*: Region and language code to localize search results.
60
+ * **`region`** *(string/null, optional)*: Region and language code to localize search results.
61
61
  * Examples: `"us-en"`, `"uk-en"`, `"de-de"`.
62
62
  * For DuckDuckGo, it maps directly.
63
63
  * For Google, it maps to the `gl` (country) and `hl` (language) query parameters automatically.
64
- * Default is `"wt-wt"` (global/US English).
65
- * **`safe_search`** *(string, optional)*: Safe search filtering mode.
66
- * `"-1"` for Moderate.
67
- * `"1"` for Strict.
68
- * `"-2"` for Off.
69
- * Default is `"-1"`.
70
- * *Note: Only applies to DuckDuckGo.*
64
+ * `null` uses the template default.
65
+ * **`safe_search`** *(boolean/null, optional)*: Enable safe search. Maps to DuckDuckGo/Google parameters automatically; `null` uses the template default.
66
+ * **`block_media`** *(boolean, optional)*: Block images, media, and fonts at the network layer. Default is `true`.
71
67
 
72
68
  ### 2. `webfetch`
73
- Fetch and extract the main text content from any webpage. Fully executes JavaScript to load React/SPAs and aggressively strips images/media (including base64) to save context tokens.
69
+ Fetches a page with CloakBrowser and extracts structured Markdown using a named, inline, or auto-detected template. Built-ins include GitHub repositories/issues, npm, PyPI, crates.io, and ReadTheDocs-style docs pages. Unknown pages fall back to generic Markdown extraction.
74
70
 
75
71
  **Parameters:**
76
72
  * **`url`** *(string, required)*: The full URL of the webpage to fetch (must start with http/https).
77
- * **`format`** *(string, optional)*: Output format. Set to `"markdown"`, `"clean_html"`, or `"raw_html"`. Default is `"markdown"` (highly recommended to save context tokens).
73
+ * **`template`** *(string, optional)*: `"auto"`, a built-in template name, or inline JSON template. Default is `"auto"`.
78
74
  * **`start_index`** *(number, optional)*: Character offset to start reading from for pagination. Use this if a document is too large to fit in the context window. Default is `0`.
79
75
  * **`max_length`** *(number, optional)*: Maximum characters to return per request. Default is `10000`.
80
76
  * **`block_media`** *(boolean, optional)*: Block images, videos, and fonts entirely at the network layer to drastically speed up page loads and dodge tracking pixels. Default is `true`.
81
77
 
78
+ Template extraction supports `text`, `markdown`, `attribute`, and `html` sections; nested children; repeated sections; URL decoding transforms; per-template cookies; and per-template resource blocking.
79
+
80
+ Built-in templates live in `templates/*.json` and are shared by the Node.js and Python implementations. Each JSON file defines exactly one template — no duplication between languages.
81
+
82
82
  ---
83
83
 
84
84
  ## Architecture & Contributions