Skip to main content
Glama
webtools MCP Server

webtools MCP Server

webtools

English | 中文


English

Free-quota web search & fetch toolkit for AI agents, built for poisoned-DNS / GFW / CAPTCHA environments. One core, three shells: MCP server (recommended), CLI, and skill docs.

Features

  • Multi-source parallel search: tavily / firecrawl (1000 free credits/month each, used sequentially via a monthly quota ledger — never together) + github (free API)

    • reddit (arctic-shift archive, free)

  • Tiered fetching: API endpoints → curl_cffi (3 rotating TLS fingerprints) → Camoufox real browser (passes Cloudflare) → Firecrawl relay (last resort only)

  • Mod-site search: Nexus (browser through CF) / mod.io / GitHub — domain-scoped, no relay engines

  • Quota ledger: per-month usage tracking; tavily exhausted → auto-switch to firecrawl; resets on the 1st of each month

  • Channel health: transient failures don't kill a channel; quarantined after 3 strikes with exponential backoff

  • Proxy-aware: detects the system proxy (including MITM proxies like Watt Toolkit); accelerated domains go proxy-first, everything else direct-first

  • Zero paid APIs: free-tier channels only; missing keys are skipped silently

Install (AI auto-adapt)

Download this repo, hand the folder to your AI agent and say "install" — AGENTS.md / CLAUDE.md in the repo root guide the agent automatically:

China network note: git clone needs a proxy (e.g. Watt Toolkit) because git bypasses the Windows system proxy: git -c http.proxy=http://127.0.0.1:26561 -c http.sslVerify=false clone <url>

python install.py --detect --json     # detect local clients
python install.py --auto              # write correct MCP config
python install.py --accounts          # remind the user about free API keys
python -m webtools doctor --json      # verify

Note: the installer pins the current Python executable into the MCP config. If you move/recreate the Python environment (or delete the venv), re-run python install.py --auto to refresh the path.

Manual install

pip install -e .                      # or pipx install .
python install.py --client zcode      # or claude-desktop / cursor / claude-code

Optional browser tier (for Cloudflare-protected pages):

pip install -e ".[browser]"
python -m camoufox fetch

Usage

MCP tools (python -m webtools.mcp_server)

Tool

Description

web_search(query, limit?, all?, reddit?, sites?)

Multi-source search (sites = mod-site scoped)

web_research(query, top?, limit?, reddit?)

Search + fetch top pages, return digest

web_fetch(url, browser?)

Tiered page fetch

channel_status()

Provider health ledger

quota_status()

Monthly quota ledger

CLI

webtools search "query" --limit 5
webtools search "skyui" --sites nexus:skyrimspecialedition
webtools research "question" --top 4
webtools fetch "<url>" [--browser] [--no-cache]
webtools visit "<url>" [--act click --text "Sign in"]
webtools status
webtools doctor --json

Configuration

  • Keys: ~/.webtools/keys/{tavily,firecrawl,nexus}.key (one plain-text line each)

  • Or env vars: TAVILY_API_KEY / FIRECRAWL_API_KEY / NEXUS_API_KEY

  • All optional — missing keys simply skip that channel

  • Custom home: WEBTOOLS_HOME=/path/to/dir

Free tiers:

Repository layout

src/webtools/
├─ search.py        # multi-source search + quota ledger + mod-site search
├─ fetch.py         # tiered fetching (tier 0..3)
├─ research.py      # health ledger + search-then-fetch digest
├─ browser/         # Camoufox service (port 9377) + client
├─ mcp_server.py    # MCP stdio server
├─ cli.py           # webtools command line
└─ doctor.py        # environment self-check
adapters/           # per-client config templates
install.py          # client detection & config writer

License

MIT


Related MCP server: mcp-deepseek-search

中文

给 AI agent 用的免费额度网页搜索/抓取工具链,专为被墙 / DNS 污染 / 验证码环境设计。 一套内核,三种形态:MCP 服务器(推荐)、CLI、技能文档。

特性

  • 多源并行搜索:tavily / firecrawl(各 1000/月免费额度,按月度额度账本顺序使用、绝不并行)

    • github(免费 API)+ reddit(arctic-shift 免费存档)

  • 分层抓取:API 直连 → curl_cffi(3 种 TLS 指纹轮换)→ Camoufox 真浏览器(过 Cloudflare) → Firecrawl 中转(仅最后兜底)

  • 模组站内搜索:Nexus(走浏览器过 CF)/ mod.io / GitHub,域名级过滤,不走中转

  • 额度账本:记录每月用量,tavily 耗尽自动切 firecrawl,每月 1 日自动重置

  • 渠道健康:瞬时失败不判死,3 次才隔离,冷却指数退避

  • 代理感知:自动识别系统代理(含 Watt Toolkit 这类 MITM 代理),加速域名代理优先、 其余直连优先;死代理自动跳过

  • 零付费 API:只用免费额度渠道,缺 key 自动跳过

安装(AI 自动适配)

