
Websearch
io.github.SK-DEV-AI由 GitHub 帳號 SK-DEV-AI 發布v1.10.0更新於 Oct 25, 2026
Multi-engine web search, fetch, browser control. 11 tools, keyless lanes.
概覽
多引擎網頁搜尋與擷取伺服器,讓助理搜尋、讀取、爬取、擷取網頁內容,並可驅動瀏覽器操作。
- 可以做什麼
- 跨多個搜尋引擎與新聞、垂直頻道搜尋,可選擇產生附引用的答案並做依據查核
- 擷取單一或多個網址轉為 markdown 或純文字,爬取整個網站、盤點站台頁面、比對頁面是否變更
- 擷取頁面連結、表格與結構化 JSON,並把 PDF 轉為 markdown、JSON 或 HTML
- 驅動真實瀏覽器:無障礙快照、點擊、輸入、執行 JS、持續工作階段、填表送出與翻頁
- 把下載內容存到本機磁碟,並查詢 Wikipedia 與 arXiv 介面
- 執行 doctor 自我檢查,回報哪些通道可用以及如何啟用其餘通道
- 適用情境
- 適合助理需要就開放性問題做網路研究、閱讀文件站或長頁面、擷取表格與連結,或操作需要點擊、登入、填表的頁面時使用。它以有界線、帶標註的工具取代一次性腳本。
- 執行需求
- 本機 Python 程序(需 Python 3.14 以上),可從 PyPI 安裝或從原始碼執行,透過 stdio 提供 MCP。安裝後免金鑰的通道即可使用;選用金鑰 GROQ_API_KEYS、TAVILY_KEYS、NV_KEY、S2_KEY、SE_KEY 可解鎖更多通道。瀏覽器通道需以遠端偵錯方式啟動 Chromium 系列瀏覽器,Google AI Mode 另需已登入的 Google 帳號。選用的本機重排器與 OCR 元件需另行下載。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Websearch,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
websearch MCP Server
mcp-name: io.github.SK-DEV-AI/websearch
Companion agent skills: SK-DEV-AI/skills · npx skills add SK-DEV-AI/skills
Multi-engine web search + fetch MCP server. Parallel fan-out across DuckDuckGo, Bing Web/News RSS, Tavily, Wikipedia, arXiv, Google News RSS, Brave (last resort — rate-limited from some networks), Google AI Mode, and intent-gated vertical lanes (MDN, Stack Exchange, GitHub, HN, Semantic Scholar, OSV vuln, grep.app/Sourcegraph code, GDELT news) — with consensus-merge dedup, a local cross-encoder reranker, and Groq synthesis with grounding checks.
Tools (20)
- doctor — Run this first. Reports which lanes are usable right now and the exact command to enable the rest. Distinguishes "broken" from "needs optional setup". Never prints key values.
- search — Open research questions.
depthdefaults to 3 when a model lane is configured (more independent sources; measured) and 1 otherwise. Depth also sets how many pages are fetched:max(5, depth*2), ceiling 8.synthesizereturns a short, cited answer that never invents: it says which source backs each claim, surfaces disagreement instead of averaging it, and marks itselftruncatedwhen it ran out of budget. - fetch — URL to markdown/text. Direct fetch with auto-fallback to a Chromium CDP browser for blocked/JS pages. PDF/EPUB/DOCX supported. Paginated (
offset). Optionaldistill(see below). For structured JSON useextract. - fetch_many — Fetch several URLs in one call. Dedups, caps concurrency, honours robots.txt, shares the cache, returns per-URL success/status/content plus counts. Use when you have 2+ URLs; use
fetchfor one. - crawl — Breadth-first site crawl with hard caps (per-page cap, depth cap, robots.txt, dedup, concurrency). Returns each page plus a
stop_reasonso you know whether the site was exhausted or a cap stopped it. Use for "read this whole docs site". - extract_links — Every link on a page with anchor text, title and rel. Resolves relative hrefs, drops
javascript:/mailto:, dedups. Use beforecrawlor to find a "next" button. - extract_table — HTML tables to json, csv or markdown, by selector and index. Reports
tables_foundso you can pick one. - download — Save a URL to disk; returns the local path, byte count, sha256 and content type. Writes only inside
dest_dirand refuses path traversal. Markstruncatedif the byte cap stopped the transfer. - diff_page — Has this page changed since it was cached? Returns changed/old_hash/new_hash plus added and removed lines. First call for a URL returns
had_previous: false. - screenshot — ARIA accessibility snapshot (LLM-readable page text and interactive structure).
- browser_action — Drive a real browser page (navigate, click, type, press a key, evaluate JS, read HTML/text, ARIA tree, screenshot). Use when a page needs interaction; for plain reading use
fetch. Passsession_idto reuse a persistent tab. - browser_session — Create, list, inspect or close a persistent browser tab. Without one, every
browser_actioncall gets a fresh tab and closes it, so logins and cookies cannot survive. See below. - form_fill_submit — Fill many fields, submit, and read the result in one call. Verifies each element exists, reads back each typed value, and refuses to submit if a value did not stick. Reports
effect(navigated/content_changed/none) so a submit that silently did nothing is visible rather than assumed. - paginate — Click a "next" control, collecting a value per page, up to a cap. Stops honestly when the control is missing or has no effect, and reports
stop_reason. - wikipedia — Full Wikipedia API client: articles, summaries, categories, links, pageviews, revisions, backlinks, geosearch, recent changes, random pages.
- arxiv — arXiv paper search with boolean/phrase/wildcard query syntax (single-source; multi-source paper search lives in codesearch
papers). - extract — Structured JSON from a page via CSS (fast, free), LLM, or regex strategies. Repeat calls cached.
- pdf_extract — PDF to markdown/json/html. PyMuPDF fast path for text-layer PDFs, Docling+OCR fallback for scanned PDFs.
- map_site — Survey a site's pages via sitemap XML (primary) + HTML link fallback, before fetching individually.
- ping — Connectivity check for the internet and key search endpoints. Use before expensive calls when uncertain.
What replaced the throwaway scripts
Every one of these exists because an agent otherwise writes a one-off script:
Persistent browser sessions
browser_action opens one fresh tab per call and closes it afterwards. That is
right for a single read, but it makes any interactive workflow impossible: no
login, no cookies, no scroll position, no multi-step flow across calls.
A session is a named, long-lived tab:
Sessions are opt-in: without session_id, behaviour is exactly as before. They
are capped at 8 with least-recently-used eviction, tabs are always closed
(including on eviction), and metadata is mirrored to
~/.cache/websearch/sessions.json so list can explain what survived a
restart. Sessions need a browser, so they are local-only.
In-tool distillation (optional, off by default)
A fetched page can be 50k characters. The calling model pays for all of it even
when it needed one fact. fetch(distill=true) runs a small model inside the
tool first and returns a compressed result:
The result never pretends to be the page:
Below the size threshold (default 4000 chars) distillation is skipped and the
raw text is returned, because a summary would cost more than it saves. On any
failure the raw text is returned with distill_skipped explaining why - a
broken summary is never returned in place of the page.
The synthesis prompt (the answer you actually read)
search does not just rank results; it writes the answer. That answer is
generated from the retrieved text alone, under rules that exist to stop the
three failure modes of a search summary:
Concision is structural, not a wish: a sentence ceiling, an answer-first rule, and a named ban on filler phrasing ("it is important to note", "overall", ...).
Everything is verifiable rather than claimed:
- the result carries
prompt_version, so a quality change can be tied to a revision instead of guessed at temperatureis 0, so the same sources give the same textfinish_reasonandtruncatedare returned; a half sentence is labelled instead of looking like a complete thoughtdiversityreports the source mix and whether the per-domain cap had to relaxas_ofreports the newest publication date among the sources, and undated sources are labelled "Published: not stated", so freshness is never impliedduplicates_removedcounts syndicated copies collapsed before synthesis, andfigures_unverifiedlists numbers the answer contains that appear in no cited source (deterministic, no model call)unusable_sourcesnames the results that could not become evidence - a 404, an error page, or a page with under 400 chars of text - with the reason, andunreadable_sourcescounts the ones with no text at all- multi-hop: when the first answer admits a weakness (single source, a claim
it could not tie to a source, or a stated gap), one extra round runs on the
subquery that targets the gap. The response records
follow_upsand markssynthesis.round = 2. Bounded: once per call, only under a 75s budget, andfollow_up=falsedisables it - a second model pass (
grounded) re-reads the answer against the exact text the first pass saw and flags sentences no cited source supports. It is markedadvisorybecause it is another model's opinion, not a proof
Tool annotations
All 20 tools carry MCP annotations (readOnlyHint, destructiveHint,
idempotentHint, openWorldHint) so a client can tell a read from an action:
search and fetch are read-only, download writes a local file without being
destructive, browser_session changes local browser state only, and
browser_action / form_fill_submit are marked destructive because a click or a
form submit can have an effect that cannot be undone from here.
When a call takes too long (deadline, admission, partials)
MCP clients cut a tool call at their own timeout (jcode: 300 s) and report a
bare Request timeout after 300s with no payload. Measured over one day on a
single busy server: 314 calls, median 2.7 s, p90 123 s, max 225 s, and 33 hard
client timeouts — the tail is the problem, not the median. So the server bounds
its own work instead of hoping the client waits:
Three response shapes exist because of this, and each is deliberate:
partial— the stages that finished are still returned, because a cited source list is worth more than an empty retry.searchpublishes its snapshot as soon as ranking is done.deadline_exceeded— the call was cut by us, not by the client, and it says which knob to raise. Narrow the request (depth,count,synthesize=false) before raising the deadline: the deadline protects the server, it does not make the work cheaper.busy+retryable— admission was full forWEBSEARCH_QUEUE_WAIT. Retrying shortly is correct; queueing behind an unbounded swarm is what turns one slow call into many timed-out ones.
Reranking degrades honestly rather than failing: search returns a reranker
field only when ranking was not the requested path (worker unavailable, timeout,
cooldown, bad reply), plus the ordering that was used instead. On this box the
reranker's own p90 was 56 s, so a 60 s timeout trades ~10 % of reranked calls
for never stalling a swarm call for the full timeout.
The worker is one socket serving one request at a time, so a burst queues: with
8 calls in flight the last one waits for seven completions. Measured on 12 lanes
that queue alone pushed a search to 253 s, which is why the wait for the worker
is now capped (WEBSEARCH_RERANK_QUEUE_WAIT, 15 s). A call that cannot get the
worker in time answers with base order and says so, instead of turning a 4 s
ranking step into a 4-minute search.
OCR (scanned PDFs) runs on a dedicated single-slot pool with a cached converter
and a memory guard, and reports ocr_ms. asyncio.wait_for cannot cancel a
thread, so a per-call to_thread build kept loading docling models after the
request was abandoned; one cached converter plus one slot removes both the
model reload and the pile-up.
Why the answer is prose, not JSON
The tool envelope is already structured: answer, sources[], citations_used,
grounded, diversity, as_of. Asking the model to also emit JSON moves
structure from a place where it is generated deterministically into a place where
it is asserted, and measured behaviour is worse: a required key_facts array
gets padded with restatements of a single fact, which reads as corroboration.
JSON parsed 3/3 in testing, so this is not a reliability argument - it is a
content-quality and duplication argument. See exec/websearch-format-test/.
Which model writes the answer
The in-tool model comes first by default, because it is free at the point of use. Groq is the fallback if it fails. Both are plain OpenAI-compatible chat endpoints, so one call path serves both.
doctor() reports all of these resolved (env.defaults) plus the active prompt
versions (env.prompts), and lists synthesis as its own lane, so "why is there
no answer?" has an answer instead of a blank field.
What a search costs in model calls
Search is not a model-free operation, and pretending otherwise made it
unpredictable. Every call that needs a model goes through llm.py, and every
response says where the tokens went:
Two consequences worth knowing:
- One endpoint preference, everywhere. Before this was unified, synthesis
used the free in-tool model while rewrite/classify/decompose called Groq
directly and returned nothing without a Groq key. The result was a
model-written answer produced from an unplanned, literal query. Now the
in-tool model plans the search too, and Groq is only the fallback
(
WEBSEARCH_SYNTH_PROVIDER). - Small budgets are a trap. A reasoning model spends tokens on
reasoning_contentbefore it emitscontent, so a 64-token "output one label" request returns 200 with an empty message. Callers saw their fallback value and it looked like a real classification. Every request now gets at leastWEBSEARCH_MIN_MODEL_TOKENS(512), and an unfilled request is reported and logged instead of being mistaken for an answer.
What works out of the box, and what is optional
Everything keyless works immediately after pip install. No API keys, no browser, no GPU: search (DuckDuckGo, Bing RSS, Wikipedia, arXiv, Stack Exchange, GitHub, HN, grep.app, Google News RSS), fetch, map_site, pdf_extract, screenshot.
Four lanes need optional setup. Run doctor() and it tells you which are live and prints the exact command for the rest:
Enabling the browser lanes:
Then open google.com in that window and sign in once (needed only for Google AI Mode). Point elsewhere with WEBSEARCH_CDP_URL=http://host:port.
The browser lanes are local-only by design. On a server the HTTP lanes are unaffected, so the server is still fully useful — it just cannot query Google AI Mode. Without a browser, google_ai_only=True returns a structured error naming the cause and the fix, never an empty result set.
Setup
Requires Python 3.14+.
Point your MCP client at run (stdio):
API keys (run)
Everything else (DDG, Bing RSS, Wikipedia, arXiv, RSS) is keyless. Brave's HTML scrape is currently rate-limited from some networks, so Bing RSS is the primary general-web door and Brave is a last resort.
Install from PyPI
The websearch-mcp console script speaks MCP over stdio:
Docker
Keys are passed at run time, never baked in: -e GROQ_API_KEYS=....
Heavy extras: docker build --build-arg EXTRAS="[all]" -t websearch-mcp .
Notes
- Reranker (optional, local): ranking uses a local
gte-reranker-modernbert-basecross-encoder over a Unix socket (RERANKER_MODELoverrides the model). Not bundled with the pip package — setRERANKER_WORKER=/path/to/worker.pyto use one. Without it, ranking falls back to blended relevance scores; everything still works.doctor()reports whichever is in effect. - CDP browser (optional): bot-walled pages escalate to a Chrome DevTools endpoint (
WEBSEARCH_CDP_URL, default127.0.0.1:9222) when available; without it those pages return a terminal verdict instead of hanging. - Caching: fetch results cache for 1h (
cache_ttl=0forces fresh). No database, no state beyond the cache dir. - Safety: all user-URL fetches are SSRF-validated (private-IP blocking + redirect-hop revalidation + robots.txt gate).
- One model call path (
llm.py): synthesis, verification, query rewrite, intent classification, subquery decomposition and query expansion all go throughllm.chat, so the endpoint preference, retry policy, budget escalation and counting are the same everywhere. On Groq, synthesis + grounding + extract-llm useopenai/gpt-oss-120band rewrite/classify/expand/decompose useopenai/gpt-oss-20b(the previousllama-3.1-8b-instantwas retired by Groq and now 404s); constantsGROQ_SMART_MODEL/GROQ_CHEAP_MODELin config.py. - Model calls are reported, not hidden: every
searchreturnsmodel_calls, e.g.{"rewrite":1,"classify":1,"decompose":1,"synthesis":1,"verify":1}. Search is not free of model use: it plans the query, writes the answer and verifies the answer.synthesize=falseremoves the last two,query_expand=falseand depth 1 remove decomposition. - Keyless lanes (all advisory-only): OSV.dev vuln vertical + NVD CVE enrichment; grep.app MCP code search (Sourcegraph backup); Bing Web RSS + Bing News RSS (Brave's scrape is rate-limited, GDELT 429s from some networks); Wikipedia vertical; Jina Reader pre-CDP tier; Wayback CDX-history recovery in enrich(); Common Crawl domain-survey assist in map_site.
- Local reranker: a
gte-reranker-modernbert-basecross-encoder runs as one shared worker over a Unix socket; either server spawns it on demand and it unloads when idle. Optional — without it results are engine-ranked only. - Optional keys (graceful keyless fallback):
SE_KEY/STACKEXCHANGE_KEY(10k/day SE),S2_KEY/S2_API_KEY(dedicated S2 1 RPS). - Marginalia: best-effort lane only (shared public key pool, 503s under load); independent-index recall, no dedicated key wired ([email protected] for one).
來源:README.md,提交 717ed78
工具
0版本歷史
4- v1.10.0最新Oct 25, 2026
- v1.0.3Oct 25, 2026
- v1.0.2Oct 24, 2026
- v1.0.1Oct 23, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分