Web search that doesn't wreck your AI's memory.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Web search that doesn't wreck your AI's memory.
mcp-webgate is an MCP server that gives your AI clean, bounded web content β across all major AI clients:
What is mcp-webgate? When your AI uses a standard "fetch URL" tool, it gets the raw HTML of the page β ads, menus, scripts, cookie banners and all. A single news article can dump 200,000 tokens of garbage into the AI's memory, wiping out your entire conversation.
mcp-webgate is a protective filter that sits between your AI and the web:
The result: clean, bounded, useful web content β always.
Searching for "mcp model context protocol" with LLM features on:
13 sources distilled into ~1,450 tokens. A single naive fetch of just one of those pages (e.g. a security blog at 563 KB) would dump ~140,000 tokens of raw HTML into your AI's context. webgate processes all 13 and delivers a clean briefing that fits in a footnote.
This is an intensive case (5 queries Γ 5 results). A typical search with 3β5 results still saves 95%+ of context compared to raw fetching β and your AI gets structured, ranked content instead of a wall of HTML soup.
uvxuvx runs Python tools without installing them permanently. You only need to do this once.
The easiest option is SearXNG β free, no account, runs locally:
No Docker? Use a cloud backend instead (Brave, Tavily, Exa, SerpAPI) β see Backends.
See the Integrations table for your specific client. As a quick example, for Claude Desktop:
Open the config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this:
Restart the client after editing.
The AI will use webgate_query automatically. You're done.
webgate gives your AI three tools:
webgate_fetch β read a single pageUse this when you already know the URL you want. The AI passes the URL and gets back the cleaned text β up to max_query_budget characters (default 32,000).
webgate_query β search + fetch + cleanRuns a full search cycle. Pass one query (or several) and get back cleaned, ranked results.
Multiple queries run in parallel and are merged:
Output without LLM β returns cleaned page content for each result:
Output with LLM summarization β returns a compact Markdown report:
Output when LLM fails β error reason shown, full sources returned as fallback:
snippet_pool contains extra results from the search that were not fetched (search-engine snippet only). The AI can use these to decide if more fetches are worthwhile.
webgate_onboarding β how-to guideReturns a JSON guide explaining how to use webgate effectively. The AI should call this once at the start of a session if in doubt about which tool to use.
Most frontier models follow MCP tool instructions automatically. Smaller or local models sometimes ignore the server-provided guidance and fall back to a built-in fetch tool instead β returning raw HTML that floods the context with noise.
If you notice this happening, add an explicit instruction block to your system prompt:
This works because user system prompt instructions take precedence over MCP server-level guidance, making the constraint explicit at the highest-priority layer the model sees.
Tip: if your client supports named system prompts or prompt templates, save the block above as a reusable preset so you don't have to paste it every time.
This section explains what the key parameters do and when to change them. The defaults work well for most cases β only tweak if you have a specific reason.
webgate measures text in characters (not tokens). A rough conversion for English text:
4 characters β 1 token
| Characters | Approximate tokens |
|---|---|
| 8,000 | ~2,000 |
| 32,000 | ~8,000 |
| 96,000 | ~24,000 |
webgate_fetch budgetWhen you fetch a single URL, the ceiling is max_query_budget (default 32,000 chars). The tool parameter max_chars can request less, but never more than this ceiling.
Why max_query_budget and not max_result_length? Because you're fetching one page β the "total output" IS that one page, so the right limit is the overall context budget, not the per-page cap designed for multi-source queries.
webgate_query budget β without LLMWith no LLM, the cleaned sources go directly to your AI's context. webgate distributes max_query_budget across all fetched pages so the total never exceeds the budget:
Per-page limit =
max_query_budgetΓ· number of results (capped atmax_result_length)
| Results fetched | Per-page limit | Total output |
|---|---|---|
| 1 | 8,000 (cap) | β€ 8,000 |
| 5 | 6,400 | β€ 32,000 |
| 10 | 3,200 | β€ 32,000 |
| 20 | 1,600 | β€ 32,000 |
The total output is always at most max_query_budget, regardless of how many results you request β the per-page share automatically shrinks to compensate.
webgate_query budget β with LLM summarizationWhen a secondary LLM is summarizing, it compresses the content before passing the result to your primary AI. This means it's safe β and beneficial β to give it more raw material to work from.
webgate scales up the input using input_budget_factor (default 3):
LLM input budget =
max_query_budgetΓinput_budget_factorDefault: 32,000 Γ 3 = 96,000 chars
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-webgate-3)<a href="https://allmcps.com/mcp/mcp-webgate-3"><img src="https://allmcps.com/api/badge/mcp-webgate-3?style=directory" alt="MCP Webgate on AllMCPs" /></a>