让智能体通过 Brave Search API 进行网络搜索和本地搜索,支持异步并发请求。
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add search --env BRAVE_API_KEY='<BRAVE_API_KEY>' -- uv --directory path/to/your/cloned/search-server run search~/.codex/config.toml
[mcp_servers.search]
command = "uv"
args = ["--directory", "path/to/your/cloned/search-server", "run", "search"]
env = { BRAVE_API_KEY = "<BRAVE_API_KEY>" }
# codex mcp add search --env BRAVE_API_KEY='<BRAVE_API_KEY>' -- uv --directory path/to/your/cloned/search-server run search~/.cursor/mcp.json
{
"mcpServers": {
"search": {
"command": "uv",
"args": [
"--directory",
"path/to/your/cloned/search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"search": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"path/to/your/cloned/search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"search": {
"command": "uv",
"args": [
"--directory",
"path/to/your/cloned/search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"search": {
"command": "uv",
"args": [
"--directory",
"path/to/your/cloned/search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"search": {
"command": "uv",
"args": [
"--directory",
"path/to/your/cloned/search-server",
"run",
"search"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>"
}
}
}
}需要的环境变量
BRAVE_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。