Get the FREE Ultimate OpenClaw Setup Guide →

baidu

Baidu Search MCP Server I A Model Context Protocol (MCP) server that provides web search capabilities through Baidu, with additional features for content fetching and parsing.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio evilran-baidu-mcp-server uvx baidu-mcp-server

How to use

The Baidu Search MCP Server provides two core tools: a web search tool that queries Baidu and returns formatted results, and a content fetching tool that retrieves and parses text from webpages. Designed for efficient ingestion by language models, the server includes rate limiting, robust error handling, and output optimized for LLM consumption. You can run the server via uv (Python) or integrate it into Claude Desktop or other MCP-enabled clients using the provided MCP configuration. When used with Claude Desktop, configure the MCP server under mcpServers to point to the Baidu MCP implementation, enabling seamless querying and content extraction within Claude workflows. The available tools are exposed as async Python functions that you can call from your MCP-enabled environment, and the results are formatted with titles, URLs, and clean content suitable for downstream reasoning and summarization.

How to install

Prerequisites:

  • Python 3.8+ and pip for the UV-based installation
  • Optional: Node.js and npm if you prefer Smithery-based installation

Option A: Install via Smithery (npx)

  1. Ensure you have Node.js and npm installed.
  2. Install the MCP server via Smithery:
npx -y @smithery/cli install @Evilran/baidu-mcp-server --client claude
  1. Follow Smithery’s prompts to complete the setup for Claude Desktop integration.

Option B: Install via uv (Python Package Index)

  1. Ensure Python 3.8+ and pip are installed.
  2. Install the package from PyPI:
uv pip install baidu-mcp-server
  1. Verify installation by running or configuring your MCP client to point to the installed package (e.g., using uvx to run baidu-mcp-server).

Option C: Direct MCP CLI usage (development/testing)

  1. Install dependencies as needed for your environment.
  2. Use the MCP CLI to run or install the server locally for testing:
# Run in development mode
mcp dev server.py

# Install locally for Claude Desktop testing
mcp install server.py

Additional notes

Notes and tips:

  • Rate limiting: The server enforces limits to protect against abuse (e.g., search and content fetch calls per minute). Plan queries accordingly.
  • Output formatting: Results are tailored for easy parsing by LLMs; expect cleaned titles, URLs, and concise snippets.
  • Error handling: The MCP context includes logging and graceful degradation on timeouts or rate limit exceeded situations.
  • Environment variables: If you need to customize behavior (e.g., API keys, proxies), set them in the server’s environment configuration as needed by your deployment.
  • Debugging: When integrating with Claude Desktop, ensure the configuration maps the mcpServers entry to the baidu-mcp-server installation (via uvx or equivalent wrapper).
  • Contributing: If you plan to extend search parameters or parsing, consider caching results and implementing additional rate-limiting policies to balance responsiveness with resource usage.

Related MCP Servers

Sponsor this space

Reach thousands of developers