
Webshift
io.github.x-hannibalPublished by GitHub account x-hannibalv0.2.14Updated Oct 24, 2026
Rust MCP server for denoised web search — fetch, clean, and rerank web content for AI agents.
Overview
A local Rust MCP server that runs web searches, fetches pages, strips HTML noise, and returns size-capped clean text for an assistant.
- What you can do
- WebShift exposes three tools over stdio: webshift_query runs a full pipeline of search, fetch, HTML cleaning, BM25 reranking and optional LLM summarization; webshift_fetch fetches and cleans a single page; webshift_onboarding returns a JSON guide describing budgets, backends and tips. It strips scripts, ads, navigation and cookie banners, sterilizes Unicode and BiDi characters, and enforces per-page and total character budgets. It parses static HTML only and does not execute JavaScript.
- When to use it
- Use it when an assistant needs web search results or page text that fits a context budget instead of raw HTML. It suits agents that want a single static binary with no Python or Docker runtime, and pipelines that need hard caps on output size. It is not for JavaScript-heavy single-page apps, visual rendering or screenshots, or multi-page scraping with forms and logins.
- Requirements
- Runs as a local process, installed with cargo install webshift-mcp (Rust toolchain) and started as the mcp-webshift binary. A search backend is needed: self-hosted SearXNG by default, or a cloud backend such as Brave, Tavily, Exa, SerpAPI, Google or Bing, configured via CLI args, WEBSHIFT_* environment variables or webshift.toml. LLM features are opt-in and need an OpenAI-compatible endpoint.
Installation
In SourceWeft
- Open Webshift in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit a51c0a5
Tools
0Version history
1- v0.2.14LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts