aiwebsearcher
Provides tools to execute Baidu searches and retrieve structured results, with optional AI-powered reranking and full web content extraction.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aiwebsearcher search Baidu for recent AI breakthroughs and summarize the top results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Search MCP Server
A powerful Model Context Protocol (MCP) server providing AI-enhanced Baidu search with intelligent reranking and comprehensive web content extraction capabilities.
โจ Features
๐ Baidu Search Integration: Fast and reliable search results from Baidu
๐ค AI-Powered Reranking: Uses multiple AI agents (Qwen) to intelligently rerank search results by relevance
๐ Web Content Extraction: Extract clean, readable text from web pages with pagination support
๐ฏ Batch Processing: Extract content from multiple URLs simultaneously
๐ MCP Standard: Fully compliant with Model Context Protocol for seamless integration
Related MCP server: baidu-ai-search
๐ Quick Start
Prerequisites
Python 3.10 or higher
uv (recommended) or pip
DashScope API key (for AI search features)
Installation
Using uv (Recommended)
# Clone the repository
git clone https://github.com/Vist233/Google-Search-Tool.git
cd search-mcp
# Install with uv
uv pip install -e .Using pip
pip install -e .Environment Setup
Create a .env file or set environment variables for AI features:
export DASHSCOPE_API_KEY="your-api-key-here"๐ Usage
As an MCP Server
Add to your MCP client configuration (e.g., Claude Desktop):
For macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
For Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"aiwebsearcher": {
"command": "uvx",
"args": [
"aiwebsearcher"
]
}
}
}Note: API key is read from environment variable DASHSCOPE_API_KEY. Set it before running:
# macOS/Linux
export DASHSCOPE_API_KEY="your-api-key-here"
# Windows (PowerShell)
$env:DASHSCOPE_API_KEY="your-api-key-here"Standalone Testing
# Install the package
pip install aiwebsearcher
# Set API key
export DASHSCOPE_API_KEY="your-key"
# Run the server
aiwebsearcher๐ ๏ธ Available Tools
1. search_baidu
Execute basic Baidu search and return structured results.
Parameters:
query(str): Search keywordmax_results(int, optional): Maximum results to return (default: 5)language(str, optional): Search language (default: "zh")
Returns: JSON string with title, url, and abstract for each result.
Example:
{
"query": "ไบบๅทฅๆบ่ฝๅๅฑ็ฐ็ถ",
"max_results": 5
}2. AI_search_baidu
AI-enhanced search with intelligent reranking and content extraction. Takes ~3x longer but provides higher quality, ranked results with full page content.
Parameters:
query(str): Search keywordmax_results(int, optional): Initial results to fetch (default: 5, recommended 5+)language(str, optional): Search language (default: "zh")
Returns: JSON string with rank, title, url, and Content (full page text) for each result.
Example:
{
"query": "AIๅๅฑ่ถๅฟ 2025",
"max_results": 12
}3. extractTextFromUrl
Extract clean, readable text from a single webpage.
Parameters:
url(str): Target webpage URLfollow_pagination(bool, optional): Follow rel="next" links (default: true)pagination_limit(int, optional): Max pagination depth (default: 3)timeout(float, optional): HTTP timeout in seconds (default: 10.0)user_agent(str, optional): Custom User-Agent headerregular_expressions(list[str], optional): Regex patterns to filter text
Returns: Extracted text content as string.
4. extractTextFromUrls
Extract text from multiple webpages in batch.
Parameters: Same as extractTextFromUrl, plus:
urls(list[str]): List of target URLs
Returns: Combined text from all URLs, separated by double newlines.
๐๏ธ Project Structure
search-mcp/
โโโ searcher/
โ โโโ src/
โ โโโ server.py # MCP server entry point
โ โโโ FetchPage/
โ โ โโโ fetchWeb.py # Web content extraction
โ โโโ WebSearch/
โ โ โโโ baiduSearchTool.py # Baidu search implementation
โ โ โโโ SearchAgent.py # AI agent definitions (legacy)
โ โโโ useAI2Search/
โ โโโ SearchAgent.py # AI-powered search orchestration
โโโ tests/ # Test files
โโโ pyproject.toml # Project configuration
โโโ requirements.txt # Dependencies
โโโ README.md # This file๐ง Development
Install Development Dependencies
uv pip install -e ".[dev]"Run Tests
pytestCode Formatting
# Format with black
black searcher/
# Lint with ruff
ruff check searcher/๐ Configuration
MCP Client Configuration Examples
Minimal configuration:
{
"mcpServers": {
"search": {
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/search-mcp/searcher/src"
}
}
}With uv for dependency isolation:
{
"mcpServers": {
"search": {
"command": "uv",
"args": ["--directory", "/path/to/search-mcp/searcher/src", "run", "python", "server.py"]
}
}
}๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Built with FastMCP
AI models powered by Agno and DashScope
Search powered by baidusearch
Content extraction using trafilatura
๐ฎ Contact
GitHub: @Vist233
Repository: Google-Search-Tool
โ ๏ธ Disclaimer
This tool is for educational and research purposes. Please respect website terms of service and rate limits when scraping content.
Available Tools
4 toolsAI_search_baiduAi Search BaiduA
Execute Baidu search using AI and return results in order, this func time cost almost 10s, The AI will automatically filter and sort the search results, it is recommended to use parameters of max_results with five or more
Inputs: query (required), language, max_results. Returns: result
extractTextFromUrlExtracttextfromurlB
Extract and filter readable text from a webpage with optional pagination support.
Uses requests to fetch HTML, trafilatura to extract clean text (falls back to raw HTML), and regex patterns to filter content.
Inputs: url (required), timeout, user_agent, pagination_limit, +2 more. Returns: result
extractTextFromUrlsExtracttextfromurlsB
Extract and filter readable text from multiple webpages with optional pagination support.
Uses requests to fetch HTML, trafilatura to extract clean text (falls back to raw HTML), and regex patterns to filter content. Regex filtering is recommended for multiple URLs.
Inputs: urls (required), timeout, user_agent, pagination_limit, +2 more. Returns: result
search_baiduSearch BaiduB
Execute Baidu search and return results, Due to the limited amount of content returned, it is recommended to use parameters of max_results with four or more
Inputs: query (required), language, max_results. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 4 tools
The two extraction tools (single vs. multiple URLs) are clearly distinct, but search_baidu and AI_search_baidu have very similar names and overlap heavily in purpose, differing only in AI-based filtering/sorting. The descriptions do clarify the difference, but an agent could easily pick the wrong search tool.
The set mixes snake_case (search_baidu), a capitalized prefix (AI_search_baidu), and camelCase (extractTextFromUrl / extractTextFromUrls). The plural/singular pair is readable, but the verb style and casing conventions are inconsistent across the server.
Four tools is a tight, well-scoped surface for search + content extraction, with each tool earning its place. It is slightly thin (no alternative search engine or query-suggestion tool), but nothing is redundant beyond the two search variants.
The surface covers the core workflow: find results (plain or AI-ranked) and pull readable text from one or many URLs, including pagination. The main gap is that search is Baidu-only with no generic/multi-engine fallback, which limits coverage for non-Chinese queries.
Maintenance
Related MCP Connectors
Baidu web search results for China SEO and research. Paid, on Apify's hosted MCP.
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Web search, page extraction, visual tools and developer utilities through Baizhi Cloud.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform intelligent web searches using the Baidu Wenxin API, supporting multiple models, search modes, and providing search results with reference sources.6MIT
- Apache 2.0
- AlicenseBqualityDmaintenanceProvides web search capabilities through Baidu with content fetching and parsing features, allowing LLMs to search the web and extract webpage content.124 PyPI28MIT
- AlicenseAqualityDmaintenanceProvides Bing Chinese search and webpage crawling tools, enabling AI assistants to fetch real-time web information without API keys.2800 npm72MIT