Bocha Search MCP server

Integrates with Bocha, a Chinese search engine, to provide web search capabilities with rich structured data from billions of documents across multiple domains and languages.
Back to servers
Setup instructions
Provider
Bocha AI
Release date
Apr 15, 2025
Language
Python
Stats
18 stars

Bocha is an AI-focused search engine that enables your AI applications to access high-quality information from nearly 10 billion web pages and ecosystem content sources, covering various domains including weather, news, encyclopedias, medical information, train tickets, images, and more.

Installation Guide

Prerequisites

Before installing, you'll need to obtain an API key from the Bocha AI Open Platform by logging in and requesting access.

Download and Setup

Clone the repository to your local machine:

git clone git@github.com:BochaAI/bocha-search-mcp.git

Client Configuration

For Claude Desktop

Configure the MCP server in your Claude Desktop configuration file:

On MacOS:

~/Library/Application\ Support/Claude/claude_desktop_config.json

On Windows:

%APPDATA%/Claude/claude_desktop_config.json

Add the following configuration:

{
  "mcpServers": {
    "bocha-search-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/bocha-search-mcp",
        "run",
        "bocha-search-mcp"
      ],
      "env": {
        "BOCHA_API_KEY": "sk-****"
      }
    }
  }
}

Be sure to replace /path/to/bocha-search-mcp with the actual path where you cloned the repository, and sk-**** with your actual API key from the Bocha platform.

Testing the Local Service (Optional)

To debug and test your local MCP server installation:

npx @modelcontextprotocol/inspector uv --directory /path/to/bocha-search-mcp run bocha-search-mcp

Using Bocha Search

Bocha offers two primary search tools:

Bocha Web Search

This tool provides general web search capabilities, returning web page information including titles, URLs, summaries, website names, and more.

Parameters:

  • query: Search term (required)
  • freshness: Filter for time-specific results (optional)
    • Values: YYYY-MM-DD, YYYY-MM-DD..YYYY-MM-DD, noLimit, oneYear, oneMonth, oneWeek, oneDay
    • Default: noLimit
  • count: Number of results to return (1-50, default: 10)

Output:

  • Web page titles, URLs, summaries, publication time, and website names

Bocha AI Search

This enhanced search tool builds on the web search capabilities and additionally returns structured modal cards for specific domains through AI-powered semantic recognition.

Parameters:

Same as Bocha Web Search:

  • query: Search term (required)
  • freshness: Time filter (optional)
  • count: Results count (1-50, default: 10)

Output:

  • Web page information plus structured domain-specific modal cards

The AI Search includes specialized cards for weather, encyclopedia entries, medical information, calendars, train schedules, horoscopes, precious metals, exchange rates, oil prices, mobile phones, stocks, automobiles, and more.

Supported Platforms

Bocha can be integrated with various platforms including Ark, Python applications, Claude, Cursor, and more.

Frequently Asked Questions

What capabilities does Bocha Web Search API provide?

Bocha Web Search offers general internet search capabilities, returning up to 50 results per search with detailed information about each webpage. Unlike traditional search engines that use keyword matching and paid ranking mechanisms, Bocha employs multimodal hybrid search and semantic ranking technology optimized for AI applications, delivering cleaner, more accurate, and higher-quality answers.

What additional capabilities does Bocha AI Search API provide?

Bocha AI Search enhances the Web Search functionality by using AI to recognize search query semantics and return structured modal cards for vertical domains. These cards provide specialized information for weather, encyclopedias, medical data, calendars, train schedules, horoscopes, precious metals, exchange rates, oil prices, mobile phones, stocks, automobiles, and more. This significantly improves semantic recognition, result timeliness, and content richness.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "bocha-search-mcp" '{"command":"uv","args":["--directory","/path/to/bocha-search-mcp","run","bocha-search-mcp"],"env":{"BOCHA_API_KEY":"sk-****"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "bocha-search-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/bocha-search-mcp",
                "run",
                "bocha-search-mcp"
            ],
            "env": {
                "BOCHA_API_KEY": "sk-****"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "bocha-search-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/bocha-search-mcp",
                "run",
                "bocha-search-mcp"
            ],
            "env": {
                "BOCHA_API_KEY": "sk-****"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later