$git clone https://github.com/mrkrsl/web-search-mcpA TypeScript MCP (Model Context Protocol) server that provides comprehensive web search capabilities using direct connections (no API keys required) with multiple tools for different use cases.
| 1 | # Web Search MCP Server for use with Local LLMs |
| 2 | |
| 3 | A TypeScript MCP (Model Context Protocol) server that provides comprehensive web search capabilities using direct connections (no API keys required) with multiple tools for different use cases. |
| 4 | |
| 5 | ## Features |
| 6 | |
| 7 | - **Multi-Engine Web Search**: Prioritises Bing > Brave > DuckDuckGo for optimal reliability and performance |
| 8 | - **Full Page Content Extraction**: Fetches and extracts complete page content from search results |
| 9 | - **Multiple Search Tools**: Three specialised tools for different use cases |
| 10 | - **Smart Request Strategy**: Switches between playwright browesrs and fast axios requests to ensure results are returned |
| 11 | - **Concurrent Processing**: Extracts content from multiple pages simultaneously |
| 12 | |
| 13 | ## How It Works |
| 14 | |
| 15 | The server provides three specialised tools for different web search needs: |
| 16 | |
| 17 | ### 1. `full-web-search` (Main Tool) |
| 18 | When a comprehensive search is requested, the server uses an **optimised search strategy**: |
| 19 | 1. **Browser-based Bing Search** - Primary method using dedicated Chromium instance |
| 20 | 2. **Browser-based Brave Search** - Secondary option using dedicated Firefox instance |
| 21 | 3. **Axios DuckDuckGo Search** - Final fallback using traditional HTTP |
| 22 | 4. **Dedicated browser isolation**: Each search engine gets its own browser instance with automatic cleanup |
| 23 | 5. **Content extraction**: Tries axios first, then falls back to browser with human behavior simulation |
| 24 | 6. **Concurrent processing**: Extracts content from multiple pages simultaneously with timeout protection |
| 25 | 7. **HTTP/2 error recovery**: Automatically falls back to HTTP/1.1 when protocol errors occur |
| 26 | |
| 27 | ### 2. `get-web-search-summaries` (Lightweight Alternative) |
| 28 | For quick search results without full content extraction: |
| 29 | 1. Performs the same optimised multi-engine search as `full-web-search` |
| 30 | 2. Returns only the search result snippets/descriptions |
| 31 | 3. Does not follow links to extract full page content |
| 32 | |
| 33 | ### 3. `get-single-web-page-content` (Utility Tool) |
| 34 | For extracting content from a specific webpage: |
| 35 | 1. Takes a single URL as input |
| 36 | 2. Follows the URL and extracts the main page content |
| 37 | 3. Removes navigation, ads, and other non-content elements |
| 38 | |
| 39 | ## Compatibility |
| 40 | |
| 41 | This MCP server has been developed and tested with **LM Studio** and **LibreChat**. It has not been tested with other MCP clients. |
| 42 | |
| 43 | ### Model Compatibility |
| 44 | **Important:** Prioritise using more recent models designated for tool use. |
| 45 | |
| 46 | Older models (even those with tool use specified) may not work or may work erratically. This seems to be the case with Llama and Deepseek. Qwen3 and Gemma 3 currently have the best restults. |
| 47 | |
| 48 | - ✅ Works well with: **Qwen3** |
| 49 | - ✅ Works well with: **Gemma 3** |
| 50 | - ✅ Works with: **Llama 3.2** |
| 51 | - ✅ Works with: Recent **Llama 3.1** (e.g 3.1 swallow-8B) |
| 52 | - ✅ Works with: Recent **Deepseek R1** (e.g 0528 works) |
| 53 | - ⚠️ May have issues with: Some versions of **Llama** and **Deepseek R1** |
| 54 | - ❌ May not work with: Older versions of **Llama** and **Deepseek R1** |
| 55 | |
| 56 | ## Installation (Recommended) |
| 57 | |
| 58 | **Requirements:** |
| 59 | - Node.js 18.0.0 or higher |
| 60 | - npm 8.0.0 or higher |
| 61 | |
| 62 | 1. Download the latest release zip file from the [Releases page](https://github.com/mrkrsl/web-search-mcp/releases) |
| 63 | 2. Extract the zip file to a location on your system (e.g., `~/mcp-servers/web-search-mcp/`) |
| 64 | 3. **Open a terminal in the extracted folder and run:** |
| 65 | ```bash |
| 66 | npm install |
| 67 | npx playwright install |
| 68 | npm run build |
| 69 | ``` |
| 70 | This will create a `node_modules` folder with all required dependencies, install Playwright browsers, and build the project. |
| 71 | |
| 72 | **Note:** You must run `npm install` in the root of the extracted folder (not in `dist/`). |
| 73 | 4. Configure your `mcp.json` to point to the extracted `dist/index.js` file: |
| 74 | |
| 75 | ```json |
| 76 | { |
| 77 | "mcpServers": { |
| 78 | "web-search": { |
| 79 | "command": "node", |
| 80 | "args": ["/path/to/extracted/web-search-mcp/dist/index.js"] |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | ``` |
| 85 | **Example paths:** |
| 86 | - macOS/Linux: `~/mcp-servers/web-search-mcp/dist/index.js` |
| 87 | - Windows: `C:\\mcp-servers\\web-search-mcp\\dist\\index.j |