
Webshift
io.github.x-hannibal由 GitHub 帳號 x-hannibal 發布v0.2.14更新於 Oct 24, 2026
Rust MCP server for denoised web search — fetch, clean, and rerank web content for AI agents.
概覽
一個在本機執行的 Rust MCP 伺服器,可執行網頁搜尋、抓取頁面、去除 HTML 雜訊,並向助理回傳受大小限制的乾淨文字。
- 可以做什麼
- WebShift 透過 stdio 提供三個工具:webshift_query 執行搜尋、抓取、HTML 清理、BM25 重排序以及選用 LLM 摘要的完整流程;webshift_fetch 抓取並清理單一頁面;webshift_onboarding 回傳描述預算、後端與提示的 JSON 指南。它會移除指令碼、廣告、導覽與 Cookie 提示,淨化 Unicode 與 BiDi 字元,並強制每頁與總字元預算。它只解析靜態 HTML,不執行 JavaScript。
- 適用情境
- 當助理需要符合上下文預算的搜尋結果或頁面文字,而非原始 HTML 時適用。它適合希望使用單一靜態二進位檔、不需要 Python 或 Docker 執行環境的代理,以及需要對輸出大小設定硬性上限的流程。它不適用於依賴 JavaScript 的單頁應用程式、視覺呈現或截圖,也不適用於含表單與登入的多頁抓取。
- 執行需求
- 以本機程序執行,使用 cargo install webshift-mcp 安裝(需要 Rust 工具鏈),並以 mcp-webshift 二進位檔啟動。需要搜尋後端:預設為自行託管的 SearXNG,也可使用 Brave、Tavily、Exa、SerpAPI、Google 或 Bing 等雲端後端,透過命令列參數、WEBSHIFT_* 環境變數或 webshift.toml 設定。LLM 功能為選用,需要相容於 OpenAI 的端點。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Webshift,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
WebShift
[Crates.io] [docs.rs] [Latest Release] [Beta] [License]
What is WebShift
WebShift is a Rust library and MCP server that shifts noisy web pages into clean, right-sized text for LLM consumption.
Raw HTML is mostly junk: scripts, ads, navigation menus, cookie banners, tracking pixels. Feeding it directly to an LLM floods the context window with tens of thousands of useless tokens and leaves no room for reasoning. WebShift strips all that noise, sterilizes the text, and enforces strict size budgets so the model receives only the content that matters.
What you get
Depending on the features you enable, WebShift can be four things:
When to use WebShift
- You're building an AI agent that needs web search and you want clean, budget-controlled text — not raw HTML.
- You're processing web pages in a Rust pipeline and need a reliable HTML-to-text cleaner that strips noise without losing real content.
- You need an LLM to translate, rewrite, or simplify text inside HTML without corrupting the markup — text-map gives you a safe round-trip.
- You want an MCP web search server that works as a single binary — no Python, no pip, no venv, no Docker (unless you want it).
- You need hard guarantees on output size: per-page caps, total budget caps, streaming download limits.
When NOT to use WebShift
- You need a headless browser that renders JavaScript-heavy SPAs. WebShift parses static HTML — it doesn't execute JS.
- You need to render or screenshot a page preserving its visual layout.
WebShift processes HTML structure but does not render CSS or compute layout.
(Note:
text-mapdoes preserve the DOM structure for text rewriting use cases.) - You're building a web scraper that needs to navigate across pages, fill forms, or handle authentication flows.
How it works
For a detailed explanation of each pipeline stage, BM25 parameters, adaptive budget allocation, and real compression metrics see Under the Hood. For the full configuration reference (TOML, env vars, CLI args) see Configuration. For ready-to-use examples see Use Cases.
Installation
Binary (MCP server)
The binary is called mcp-webshift.
From source
As a library
Quick start
1. Set up a search backend
The easiest option is SearXNG — free, self-hosted, no API key:
No Docker? Use a cloud backend — see Search backends.
2. Configure your MCP client
That's it. The agent now has webshift_query, webshift_fetch, and webshift_onboarding.
For client-specific setup see docs/integrations/.
MCP tools
webshift_query parameters
Configuration
Resolution order (highest priority first):
- CLI args —
--default-backend,--brave-api-key, etc. - Environment variables —
WEBSHIFT_*prefix - Config file —
webshift.toml(current dir, then~/webshift.toml) - Built-in defaults
Config file
For every setting with all three config methods (TOML, env vars, CLI args)
and plain-language descriptions, see the full Configuration Reference.
Ready-to-use config examples are in Use Cases and examples/.
Key environment variables
Search backends
LLM features (optional)
All opt-in — disabled by default, no data leaves your machine unless enabled.
Cross-language normalization (bonus): when BM25 reranking surfaces pages in foreign languages (e.g. Chinese, Japanese, Arabic), the LLM summarizer still produces the final report in the prompt language. The agent receives clean, readable output regardless of the language mix in the source pages.
Works with any OpenAI-compatible API (OpenAI, Ollama, vLLM, LM Studio, etc.):
Anti-flooding protections
Always active — the core value proposition:
Library usage
Text-map: rewrite HTML content without breaking markup
Extract text nodes, manipulate them (translate, rewrite, simplify), and rebuild the HTML with structure, attributes, and links intact.
Requires features = ["text-map"]. See Use Cases #11 for a full translation example.
Feature flags
Integrations
Beta Status
WebShift is in beta. Core functionality is stable and the server is used daily, but the API surface may still change before 1.0.
Feedback is very welcome. If something doesn't work as expected, behaves oddly, or you have a use case that isn't covered:
Bug reports, configuration questions, and feature requests all help shape the roadmap.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
- Development setup and workflow
- Code style and conventions
- Testing requirements
- Documentation standards
- Pull request process
License
MIT License — see LICENSE for details.
Links
- GitHub Repository — Source code and issues
- Docs.rs — API documentation
- MCP Registry — WebShift on Model Context Protocol Registry
- MCP Protocol — Model Context Protocol specification
Need help? Check the documentation or open an issue on GitHub.
來源:README.md,提交 a51c0a5
工具
0版本歷史
1- v0.2.14最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分