支持 SSE 的 Brave Search MCP
这是一个模型上下文协议 (MCP) 服务器,提供 Brave Search 功能,并集成了服务器发送事件 (SSE)。它可以部署到 Coolify 并用作实时搜索服务。
特征
通过 MCP 集成 Brave Search API
使用 SSE 的实时搜索结果
Docker 和 Coolify 已准备就绪
TypeScript 实现
Express.js SSE 端点
先决条件
Brave Search API 密钥
Node.js 18+
Docker(用于容器化部署)
Coolify 实例
本地开发
克隆存储库
使用您的 Brave API 密钥创建一个
.env
文件:安装依赖项:
启动开发服务器:
Docker 部署
使用 docker-compose 构建并运行:
Coolify 部署
在 Coolify 仪表板中,创建一个新服务
选择“从源部署”
配置以下内容:
存储库 URL:您的存储库 URL
分支:主
构建命令:
npm run build
启动命令:
npm start
端口:3001
环境变量:
BRAVE_API_KEY=你的 API 密钥
端口=3001
使用 SSE 集成
SSE 端点
SSE 端点提供实时搜索结果。使用 EventSource API 连接到该端点:
消息端点
使用此端点触发将广播到所有连接的 SSE 客户端的搜索。
MCP 使用
服务器提供以下MCP工具:
brave_web_search
:使用 Brave Search API 执行网络搜索
错误处理
服务器向所有连接的 SSE 客户端广播错误
错误格式如下:
笔记
SSE 连接将保持打开状态,直到客户端关闭它
每个搜索结果都会广播给所有连接的客户端
服务器自动处理断开连接和清理
对于生产部署,请考虑对消息端点实施身份验证
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
与 Brave Search API 集成的模型上下文协议服务器,通过服务器发送事件 (SSE) 提供实时搜索功能。
Related MCP Servers
- -securityAlicense-qualityA server based on the MCP protocol that uses the Brave API for web search functionality.Last updated -1MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that integrates with Microsoft Bing Search API, allowing AI assistants to perform web, news, and image searches.Last updated -355MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.Last updated -47455MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables semantic search capabilities by providing tools to manage Qdrant vector database collections, process and embed documents using various embedding services, and perform semantic searches across vector embeddings.Last updated -411MIT License