下载本仓库后,把它交给你的 AI agent,说"安装"即可——仓库根目录的 AGENTS.md / CLAUDE.md 会指导 AI 自动执行:

国内网络提示:git clone 需要代理(如 Watt Toolkit),因为 git 不走 Windows 系统代理: git -c http.proxy=http://127.0.0.1:26561 -c http.sslVerify=false clone <url>

python install.py --detect --json     # 探测本机客户端
python install.py --auto              # 自动写入正确的 MCP 配置
python install.py --accounts          # 提醒用户注册免费 API 账号
python -m webtools doctor --json      # 验证

注意:安装器会把当前 Python 解释器的绝对路径写进 MCP 配置。 如果 Python 环境变了(换 venv、重装 Python、删掉 venv),需要重跑 python install.py --auto 刷新路径。

手动安装

pip install -e .                      # 或 pipx install .
python install.py --client zcode      # 或 claude-desktop / cursor / claude-code

可选浏览器能力(抓 Cloudflare 页面):

pip install -e ".[browser]"
python -m camoufox fetch

使用

MCP 工具(python -m webtools.mcp_server)

工具

说明

web_search(query, limit?, all?, reddit?, sites?)

多源搜索(sites 支持模组站内搜索)

web_research(query, top?, limit?, reddit?)

搜索 + 抓取前 N 页,返回摘要

web_fetch(url, browser?)

分层抓取页面正文

channel_status()

渠道健康台账

quota_status()

月度额度账本

命令行

webtools search "查询词" --limit 5
webtools search "skyui" --sites nexus:skyrimspecialedition
webtools research "问题" --top 4
webtools fetch "<url>" [--browser] [--no-cache]
webtools visit "<url>" [--act click --text "登录"]
webtools status
webtools doctor --json

配置

  • 密钥目录:~/.webtools/keys/(tavily.key / firecrawl.key / nexus.key,各一行纯文本)

  • 或环境变量:TAVILY_API_KEY / FIRECRAWL_API_KEY / NEXUS_API_KEY

  • 全部可选,缺哪个就跳过哪个渠道

  • 自定义目录:WEBTOOLS_HOME=/path/to/dir

免费额度申请:

目录结构

src/webtools/
├─ search.py        # 多源搜索 + 额度账本 + 模组站内搜索
├─ fetch.py         # 分层抓取(tier 0..3)
├─ research.py      # 健康台账 + 搜抓一体
├─ browser/         # Camoufox 服务(9377)+ 客户端
├─ mcp_server.py    # MCP stdio 服务器
├─ cli.py           # webtools 命令行
└─ doctor.py        # 环境自检
adapters/           # 各客户端配置模板
install.py          # 客户端探测与配置写入

License

MIT

Available Tools

5 tools
channel_statusB

查看各搜索渠道健康状态与冷却时间。

Inputs: no named parameters.

quota_statusA

查看 tavily/firecrawl 本月额度账本(已用次数、是否耗尽)。

Inputs: no named parameters.

web_fetchB

抓取单个网页正文(Tier0 curl_cffi/API -> Tier2 Camoufox 浏览器 -> Tier3 Firecrawl 中转;browser=true 直接上浏览器)。

Inputs: url, browser.

web_researchB

先搜索再抓取前 N 个页面,返回每页摘要与正文节选(分层抓取:API 直连 -> curl_cffi -> Camoufox -> Firecrawl)。

Inputs: top, limit, query, reddit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation4/5

    web_search, web_research, and web_fetch are mostly distinct: search returns result lists, research chains search plus multi-page fetch, and fetch retrieves one page. The overlap between web_research and combining web_search with web_fetch is minor but could cause occasional misselection.

    Naming Consistency4/5

    All names use consistent snake_case and follow a readable pattern: web_* for retrieval operations and *_status for diagnostics. The slight prefix difference between web_* and channel_status/quota_status is a minor deviation rather than an inconsistency.

    Tool Count5/5

    Five tools are well-scoped for a web retrieval server: three core operations (search, research, fetch) plus two diagnostic status tools. Each tool has a clear reason to exist without bloating the surface.

    Completeness4/5

    The surface covers the main lifecycle of web discovery, retrieval, deeper research, and operational health/quota checks. Minor gaps exist around advanced extraction or batch operations, but core workflows are fully supported.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to run English and Chinese web searches that work without an API key, returning compact multi-source evidence with visible provider failures and bounded request and evidence budgets. Also supports extracting URLs and fetching pages such as GitHub READMEs and Chinese technical articles as clean Markdown.
      162 npm
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Exposes DeepSeek's web search and page-fetch tools to any MCP client, letting any LLM run searches with quality signals like rerank score and source authority, plus advanced query syntax. It also retrieves single pages as Markdown, with built-in throttling, retries, and size-conscious summaries.
      2
      781 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables agents to perform free-first English and Chinese web searches without requiring API keys, returning compact multi-source evidence with provenance, bounded request/evidence budgets, and visible provider failures. It also supports optional paid providers under routing policy, Chinese-source search, and URL extraction.
      162 npm
      Apache 2.0