# webfetch [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/firish/webfetch  
**GitHub Stars:** 61  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/webfetch

## Description
Self-hosted web search for LLM agents: search -> fetch -> rank pipeline with semantic caching

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "webfetch": {
    "command": "uvx",
    "args": ["--from","webfetch-llm@latest","webfetch-mcp"]
  }
}
```

## Documentation

## What the webfetch MCP server does

The webfetch MCP server gives an MCP client a self-hosted web search workflow rather than relying on a hosted search feature. Its main search tool combines results from DuckDuckGo, Brave, Serper, and Tavily when their credentials are available. DuckDuckGo can operate without a key, so a basic installation can search without provider fees.

After finding candidate pages, the pipeline fetches and extracts their content locally. It supports ordinary HTML extraction and can use Playwright for JavaScript-heavy pages or some access barriers. Retrieved text is divided into chunks, ranked with lexical and embedding-based methods when the full dependency set is installed, and compressed to sentences relevant to the query.

The webfetch MCP server also stores page text and ranked query results in SQLite. Exact queries use an exact cache, while paraphrased queries can use semantic matching with additional verification. Cache lifetimes vary according to the query's expected volatility, and results include cache provenance. A caller can request fresh data when cached content is unsuitable.

## How it works

The default provider mode fuses available search engines with reciprocal-rank fusion. Alternative modes can use a fallback arrangement or one named engine. Search results are then fetched and processed locally before being returned to the model. The `full_results` option disables the normal compressed presentation when broader excerpts are needed for list or ranking tasks.

A separate URL-fetch operation retrieves one cited page in full and can reuse content already fetched by the pipeline. The server can also record model-supplied findings through `save_finding`; those entries are labeled unverified and follow the normal cache-expiration rules. Usage data is retained in the cache database for session and lifetime reporting.

## Setup and configuration

Install the package with `pip install webfetch-llm`. The complete installation is available with `pip install "webfetch-llm[all]"`; the extra dependencies add semantic ranking, Playwright rendering, PDF handling, and table extraction. The slim package runs with reduced functionality, including BM25 ranking, exact-only caching, and lexical compression.

An MCP client can launch the server through the `webfetch-mcp` console command. For Claude, the documented launcher uses `uvx --from webfetch-llm@latest webfetch-mcp`, or an existing installation can be registered directly. A `.env` file is read by the console scripts and server from their working directory, while exported variables and client command-line settings take precedence.

`BRAVE_API_KEY`, `SERPER_API_KEY`, and `TAVILY_API_KEY` add their respective engines. `WEBFETCH_PROVIDER` selects multi-engine fusion, fallback mode, or a single engine. `WEBFETCH_CACHE_DB` changes the SQLite cache location; the default is `~/.webfetch/cache.db`.

## Tools and capabilities

The available MCP operations include:

- `web_search` for searching, fetching, ranking, and compressed result delivery.
- `fetch_url` for retrieving one page in full.
- `status` for checking configured providers and optional components without displaying key values.
- `savings_report` for session and lifetime usage counters.
- `save_finding` for storing model-contributed information as explicitly unverified content.

Search calls can use `freshness` hints to influence cache lifetime, `force_fresh` to bypass cached data, and `full_results` to request uncompressed excerpts.

## Limitations and notes

Additional API keys are optional, but recall and provider coverage depend on which engines are configured. The full semantic pipeline requires heavier dependencies and may take longer to install; PDF extraction is an optional component. JavaScript rendering also depends on Playwright being installed.

The webfetch MCP server is local software, so its cache and processing run in the environment where the MCP process starts. Library imports do not load `.env` automatically. Cached model findings are marked unverified, and deployments that do not want them stored can disable the save-finding feature.

_Full upstream README: https://allmcps.com/mcp/webfetch/readme_

