MCP cover image
See in Github
2025-04-14

Una implementación del servidor MCP que integra la API de búsqueda valiente, proporcionando, búsqueda web, búsqueda de puntos de interés locales, búsqueda de imágenes, búsqueda de videos y capacidades de búsqueda de noticias

1

Github Watches

1

Github Forks

1

Github Stars

Brave Search MCP Server

An MCP Server implementation that integrates the Brave Search API, providing, Web Search, Local Points of Interest Search, Video Search, Image Search and News Search capabilities

Brave Search MCP server

Features

  • Web Search: Perform a regular search on the web
  • Image Search: Search the web for images. Image search results will be available as a Resource
  • News Search: Search the web for news
  • Video Search: Search the web for videos
  • Local Points of Interest Search: Search for local physical locations, businesses, restaurants, services, etc

Tools

  • brave_web_search

    • Execute web searches using Brave's API
    • Inputs:
      • query (string): The term to search the internet for
      • count (number, optional): The number of results to return (max 20, default 10)
  • brave_image_search

    • Get images from the web relevant to the query
    • Inputs:
      • query (string): The term to search the internet for images of
      • count (number, optional): The number of images to return (max 3, default 1)
  • brave_news_search

    • Searches the web for news
    • Inputs:
      • query (string): The term to search the internet for news articles, trending topics, or recent events
      • count (number, optional): The number of results to return (max 20, default 10)
  • brave_local_search

    • Search for local businesses, services and points of interest
    • REQUIRES subscription to the Pro api plan for location results
    • Falls back to brave_web_search if no location results are found
    • Inputs:
      • query (string): Local search term
      • count (number, optional): The number of results to return (max 20, default 5)
  • brave_video_search

    • Search the web for videos
    • Inputs:
      • query: (string): The term to search for videos
      • count: (number, optional): The number of videos to return (max 20, default 10)

Configuration

Getting an API Key

  1. Sign up for a Brave Search API account
  2. Choose a plan (Free tier available with 2,000 queries/month)
  3. Generate your API key from the developer dashboard

Usage with Claude Desktop

Docker

  1. Clone the repo
  2. Docker build
docker build -t brave-search-mcp:latest -f ./Dockerfile .
  1. Add this to your claude_desktop_config.json:
{
  "mcp-servers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

NPX

Add this to your claude_desktop_config.json:

{
  "mcp-servers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "brave-search-mcp"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR API KEY HERE"
      }
    }
  }
}

Usage with LibreChat

Add this to librechat.yaml

brave-search:
  command: sh
  args:
    - -c
    - BRAVE_API_KEY=API KEY npx -y brave-search-mcp

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Debugging

  1. Clone the repo

  2. Install Dependencies and build it

npm install
  1. Build the app
npm run build

Use the VS Code Run and Debug Function

⚠ Does not seem to work on Windows 10/11, but works in WSL2

Use the VS Code Run and Debug launcher with fully functional breakpoints in the code:

  1. Locate and select the run debug.
  2. Select the configuration labeled "MCP Server Launcher" in the dropdown.
  3. Select the run/debug button. We can debug the various tools using MCP Inspector and VS Code.

VS Code Debug setup

To set up local debugging with breakpoints:

  1. Store Brave API Key in the VS Code

    • Open the Command Palette (Cmd/Ctrl + Shift + P).
    • Type Preferences: Open User Settings (JSON).
    • Add the following snippet:
    {
      "brave.search.api.key": "your-api-key-here"
    }
    
  2. Create or update .vscode/launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "MCP Server Launcher",
      "skipFiles": ["<node_internals>/**"],
      "program": "${workspaceFolder}/node_modules/@modelcontextprotocol/inspector/cli/build/cli.js",
      "outFiles": ["${workspaceFolder}/dist/**/*.js"],
      "env": {
        "BRAVE_API_KEY": "${config:brave.search.api.key}",
        "DEBUG": "true"
      },
      "args": ["dist/index.js"],
      "sourceMaps": true,
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "preLaunchTask": "npm: build:watch"
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to Debug Hook Process",
      "port": 9332,
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": ["${workspaceFolder}/dist/**/*.js"]
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to REPL Process",
      "port": 9333,
      "skipFiles": ["<node_internals>/**"],
      "sourceMaps": true,
      "outFiles": ["${workspaceFolder}/dist/**/*.js"]
    }
  ],
  "compounds": [
    {
      "name": "Attach to MCP Server",
      "configurations": ["Attach to Debug Hook Process", "Attach to REPL Process"]
    }
  ]
}
  1. Create .vscode/tasks.json:
{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "build:watch",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "problemMatcher": ["$tsc"]
    }
  ]
}

Disclaimer

This library is not officially associated with Brave Software. It is a third-party implementation of the Brave Search API with a MCP Server.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

相关推荐

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Aurity Ltd
  • Create and Publish Business Websites in seconds. AI will gather all the details about your website and generate link to your website.

  • John Rafferty
  • Text your favorite pet, after answering 10 questions about their everyday lives!

  • Convincible Ltd
  • You're in a stone cell – can you get out? A classic choose-your-adventure interactive fiction game, based on a meticulously-crafted playbook. With a medieval fantasy setting, infinite choices and outcomes, and dice!

  • Ian O'Connell
  • Provide players' names or enter Quickstart to start the game!

  • analogchat.com
  • Efficient Spotify assistant for personalized music data.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • langgenius
  • alibaba
  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • microsoft
  • Python tool for converting files and office documents to Markdown.

  • mindsdb
  • AI's query engine - Platform for building AI that can answer questions over large scale federated data. - The only MCP Server you'll ever need

  • Byaidu
  • Traducción de papel científico en PDF con formatos preservados - 基于 Ai 完整保留排版的 PDF 文档全文双语翻译 , 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 等服务 等服务 等服务 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 cli/mcp/docker/zotero

  • caio-moliveira
  • Este proyecto fue creado para demostrar cómo podemos conectarnos con diferentes protocolos de contexto del modelo (MCP).

  • labring
  • AstrBotDevs
  • ✨ 易上手的多平台 llm 聊天机器人及开发框架 ✨ 平台支持 qq 、 qq 频道、 telegram 、微信、企微、飞书 | MCP 服务器、 OpenAi 、 Deepseek 、 Géminis 、硅基流动、月之暗面、 Ollama 、 oneapi 、 DiFy 等。附带 Webui。

  • beclab
  • OLARES: Un sistema operativo soberano de código abierto para la IA local

    Reviews

    3 (1)
    Avatar
    user_f4SZaoUz
    2025-04-26

    As a dedicated user of the mcp application, I am thoroughly impressed with the Brave-Search-MCP by Mike Chao. It's a robust tool that delivers fast and accurate search results, enhancing my browsing experience significantly. The seamless integration with other MCP products is a big plus, and the user-friendly interface makes navigation a breeze. Highly recommended for anyone looking for a reliable search application!