SB

shoofio/brave-search-mcp-sse

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

16 stars 12 forks 质量 68 趋势 21MIT

Stream Brave搜索(web & local)结果通过模式上下文协议(MCP)/Server-Sent Events(SSE)接口.

概览

使用"Server-Sent Events"(SSE)集成"勇敢搜索API"的"模拟上下文协议"(MCP)的实施,通过流媒体界面为AI模型和其他客户端提供网络和本地搜索能力. 这个服务器充当理解"模型上下文协议"的大语言模型的工具提供者. 它通过SSE连接暴露了Brave强大的网络和本地搜索功能,从而可以实时流出搜索结果和状态更新. * 设计时以中心思想为中心,允许组织或个人管理单一的"勇者"搜索API密钥并提供多个内部客户端或应用程序的受控访问. * 功能是强力记录,以跟踪请求、API互动、出错和速率限制,提供使用中的能见度和协助调试。 * 可通过Kubernetes Ingress或直接多克端口映射等方法,在网络内私下部署或可选择公开曝光.

概述(AI 翻译)

使用"Server-Sent Events"(SSE)集成"勇敢搜索API"的"模拟上下文协议"(MCP)的实施,通过流媒体界面为AI模型和其他客户端提供网络和本地搜索能力.

□ 概览

这个服务器充当理解"模型上下文协议"的大语言模型的工具提供者. 它通过SSE连接暴露了Brave强大的网络和本地搜索功能,从而可以实时流出搜索结果和状态更新.

** 关键设计目标:**

  • ** 集中存取:** 以中心思想设计,允许组织或个人管理单一的"勇者"搜索API密钥并提供多个内部客户端或应用程序的控制访问.
  • ** 可观察性:** 功能是强力记录以跟踪请求,API互动,出错和速率限制,为使用提供能见度并辅助调试.
  • ** 灵活部署:** 可以私下部署在一个网络中,或通过Kubernetes Ingress或直接多克端口映射等方法可选择公开曝光.

□ 特性

  • 网页搜索: Access Brave的独立网络搜索索引,用于一般查询,新闻,文章等.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Brave Search MCP/SSE Server

An implementation of the Model Context Protocol (MCP) using Server-Sent Events (SSE) that integrates the Brave Search API, providing AI models and other clients with web and local search capabilities through a streaming interface.

Overview

This server acts as a tool provider for Large Language Models that understand the Model Context Protocol. It exposes Brave’s powerful web and local search functionalities via an SSE connection, allowing for real-time streaming of search results and status updates.

Key Design Goals:

  • Centralized Access: Designed with centrality in mind, allowing organizations or individuals to manage a single Brave Search API key and provide controlled access to multiple internal clients or applications.
  • Observability: Features robust logging to track requests, API interactions, errors, and rate limits, providing visibility into usage and aiding debugging.
  • Flexible Deployment: Can be deployed privately within a network or optionally exposed publicly via methods like Kubernetes Ingress or direct Docker port mapping.

Features

  • Web Search: Access Brave’s independent web search index for general queries, news, articles, etc. Supports pagination and filtering controls.
  • Local Search: Find businesses, restaurants, and services with detailed information like address, phone number, and ratings.
  • Smart Fallbacks: Local search automatically falls back to a filtered web search if no specific local results are found for the query.
  • Server-Sent Events (SSE): Efficient, real-time streaming of search results and tool execution status.
  • Model Context Protocol (MCP): Adheres to the MCP standard for seamless integration with compatible clients.
  • Docker Support: Includes a Dockerfile for easy containerization and deployment.
  • Helm Chart: Provides a Helm chart for straightforward deployment to Kubernetes clusters.

Prerequisites

Depending on your chosen deployment method, you will need some of the following:

  • Brave Search API Key: Required for all deployment methods. See “Getting Started” below.
  • Docker: Required if deploying using Docker.
  • kubectl & Helm: Required if deploying to Kubernetes using Helm.
  • Node.js & npm: Required only for local development (Node.js v22.x or later recommended).
在 GitHub 查看完整 README

安装

docker run -d --rm \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "brave-search": { "transport": "sse", "url": "http://localhost:8080/sse" } } }