# 🌐 WebFetch.MCP v0.1.7 **Live Web Access for Your Local AI β€” Tunable Search & Clean Content Extraction** ![License: MIT](https://img.shields.io/badge/License-MIT-green.svg) ![Node.js 18+](https://img.shields.io/badge/Node.js-18+-blue.svg) ![LM Studio Compatible](https://img.shields.io/badge/LM%20Studio-Compatible-purple.svg) ![SearxNG Powered](https://img.shields.io/badge/SearxNG-Powered-orange.svg) # 🚨 The Problem **Local LLMs can't browse the web.** Out of the box, LM Studio β€” and most MCP setups β€” leave your model stuck in **2023 or earlier**. No live data. No current events. Paste a URL into chat and all you get back is: *"I can't access the web."* A few third-party MCP servers exist, but they’re API-locked, incomplete, or a pain to run. That means LM Studio users are flying blind β€” unable to fetch or search live content reliably. # βœ… The Solution β€” WebFetch.MCP **WebFetch.MCP** is a drop-in, self-hosted MCP server that brings your local AI: * πŸ•’ **Fresh, Real-Time Data** β€” Go beyond your model’s training cutoff. * 🌐 **Reliable URL Fetch** β€” Paste a link, get the clean content. * πŸŽ› **Full Search Control** β€” Choose engines, boost sources, filter by type/date/language. * πŸ”“ **API-Free Freedom** β€” No API keys, quotas, or tracking. * 🧠 **AI-Ready Output** β€” Structured, clean, distraction-free text your LLM can actually use. **Privacy Note:** Search requests and web fetches are visible to your ISP and target sites. Use a VPN for enhanced privacy. # πŸ† Why It’s Different | **Feature** | **WebFetch.MCP** | **mrkrsl-web-search** | **mcp-server-fetch-python** | **Crawl4AI** | |:-:|:-:|:-:|:-:|:-:| | Live Web Search | βœ… Yes | βœ… Yes | ❌ No | βœ… Yes | | URL Content Fetch | βœ… Yes | ⚠️ Limited | βœ… Yes | βœ… Yes | | Search Tunability | βœ… Full Control | ❌ API-limited | ❌ Basic | ⚠️ Limited | | 70+ Search Engines | βœ… Yes | ❌ No | ❌ No | ⚠️ Few | | Scientific/Technical Focus | βœ… Configurable | ❌ No | ❌ No | ❌ No | | No API Keys | βœ… Yes | ❌ Required | ❌ Required | βœ… Basic only | | Content Quality | βœ… Mozilla Readability | ⚠️ Basic | ⚠️ Basic | βœ… Advanced | | JS Execution | βœ… Yes (JSDOM) | ❌ No | βœ… Yes | βœ… Yes | | Setup Simplicity | βœ… Easy | ⚠️ Medium | ❌ Complex | ❌ Very Complex | | Cost | βœ… Free | πŸ’° API costs | πŸ’° API costs | βœ… Free | # ✨ Core Features ### 🎯 Precision Search * **70+ configurable engines** β€” Google Scholar, arXiv, PubMed, IEEE, GitHub, Stack Overflow, weather.gov, and more. * **Weighted source control** β€” Boost authoritative and academic sources. * **Data type filters** β€” Papers, docs, code, or news only. * **Freshness filters** β€” Recent publications, latest docs, breaking news. ### πŸ”¬ Scientific & Technical Focus * Academic: arXiv, PubMed, IEEE Xplore, ACM Digital Library. * Technical: MDN, Stack Overflow, GitHub, official docs. * Government: weather.gov, data.gov, NASA, NOAA. ### πŸ“„ Clean Content Extraction * Mozilla Readability β€” industry-standard parsing. * JavaScript execution β€” handles SPAs & dynamic pages. * Removes ads, menus, widgets. * Optimized handling for research papers & technical docs. ### βš™οΈ Complete Control * Enable only trusted engines. * Language & region targeting. * Domain/site restrictions. * Custom weighting per source. # πŸ“‹ Prerequisites * **Node.js 18+** β†’ [Download](https://nodejs.org/) * **Docker & Docker Compose** β†’ [Install](https://docs.docker.com/get-docker/) * **LM Studio** β†’ [Download](https://lmstudio.ai/) # ⚑ Quick Start ### 1️⃣ Install SearxNG (5 min) **Docker Compose (Recommended)** ```bash git clone https://github.com/searxng/searxng-docker.git cd searxng-docker sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml docker compose up -d ``` **Test SearxNG** ```bash curl "http://localhost:8080/search?q=test&format=json" ``` πŸ“– [SearxNG Installation Guide](https://docs.searxng.org/admin/installation-docker.html) ### 2️⃣ Install WebFetch.MCP ```bash git clone https://github.com/manull/webfetch-mcp.git cd webfetch-mcp npm install node server.mjs ``` ### 3️⃣ Connect to LM Studio In **LM Studio β†’ Settings β†’ Developer β†’ MCP Servers**: ```json { "mcpServers": { "webfetch": { "command": "node", "args": ["/full/path/to/webfetch-mcp/server.mjs"], "env": { "SEARXNG_BASE": "http://localhost:8080", "DEBUG": "false" } } } } ``` Restart LM Studio β€” web_search and web_fetch tools will now be available. ### 4️⃣ Test It In LM Studio: ``` πŸ” Search for recent AI research on transformer architectures πŸ“„ Fetch content from https://example.com/article ``` # πŸ”§ Configuration | **Variable** | **Default** | **Description** | |:-:|:-:|:-:| | SEARXNG_BASE | http://localhost:8080 | SearxNG instance URL | | DEBUG | false | Debug logging | | DETAILED_LOG | true | Detailed log output | # πŸ“Š Example Usage **Search** ``` πŸ” Find Python asyncio docs site:python.org πŸ” Search for recent climate data from government sources ``` **Fetch** ``` πŸ“„ Extract content from https://news.example.com/article πŸ“„ Get main text from https://arxiv.org/abs/2305.12345 ``` # πŸ§ͺ Testing ```bash curl "http://localhost:8080/search?format=json&q=test&count=5" DEBUG=true node server.mjs ``` # 🀝 Contributing We welcome: * πŸ› Bug reports β†’ [Open an issue](https://github.com/manull/webfetch-mcp/issues) * πŸ’‘ Feature ideas β†’ [Start a discussion](https://github.com/manull/webfetch-mcp/discussions) * πŸ”§ Code PRs * πŸ“– Documentation improvements # πŸ“„ License MIT β€” see [LICENSE](LICENSE). # πŸ™ Acknowledgments * **[SearxNG](https://docs.searxng.org/)** β€” Privacy-focused metasearch engine. * **[Mozilla Readability](https://github.com/mozilla/readability)** β€” Clean content extraction. * **[LM Studio](https://lmstudio.ai/)** β€” Local AI runtime. * **[Model Context Protocol](https://github.com/modelcontextprotocol)** β€” AI tool integration standard. --- **Built for LM Studio and local LLM users who need real-time, reliable, tunable access to the web.** ⭐ **Star this repo** if you're done with *"I can't access the web"* from your AI.