kwp-lab
可用工具 (2 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
brave_web_search 3 个参数 需填 1 项
Performs a web search using the Brave Search API, ideal for general queries, news, articles, and online content. Use this for broad information gathering, recent events, or when you need diverse web sources. Supports pagination, content filtering, and freshness controls. Maximum 20 results per request, with offset for pagination.
必填参数:query
brave_local_search 2 个参数 需填 1 项
Searches for local businesses and places using Brave s Local Search API. Best for queries related to physical locations, businesses, restaurants, services, etc. Returns detailed information including:n- Business names and addressesn- Ratings and review countsn- Phone numbers and opening hoursnUse this when the query implies near me or mentions specific locations. Automatically falls back to web search if no local results are found.
必填参数:query
服务介绍
Brave Search MCP 服务器
一个利用 Brave Search API 进行网页和本地搜索的 MCP 服务器,支持可选的 HTTP 代理配置。
此仓库从 Model Context Protocol 服务器 分支而来,并将原生的 fetch 实现替换为库 node-fetch-native。
如果设置了 http_proxy 和 https_proxy 环境变量,服务器默认会通过代理服务器路由请求。您也可以设置 BRAVE_SEARCH_PROXY 环境变量来使用不同的代理服务器。
功能
- 网页搜索:通用查询、新闻、文章,支持分页和新鲜度控制
- 本地搜索:查找企业、餐馆和服务,并提供详细信息
- 灵活过滤:控制结果类型、安全级别和内容新鲜度
- 智能回退:当没有找到本地结果时,本地搜索会自动回退到网页搜索
工具
-
brave_web_search
- 执行带有分页和过滤功能的网页搜索
- 输入:
query(字符串):搜索词count(数字, 可选):每页结果数(最大20)offset(数字, 可选):分页偏移量(最大9)
-
brave_local_search
- 搜索本地企业和服务
- 输入:
query(字符串):本地搜索词count(数字, 可选):结果数量(最大20)
- 如果没有找到本地结果,则自动回退到网页搜索
配置
获取 API 密钥
- 注册一个 Brave Search API 账户
- 选择一个计划(免费层级每月提供2,000次查询)
- 从开发者仪表板生成您的 API 密钥 从开发者仪表板生成您的 API 密钥
与 Claude Desktop 一起使用
在您的 claude_desktop_config.json 中添加以下内容:
Docker
json
{
"mcpServers": {
"brave-search": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"mcp/brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE",
"BRAVE_SEARCH_PROXY": "https://example.com:10890" // 可选,不需要时请删除
}
}
}
}
NPX
json
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@kwp-lab/mcp-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE",
"BRAVE_SEARCH_PROXY": "https://example.com:10890" // 可选,不需要时请删除
}
}
}
}
与 VS Code 一起使用
为了快速安装,请使用下面的一键安装按钮...
对于手动安装,请将以下 JSON 块添加到您的 VS Code 用户设置(JSON)文件中。您可以通过按 Ctrl + Shift + P 并输入 Preferences: Open User Settings (JSON) 来完成此操作。
可选地,您可以将其添加到工作区中的 .vscode/mcp.json 文件中。这将允许您与他人共享配置。
请注意,在
.vscode/mcp.json文件中不需要mcp键。
Docker
json
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "brave_api_key",
"description": "Brave Search API Key",
"password": true
}
],
"servers": {
"brave-search": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"mcp/brave-search"
],
"env": {
"BRAVE_API_KEY": "${input:brave_api_key}",
"BRAVE_SEARCH_PROXY": "https://example.com:10890" // 可选,如果不需要可以删除
}
}
}
}
}
NPX
json
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "brave_api_key",
"description": "Brave Search API Key",
"password": true
}
],
"servers": {
"brave-search": {
"command": "npx",
"args": ["-y", "@kwp-lab/mcp-brave-search"],
"env": {
"BRAVE_API_KEY": "${input:brave_api_key}",
"BRAVE_SEARCH_PROXY": "https://example.com:10890" // 可选,如果不需要可以删除
}
}
}
}
}
构建
Docker 构建:
bash
docker build -t mcp/brave-search:latest -f ./Dockerfile .
许可证
此 MCP 服务器采用 MIT 许可证。这意味着您可以在遵守 MIT 许可证的条款和条件的前提下自由使用、修改和分发该软件。更多详细信息,请参见项目仓库中的 LICENSE 文件。