一个集成了Brave Search API的MCP服务器实现,提供网页和本地搜索功能。
1.7w 查看 · 2026-07-07 更新
简介
一个集成了Brave Search API的MCP服务器实现,提供网页和本地搜索功能。
简介
一个集成了Brave Search API的MCP服务器实现,提供网页和本地搜索功能。
Brave Search MCP Server
一个集成了Brave Search API的MCP服务器实现,提供网页和本地搜索功能。
特性
- 网页搜索:通用查询、新闻、文章,支持分页和新鲜度控制
- 本地搜索:查找带有详细信息的企业、餐馆和服务
- 灵活过滤:控制结果类型、安全级别和内容新鲜度
- 智能回退:当没有找到本地结果时自动回退到网页搜索
工具
-
brave_web_search
- 执行带分页和过滤的网页搜索
- 输入:
query(字符串):搜索词count(数字, 可选):每页结果数(最大20)offset(数字, 可选):分页偏移量(最大9)
-
brave_local_search
- 搜索本地企业和服务
- 输入:
query(字符串):本地搜索词count(数字, 可选):结果数量(最大20)
- 如果未找到本地结果,则自动回退到网页搜索
配置
获取API密钥
- 注册Brave Search API账号
- 选择计划(免费层每月提供2,000次查询)
- 从开发者仪表板生成您的API密钥
与Claude Desktop一起使用
将以下内容添加到您的claude_desktop_config.json中:
Docker
{ "mcpServers": { "brave-search": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search" ], "env": { "BRAVE_API_KEY": "YOUR_API_KEY_HERE" } } } }
NPX
{ "mcpServers": { "brave-search": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-brave-search" ], "env": { "BRAVE_API_KEY": "YOUR_API_KEY_HERE" } } } }
构建
Docker构建命令:
docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .
许可证
此MCP服务器根据MIT许可证发布。这意味着您可以自由地使用、修改和分发该软件,但需遵守MIT许可证的条款和条件。更多详情,请参阅项目仓库中的LICENSE文件。
工具列表
-
brave_web_search: 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.
-
brave_local_search: 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:
-
Business names and addresses
-
Ratings and review counts
-
Phone numbers and opening hours Use this when the query implies 'near me' or mentions specific locations. Automatically falls back to web search if no local results are found.
服务配置
[{'mcpServers': {'brave-search': {'args': ['-y', '@modelcontextprotocol/server-brave-search'], 'command': 'npx', 'env': {'BRAVE_API_KEY': 'YOUR_API_KEY_HERE'}}}}]