Baidu Search MCP Server
Servidor MCP de búsqueda de Baidu
Un servidor de Protocolo de Contexto de Modelo (MCP) que proporciona capacidades de búsqueda web a través de Baidu, con funciones adicionales para la búsqueda y análisis de contenido.
Características
Búsqueda web : Busque en Baidu con limitación de velocidad avanzada y formato de resultados
Obtención de contenido : recupere y analice el contenido de páginas web con extracción de texto inteligente
Limitación de velocidad : protección integrada contra límites de velocidad tanto para la búsqueda como para la obtención de contenido
Manejo de errores : manejo y registro de errores integral
Salida compatible con LLM : resultados formateados específicamente para un gran consumo de modelos de lenguaje
Related MCP server: DuckDuckGo MCP Server
Instalación
Instalación mediante herrería
Para instalar Baidu Search Server para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @Evilran/baidu-mcp-server --client claudeInstalación mediante uv
Instalar directamente desde PyPI usando uv :
uv pip install baidu-mcp-serverUso
Ejecutando con Claude Desktop
Descargar Claude Desktop
Crea o edita tu configuración de Claude Desktop:
En macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonEn Windows:
%APPDATA%\Claude\claude_desktop_config.json
Agregue la siguiente configuración:
{
"mcpServers": {
"baidu-search": {
"command": "uvx",
"args": ["baidu-mcp-server"]
}
}
}Reiniciar Claude Desktop
Desarrollo
Para el desarrollo local, puede utilizar la CLI de MCP:
# Run with the MCP Inspector
mcp dev server.py
# Install locally for testing with Claude Desktop
mcp install server.pyHerramientas disponibles
1. Herramienta de búsqueda
async def search(query: str, max_results: int = 10) -> strRealiza una búsqueda web en Baidu y devuelve resultados formateados.
Parámetros:
query: cadena de consulta de búsquedamax_results: Número máximo de resultados a devolver (predeterminado: 10)
Devuelve: cadena formateada que contiene resultados de búsqueda con títulos, URL y fragmentos.
2. Herramienta de obtención de contenido
async def fetch_content(url: str) -> strObtiene y analiza el contenido de una página web.
Parámetros:
url: La URL de la página web de la que se obtendrá el contenido
Devuelve: Contenido de texto limpio y formateado de la página web.
Características en detalle
Limitación de velocidad
Búsqueda: Limitada a 30 solicitudes por minuto
Obtención de contenido: limitada a 20 solicitudes por minuto
Gestión automática de colas y tiempos de espera
Procesamiento de resultados
Elimina anuncios y contenido irrelevante.
Limpia las URL de redireccionamiento de Baidu
Formatos de resultados para un consumo óptimo de LLM
Trunca el contenido largo apropiadamente
Manejo de errores
Detección y generación de informes de errores completos
Registro detallado a través del contexto MCP
Degradación elegante en límites de velocidad o tiempos de espera
Contribuyendo
¡Agradecemos los problemas y las solicitudes de incorporación de cambios! Algunas áreas de mejora potenciales:
Parámetros de búsqueda adicionales (región, idioma, etc.)
Opciones de análisis de contenido mejoradas
Capa de almacenamiento en caché para contenido de acceso frecuente
Estrategias adicionales de limitación de velocidad
Licencia
Este proyecto está licenciado bajo la licencia MIT.
Expresiones de gratitud
El código de este proyecto hace referencia a los siguientes repositorios:
Gracias a los autores y colaboradores de estos repositorios por sus esfuerzos y contribuciones a la comunidad de código abierto.
Available Tools
1 toolsearchC
Search Baidu and return formatted results.
Args:
query: The search query string
max_results: Maximum number of results to return (default: 6)
deep_mode: Deep search the web content (default: False)
ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_results | No | ||
| deep_mode | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose behavioral traits such as authentication requirements, rate limits, pagination behavior, or the nature of 'deep_mode.' With no annotations, the description carries full burden but fails to provide sufficient context beyond the basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short but poorly structured. It includes unnecessary notation like 'Args:' and references a 'ctx' parameter not in the schema, which is misleading. It mixes parameter docs with the main description, reducing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters, no output schema, and no annotations, the description is incomplete. It fails to explain output format, error handling, or advanced usage. A search tool typically requires more documentation to be used correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The parameter descriptions in 'Args' merely restate the schema field names and defaults (e.g., 'query: The search query string') without adding meaningful semantics. 'Deep search the web content' is vague. Schema coverage is 0%, and the description adds only trivial value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Search Baidu and return formatted results,' which clearly identifies the tool's action (search) and resource (Baidu), and implies output formatting. No sibling tools exist, so differentiation is not needed. However, it could be more specific about the result format (e.g., titles, URLs, snippets).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool or its limitations. For a search tool, one would expect notes on query syntax, rate limits, or alternatives, but none are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
search
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between different operations. The tool's purpose is clear and distinct.
The single tool is consistently named 'search', following a verb-only pattern that matches its action. There is no inconsistency.
A single tool for a search server is functional but minimal. It falls into the borderline category where the tool count feels thin for a typical API surface.
The search tool includes essential parameters like query, max_results, and deep_mode. However, it lacks other common search features like image or news search, leaving minor gaps.
Maintenance
Related MCP Connectors
Web search, page extraction, visual tools and developer utilities through Baizhi Cloud.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
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.21 npm6MIT
- AlicenseBqualityCmaintenanceEnables web search through DuckDuckGo and webpage content fetching with intelligent text extraction. Features built-in rate limiting and LLM-optimized result formatting for seamless integration with language models.2MIT
- FlicenseAqualityDmaintenanceProvides web search capabilities across multiple engines and webpage content fetching to simplified Markdown. It enables AI assistants to access real-time internet information and extract text from specific URLs.213-
- FlicenseNot gradedqualityDmaintenanceWraps the Kimi Coding Search and Fetch APIs into MCP tools for web searching and content retrieval. It enables LLMs to perform targeted searches and crawl web pages using standardized interfaces.1-