web_search
Search the web (Brave Search API, or the opt-in DuckDuckGo scraper). Returns an array of results with title, URL, and snippet. Returns an error naming the env var to set if no search provider is configured.
query必填domainmaxResults
io.github.Opafex由 GitHub 帳號 Opafex 發布v0.1.0更新於 Oct 26, 2026
Web search (Brave) and SSRF-safe page fetching, extraction and comparison for agents
本機 MCP 伺服器,讓助理搜尋網頁、把頁面抓取為純文字、擷取指定欄位並比較多個頁面,抓取過程具 SSRF 防護。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
MCP server for web research — search the web, fetch pages as clean text, pull named sections out of a page, compare pages side by side, and run a two-stage "search then read the top results" pass.
No LLM is involved: research_topic and compare_pages organise extracted text, they do not generate it. Every page fetch is SSRF-checked, including every redirect hop.
Search uses the Brave Search API (free tier available). Without a key, the four page tools still work and the two search tools return an error telling you which variable to set.
Requires Node.js 20+. No other dependencies to install.
Or add it to .mcp.json in your project root:
Add the same block to claude_desktop_config.json (Settings → Developer → Edit Config):
Omit BRAVE_SEARCH_API_KEY to run with the page tools only.
web_searchResult URLs that fail the SSRF check (below) are dropped before they are returned.
fetch_webpageScripts, styles, <nav> and <footer> are removed. finalUrl is included when the page was reached through redirects.
research_topicKey points are the sentences that mention the topic's words, up to five per source. A source that cannot be fetched falls back to its search snippet.
extract_structured_dataFor each field, returns the first line mentioning it and the ten lines after, up to 1,000 characters — or No "<field>" section found on page. This is heading matching, not a schema extractor.
compare_pagesA page that fails to fetch is listed with "(fetch failed)" and the reason; the others are still compared.
About the DuckDuckGo option. It parses the results page at html.duckduckgo.com. That is not an API: it breaks whenever DuckDuckGo changes its markup, it may be rate-limited or blocked, and DuckDuckGo's terms do not permit automated querying. It sends this server's honest user agent rather than pretending to be a browser, which makes blocking more likely. It is kept for personal experimentation; if you turn it on, you are responsible for complying with DuckDuckGo's terms. Use Brave for anything you depend on.
The page tools fetch URLs chosen by a model, from the machine the server runs on. Without protection, that machine's private network and cloud metadata service are one tool call away (server-side request forgery). Every fetch is checked first, and refused if:
http or https;localhost, *.localhost, or a cloud metadata name (metadata.google.internal);http://2130706433/, http://0x7f.1/) are normalised before the check;Blocked ranges:
Redirects are followed by hand, and every hop is checked again — at most 5 hops. A public page that redirects to http://169.254.169.254/ is refused before the second request is made. Search result URLs are checked too, and dropped if they fail.
Known limit — DNS rebinding. The check resolves the hostname, then fetch resolves it again to connect. A hostile DNS server with a very short TTL could answer the two lookups differently. Closing that gap means pinning the connection to the checked address, which Node's built-in fetch does not expose without an extra dependency. If this server runs somewhere with sensitive internal services, also limit what it can reach at the network level (container network policy, egress firewall).
text/*, application/xhtml+xml or application/json; PDFs, images and other binary types are refused.research_topic key points and extract_structured_data sections are keyword matching, not understanding.Found a bug or have a feature request? Open an issue.
Pull requests welcome — see the main repo for development setup.
MIT — see LICENSE.
來源:packages/web-research/README.md,提交 f85607b
Search the web (Brave Search API, or the opt-in DuckDuckGo scraper). Returns an array of results with title, URL, and snippet. Returns an error naming the env var to set if no search provider is configured.
query必填domainmaxResultsFetch a URL and extract clean text content. Includes SSRF protection (blocks private IPs, localhost, cloud metadata). Supports extracting text, links, or both.
url必填maxLengthextractModeTwo-stage interpreted search: searches the web for a topic, fetches top results, and compiles a structured summary organized by source. No LLM involved — extracts key sentences and organizes them. Needs a search provider, like web_search.
depthtopic必填maxSourcesExtract specific data fields from a webpage. Fetches the page and searches for sections matching the requested field names (e.g. "pricing", "features", "contact").
url必填fields必填Fetch multiple URLs and compare their content. Returns page metadata and a text comparison, optionally focused on a specific aspect.
urls必填focusReturns server metadata: name, version, registered tools, and registered resources. Useful for introspection and health checks.
無需輸入參數。
已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
npx -y @opafex/mcp-web-researchclaude mcp add web-research -e BRAVE_SEARCH_API_KEY=your-key -- npx -y @opafex/mcp-web-research{ "mcpServers": { "web-research": { "command": "npx", "args": ["-y", "@opafex/mcp-web-research"], "env": { "BRAVE_SEARCH_API_KEY": "your-key" } } }}{ "mcpServers": { "web-research": { "command": "npx", "args": ["-y", "@opafex/mcp-web-research"], "env": { "BRAVE_SEARCH_API_KEY": "your-key" } } }}[ { "title": "Model Context Protocol", "url": "https://modelcontextprotocol.io/", "snippet": "An open protocol that enables seamless integration between LLM applications and external data sources and tools." }]{ "title": "Example Domain", "text": "Example Domain\nThis domain is for use in illustrative examples in documents.", "url": "http://example.com/", "fetchedAt": "2026-10-24T12:00:00.000Z"}npm run build # Compile TypeScriptnpm run dev # Run with tsx (no build needed)npm test # Run tests (no network — fetch and DNS are faked)npm start # Run compiled server