Webshift logo

Webshift

Rust MCP server for denoised web search — fetch, clean, and rerank web content for AI agents.

Install Webshift

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for webshift, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

Tools3

What Webshift lets your agent do. Expand a tool for its parameters.

Self-reported~53 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

19/23 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars8Stargazers on the source repository.
Last commit6mo agoMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.

From the project 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:

Use caseCrateFeature flagsWhat it does
HTML denoiserwebshiftdefault-features = falseclean() — pure Rust HTML-to-text pipeline. Strips noise elements, sterilizes Unicode/BiDi, collapses whitespace. Zero network, zero config. Drop into any Rust project that processes web content for LLMs.
HTML text rewriterwebshiftfeatures = ["text-map"]extract_text_nodes() + replace_text_nodes() — extract individual text nodes from HTML, manipulate them (translate, rewrite, simplify), and rebuild the HTML with structure intact. Tags, attributes, and links are never touched.
Web content clientwebshiftdefault or features = ["llm"]fetch() + query() — streaming HTTP fetcher with size caps, 8 search backends, BM25 reranking, optional LLM query expansion and summarization. Full pipeline from search query to structured results.
MCP serverwebshift-mcpall featuresNative binary (mcp-webshift) that exposes webshift_query, webshift_fetch, and webshift_onboarding over MCP stdio. Single static binary, zero runtime dependencies.

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-map does 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

Code
Question

  |

  +- (optional) LLM query expansion -> multiple search variants

  |

  +- Search via backend (SearXNG, Brave, Tavily, Exa, SerpAPI, Google, Bing, HTTP)

  |

  +- Deduplicate + filter binary URLs

  |

  +- Streaming fetch with per-page size cap

  |

  +- HTML cleaning -> plain text (noise elements, scripts, nav removed)

  |

  +- Unicode/BiDi sterilization

  |

  +- BM25 deterministic reranking

  |   +- (optional) LLM-assisted tier-2 reranking

  |

  +- Budget-aware truncation across all sources

  |

  +- (optional) LLM Markdown summary with inline citations

  |

  +- Structured JSON output

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)

bash
cargo install webshift-mcp

The binary is called mcp-webshift.

From source

bash
cargo install --path crates/webshift-mcp

As a library

toml
# Full pipeline (search + fetch + clean + rerank)

webshift = "0.2"



# Cleaner + fetcher only (no search backends)

webshift = { version = "0.2", default-features = false }



# Text-map only (extract/replace text nodes in HTML)

webshift = { version = "0.2", default-features = false, features = ["text-map"] }



# Everything including LLM features

webshift = { version = "0.2", features = ["llm"] }

Quick start

1. Set up a search backend

The easiest option is SearXNG — free, self-hosted, no API key:

Terminal
docker run -d -p 8080:8080 searxng/searxng

No Docker? Use a cloud backend — see Search backends.

2. Configure your MCP client

config.json
{

  "mcpServers": {

    "webshift": {

      "command": "mcp-webshift",

      "args": ["--default-backend", "searxng"]

    }

  }

}

That's it. The agent now has webshift_query, webshift_fetch, and webshift_onboarding.

For client-specific setup see docs/integrations/.


MCP tools

ToolDescription
webshift_queryFull search pipeline: search + fetch + clean + rerank + (optional) summarize
webshift_fetchSingle page fetch and clean
webshift_onboardingReturns a JSON guide for the agent (budgets, backends, tips)

webshift_query parameters

ParameterTypeDefaultDescription
queriesstring or listrequiredSearch query or list of queries
num_results_per_queryinteger5Results per query
langstringnoneLanguage filter (e.g. "en")
backendstringconfig defaultOverride search backend

Configuration

Resolution order (highest priority first):

  1. CLI args — --default-backend, --brave-api-key, etc.
  2. Environment variables — WEBSHIFT_* prefix
  3. Config file — webshift.toml (current dir, then ~/webshift.toml)
  4. Built-in defaults

Config file

toml
[server]

max_query_budget    = 32000   # total char budget across all sources

max_result_length   = 8000    # per-page char cap

max_total_results   = 20      # hard cap on results per call

max_download_mb     = 1       # streaming cap per page (MB)

search_timeout      = 8       # seconds

results_per_query   = 5

oversampling_factor = 2

adaptive_budget     = "auto"  # "auto" | "on" | "off" — budget allocation mode



[backends]

default = "searxng"



[backends.searxng]

url = "http://localhost:8080"



[backends.brave]

api_key = "BSA-..."



[backends.tavily]

api_key = "tvly-..."



[backends.exa]

api_key = "..."



[backends.serpapi]

api_key = "..."

engine  = "google"    # google | bing | duckduckgo | yandex



[backends.google]

api_key = "..."

cx      = "..."       # Custom Search Engine ID



[backends.bing]

api_key = "..."

market  = "en-US"



[backends.http]

url           = "https://my-search.example.com/api/search"

query_param   = "q"

count_param   = "limit"

results_path  = "data.items"     # dot-path to results array in JSON response

title_field   = "title"

url_field     = "link"

snippet_field = "description"



[backends.http.headers]

"Authorization" = "Bearer my-token"



[llm]

enabled               = false

base_url              = "http://localhost:11434/v1"   # OpenAI-compatible

api_key               = ""

model                 = "gemma3:27b"

timeout               = 60

expansion_enabled     = true

summarization_enabled = true

llm_rerank_enabled    = false

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

bash
WEBSHIFT_DEFAULT_BACKEND=searxng

WEBSHIFT_SEARXNG_URL=http://localhost:8080

WEBSHIFT_BRAVE_API_KEY=BSA-xxx

WEBSHIFT_GOOGLE_API_KEY=xxx

WEBSHIFT_GOOGLE_CX=xxx

WEBSHIFT_BING_API_KEY=xxx

WEBSHIFT_LLM_ENABLED=true

WEBSHIFT_LLM_BASE_URL=http://localhost:11434/v1

WEBSHIFT_LLM_MODEL=gemma3:27b

Search backends

BackendAuthNotes
SearXNGnoneSelf-hosted, free. Default: http://localhost:8080
BraveAPI keyFree tier. brave.com/search/api
TavilyAPI keyAI-oriented. tavily.com
ExaAPI keyNeural search. exa.ai

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Webshift

webshift is an MCP server that provides denoised web search for AI agents by fetching, cleaning, and reranking web content. It is implemented in Rust and exposes webshift_query, webshift_fetch, and webshift_onboarding over MCP stdio. The server is distributed as a single static binary with zero runtime dependencies.

webshift provides webshift_query for searching and processing web content, webshift_fetch for fetching and cleaning pages, and webshift_onboarding for onboarding. These tools are exposed over MCP stdio.

webshift can search through eight supported backends, deduplicate results, filter binary URLs, stream pages with size caps, clean HTML, and rerank results using BM25. Optional LLM features support query expansion and summarization.

webshift does not execute JavaScript or provide browser automation. It parses static HTML, but does not render CSS, take screenshots, navigate across pages, fill forms, or handle authentication flows.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewWebshift AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/webshift?style=directory)](https://allmcps.com/mcp/webshift)
HTML Embed
<a href="https://allmcps.com/mcp/webshift"><img src="https://allmcps.com/api/badge/webshift?style=directory" alt="Webshift on AllMCPs" /></a>