
Webshift
io.github.annibale-x由 GitHub 账号 annibale-x 发布v0.2.8更新于 Oct 24, 2026
Rust MCP server for denoised web search — fetch, clean, and rerank web content for AI agents.
概览
WebShift 是一个本地 MCP 服务器,可执行网页搜索、抓取页面、去除 HTML 噪声,并返回受大小预算限制的干净文本供 LLM 使用。
- 可以做什么
- 它通过 stdio 暴露三个工具:webshift_query 执行搜索、抓取、清洗、BM25 重排序以及可选 LLM 摘要的完整流程;webshift_fetch 抓取并清洗单个页面;webshift_onboarding 返回描述预算、后端和提示的 JSON 指南。它支持八种搜索后端,包括自托管的 SearXNG 以及需要密钥的 Brave、Tavily、Exa、SerpAPI、Google、Bing 和通用 HTTP 后端。输出受单页、单次调用和总字符预算限制,二进制 URL 会在发起请求前被过滤。
- 适用场景
- 当智能体需要以干净、受预算控制的文本而非原始 HTML 获取网页搜索结果时,或希望使用无需 Python、pip、venv 或 Docker 的单一静态二进制文件时,适合使用。它不适用于 JavaScript 渲染的单页应用、页面视觉渲染或截图,以及需要表单和身份验证的多页抓取。
- 运行要求
- 通过 cargo install webshift-mcp 安装的本地进程,生成 mcp-webshift 二进制文件。必须配置搜索后端:SearXNG 需要运行中的实例,而 Brave、Tavily、Exa、SerpAPI、Google 和 Bing 需要 API 密钥,可通过命令行参数、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.8最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分