MCP MixSearch
Enables advanced web search across multiple search engines (Brave, DuckDuckGo, Google, Bing, Yandex) with intelligent backend selection, full content extraction, and advanced filtering by time, language, geography, and content type.
README
MCP MixSearch
A comprehensive Model Context Protocol (MCP) server for advanced web search functionality with multi-engine support and intelligent backend selection.
Features
- Multi-Engine Search: Access to multiple search engines (Brave, DuckDuckGo, Google, Bing, Yandex) via DDGS library
- Advanced Filtering: Time-based, geographic, language, and content type filtering
- Intelligent Backend Selection: Automatically chooses optimal search engine based on parameters
- Full Content Extraction: Extract readable content from search results and specific URLs
- Dual Interface: Both MCP protocol and REST API with identical functionality
- Graceful Fallbacks: Browser-based search for reliability when APIs fail
Quick Start
Install and Run
# Install
uv sync
# Run in MCP stdio mode (default)
uv run mcp-mixsearch
# Run in MCP HTTP mode
uv run mcp-mixsearch --mode mcp
# Or run with REST API
uv run mcp-mixsearch --mode rest
Use as a Dependency
See Using as Dependency for creating your own MCP servers.
Configuration
Set environment variables in a .env file or export them:
# Server Configuration
MCP_HOST=localhost
MCP_PORT=3000
MCP_TRANSPORT=stdio # or 'http'
MCP_AUTH_ENABLED=true
MCP_CORS_ORIGINS="http://localhost:3000,http://localhost:5173"
# Web Search Configuration
BRAVE_API_KEY=your_brave_api_key_here
MAX_CONTENT_LENGTH=500000
MAX_CONCURRENT_REQUESTS=5
# Logging
LOG_LEVEL=INFO
Running Modes
mcp-mixsearch supports three distinct running modes:
1. MCP HTTP Mode
Runs MCP server over HTTP without REST API endpoints.
uv run mcp-mixsearch --mode mcp
2. MCP Stdio Mode (Default)
Runs MCP server over stdio without REST API endpoints.
uv run mcp-mixsearch --mode stdio
# Or just run without flags (default)
uv run mcp-mixsearch
3. REST API + MCP Mode
Runs both REST API endpoints and MCP protocol over HTTP.
uv run mcp-mixsearch --mode rest
Environment Variables
You can also control modes using environment variables:
# MCP over HTTP
MCP_TRANSPORT=http MCP_ONLY=true uv run mcp-mixsearch
# MCP over stdio
MCP_TRANSPORT=stdio MCP_ONLY=true uv run mcp-mixsearch
# REST API + MCP over HTTP
MCP_TRANSPORT=http MCP_ONLY=false uv run mcp-mixsearch
In HTTP modes, the server runs on http://localhost:3000 with:
- MCP endpoint:
http://localhost:3000/mcp - REST API docs:
http://localhost:3000/docs(when REST API enabled) - Health check:
http://localhost:3000/health(when REST API enabled)
Available Tools
MCP Tools
-
full_web_search
- Comprehensive web search with content extraction
- Multi-engine search with intelligent backend selection
- Advanced filtering: time, language, geographic, content type filters
- Args: query, limit (1-10), include_content, max_content_length, top_n, recency_days, source, language, country
-
get_web_search_summaries
- Lightweight search returning only summaries
- Same advanced filtering capabilities as full_web_search
- Args: query, limit (1-10), top_n, recency_days, source, language, country
-
get_single_web_page_content
- Extract content from a specific URL
- Args: url, max_content_length
REST API Endpoints
GET /search/full_web_search- Same asfull_web_searchwith identical parametersGET /search/get_web_search_summaries- Same asget_web_search_summarieswith identical parametersGET /search/get_single_web_page_content- Same asget_single_web_page_content
Advanced Search Features
Multi-Engine Architecture
- Primary: DDGS library with multiple backend support (Brave, DuckDuckGo, Google, Bing, Yandex)
- Intelligent backend selection: Automatically chooses best engine based on parameters
- Fallbacks: Browser-based search for reliability
Supported Parameters
- Core:
query(required),limit/top_n,include_content,max_content_length - Time filtering:
recency_days(1=day, 7=week, 30=month, 365=year) - Content type:
source("news", "images", "videos", "web") - Language filtering:
language(e.g., "en", "es", "fr", "de") - Geographic filtering:
country(e.g., "US", "GB", "FR", "DE")
Usage Examples
Basic search:
# MCP
{"query": "AI developments", "limit": 5}
# REST
GET /search/get_web_search_summaries?query=AI%20developments&limit=5
Advanced filtering:
# MCP
{"query": "climate policy", "country": "FR", "language": "fr", "recency_days": 30, "source": "news"}
# REST
GET /search/get_web_search_summaries?query=climate%20policy&country=FR&language=fr&recency_days=30&source=news
Project Structure
mcp-mixsearch/
├── features/ # Feature implementations
│ └── web_search/ # Web search feature
│ ├── __init__.py
│ ├── models.py # Pydantic models
│ ├── service.py # Multi-engine search logic
│ ├── tool.py # MCP tool registrations
│ ├── routes.py # REST API routes
│ ├── instructions.md # Full web search documentation
│ ├── instructions_summaries.md # Search summaries documentation
│ └── instructions_single_page.md # Single page extraction documentation
├── config.py # Configuration management
├── server.py # Main server entry point
├── pyproject.toml # Project configuration
├── uv.lock # Dependency lock file
├── README.md
└── LICENSE
Development
Testing
pytest
Building
uv build
Dependencies
- mcp-weather: Core MCP infrastructure
- fastmcp: MCP protocol implementation
- httpx: HTTP client for content extraction
- playwright: Browser automation for dynamic content
- beautifulsoup4: HTML parsing
- fake-useragent: Random user agents
License
See LICENSE file.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。