bocha-mcp
# Bocha Search MCP Server
MCP server for Bocha Search API, providing web search and AI search capabilities.
## Features
- **Web Search**: Search the web using Bocha Web Search API (default)
- **AI Search**: Search using Bocha AI Search API with multimodal cards and AI-generated answers (only when specifically requested)
## Installation
1. Clone this repository
2. Install dependencies:
```bash
npm install
```
3. Copy `.mcp.example.json` to `.mcp.json` and add your Bocha API key:
```bash
cp .mcp.example.json .mcp.json
```
4. Edit `.mcp.json` and replace `YOUR_BOCHA_API_KEY_HERE` with your actual API key
## Usage
### As MCP Server
Add the following to your Claude configuration:
```json
{
"mcpServers": {
"bocha-search": {
"command": "node",
"args": ["/path/to/bocha-mcp/index.js"],
"env": {
"BOCHA_API_KEY": "your_api_key_here"
}
}
}
}
```
### Tools
1. **web-search**: Search the web using Bocha Web Search API
- `query`: Search query (supports natural language)
- `count`: Number of results (1-50, default 10)
- `freshness`: Time range filter (noLimit, day, week, month, year)
- `summary`: Whether to include text summary (default true)
2. **ai-search**: Search using Bocha AI Search API
- `query`: Search query
- `count`: Number of results (1-50, default 10)
- `freshness`: Time range filter (noLimit, day, week, month, year)
- `answer`: Whether to generate AI answer (default false)
- `stream`: Whether to use streaming response (default false)
## Environment Variables
- `BOCHA_API_KEY`: Your Bocha API key (required)
## License
ISCTDQS
Scored across 2 tools
Both tools are search-based and can return similar result types, creating potential ambiguity. The AI search tool explicitly notes it should only be used when requested, which helps, but the boundary between general web search and AI-enhanced search is not always obvious.
Both tool names follow a consistent pattern: a type prefix followed by 'search' (web-search, ai-search). This makes the naming predictable and easy to understand.
With only two tools, the server is on the lean side, but for a focused search API server, this is reasonable. Each tool serves a distinct search mode, so the count feels appropriate for the scope.
The tool surface covers general web search and AI-powered search, including images, videos, and multimodal cards. No obvious missing functionality for the stated purpose of a search API.