
一个简单的本地托管 Web Search MCP 服务器,用于本地大型语言模型(LLM)
概览
一款 TypeScript MCP(模型上下文协议)服务器,提供全面的网页搜索功能,采用直接连接(无需 API 密钥),并支持多种工具以适应不同用例。 - : 优先考虑必应>Brave > DuckDuckGo,以实现最佳可靠性和性能 - : 从搜索结果中获取并提取完整页面内容 - : 三种针对不同用例的专用工具 - : 在剧作家布劳斯和快速公理请求之间切换以确保结果返回 - : 同时从多个页面提取内容 服务器为不同的网页搜索需求提供了三种专用工具: 当请求全面搜索时,服务器使用:1。- 主要方法使用专用Chromium实例2.- 次要选项使用专用Firefox实例3.- 最终备援使用传统HTTP 4.: 每个搜索引擎拥有自己的浏览器实例,自动清理5.
概述(AI 翻译)
一款 TypeScript MCP(模型上下文协议)服务器,提供全面的网页搜索功能,采用直接连接(无需 API 密钥),并支持多种工具以适应不同用例。
特色
- 多引擎网页搜索:优先考虑必应>Brave > DuckDuckGo,以实现最佳的可靠性和性能
- 全页内容提取:从搜索结果中提取并提取完整页面内容
- 多重搜索工具:针对不同用例的三种专用工具
- 智能请求策略:在剧作家布劳斯和快速公理请求之间切换,确保结果返回
- 并发处理:同时从多个页面提取内容
工作原理
服务器为不同的网页搜索需求提供了三种专用工具:
1.full-web-search(主工具)
当请求全面搜索时,服务器会采用优化搜索策略:
- 基于浏览器的必应搜索 - 主要使用专用Chromium实例的方法
- 基于浏览器的Brave Search - 使用专用Firefox实例的次要选项
- Axios DuckDuckGo 搜索 - 使用传统 HTTP 的最终备份
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Web Search MCP Server for use with Local LLMs
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.
Features
- Multi-Engine Web Search: Prioritises Bing > Brave > DuckDuckGo for optimal reliability and performance
- Full Page Content Extraction: Fetches and extracts complete page content from search results
- Multiple Search Tools: Three specialised tools for different use cases
- Smart Request Strategy: Switches between playwright browesrs and fast axios requests to ensure results are returned
- Concurrent Processing: Extracts content from multiple pages simultaneously
How It Works
The server provides three specialised tools for different web search needs:
1. full-web-search (Main Tool)
When a comprehensive search is requested, the server uses an optimised search strategy:
- Browser-based Bing Search - Primary method using dedicated Chromium instance
- Browser-based Brave Search - Secondary option using dedicated Firefox instance
- Axios DuckDuckGo Search - Final fallback using traditional HTTP
- Dedicated browser isolation: Each search engine gets its own browser instance with automatic cleanup
- Content extraction: Tries axios first, then falls back to browser with human behavior simulation
- Concurrent processing: Extracts content from multiple pages simultaneously with timeout protection
- HTTP/2 error recovery: Automatically falls back to HTTP/1.1 when protocol errors occur
2. get-web-search-summaries (Lightweight Alternative)
For quick search results without full content extraction:
- Performs the same optimised multi-engine search as
full-web-search - Returns only the search result snippets/descriptions
- Does not follow links to extract full page content
3. get-single-web-page-content (Utility Tool)
For extracting content from a specific webpage:
- Takes a single URL as input
- Follows the URL and extracts the main page content
- Removes navigation, ads, and other non-content elements
Compatibility
This MCP server has been developed and tested with LM Studio and LibreChat. It has not been tested with other MCP clients.
Model Compatibility
Important: Prioritise using more recent models designated for tool use.
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.
- ✅ Works well with: Qwen3
- ✅ Works well with: Gemma 3
- ✅ Works with: Llama 3.2
- ✅ Works with: Recent Llama 3.1 (e.g 3.1 swallow-8B)
- ✅ Works with: Recent Deepseek R1 (e.g 0528 works)
- ⚠️ May have issues with: Some versions of Llama and Deepseek R1
- ❌ May not work with: Older versions of Llama and Deepseek R1
Installation (Recommended)
安装
npx playwright install配置
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/extracted/web-search-mcp/dist/index.js"]
}
}
}