Logotipo de Brave Search MCP

Brave Search MCP

Comunidad
mikechao

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

Editormikechao
Repositoriobrave-search-mcp
IdiomaTypeScript
Forks
22
Estrellas
126
Herramientas disponibles
0
Tipo de transportestdio
LicenciaGPL-3.0
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    Brave Search MCP ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés de la comunidad en el repositorio

    126 estrellas y 22 forks en el repositorio enlazado.

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, News Search and LLM Context Search capabilities

Features

  • Web Search: Perform a regular search on the web
  • Image Search: Search the web for images.
  • 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
  • LLM Context Search: Fetch and extract full web page content optimized for reading and synthesizing sources

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)
      • offset (number, optional, default 0): The offset for pagination
      • freshness (enum, optional): Filters search results by when they were discovered
        • The following values are supported
          • pd: Discovered within the last 24 hours.
          • pw: Discovered within the last 7 Days.
          • pm: Discovered within the last 31 Days.
          • py: Discovered within the last 365 Days
          • YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
  • 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 50, default 10)
  • 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)
      • offset (number, optional, default 0): The zero-based offset for pagination (max 9)
      • freshness (enum, optional): Filters search results by when they were discovered
        • The following values are supported
          • pd: Discovered within the last 24 hours.
          • pw: Discovered within the last 7 Days.
          • pm: Discovered within the last 31 Days.
          • py: Discovered within the last 365 Days
          • YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
  • brave_local_search

    • Search for local businesses, services and points of interest
    • Falls back to brave_web_search on the initial page 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)
      • offset (number, optional, default 0): The zero-based offset for pagination (max 9)
  • 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)
      • offset (number, optional, default 0): The zero-based offset for pagination (max 9)
      • freshness (enum, optional): Filters search results by when they were discovered
        • The following values are supported
          • pd: Discovered within the last 24 hours.
          • pw: Discovered within the last 7 Days.
          • pm: Discovered within the last 31 Days.
          • py: Discovered within the last 365 Days
          • YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)
  • brave_llm_context_search

    • Pre-extracted web content optimized for AI agents, LLM grounding, and RAG pipelines.
    • Uses Brave's balanced context threshold mode in compact mode and disables Brave relevance filtering in full mode.
    • Inputs:
      • query (string): The search query. Maximum 400 characters and 50 words.
      • url (string, optional): Optional URL to target. When provided, query and URL are combined for retrieval and only snippets from this exact URL are returned.
      • count (number, optional, default 8): The maximum number of search results considered. Minimum 1, maximum 50.
      • maximumNumberOfUrls (number, optional, default 8): The maximum number of URLs to include in the response. Minimum 1, maximum 50.
      • maximumNumberOfTokens (number, optional, default 2048): The approximate maximum number of tokens in the returned context. Minimum 1024, maximum 32768.
      • maximumNumberOfSnippets (number, optional, default 16): The maximum number of snippets across all URLs. Minimum 1, maximum 100.
      • maximumNumberOfTokensPerUrl (number, optional, default 512): The maximum number of tokens per URL. Minimum 512, maximum 8192.
      • maximumNumberOfSnippetsPerUrl (number, optional, default 2): The maximum number of snippets per URL. Minimum 1, maximum 100.
      • responseMode (enum, optional, default compact): compact applies Brave's balanced relevance filtering plus local snippet filtering/truncation. full disables Brave's relevance filtering and returns raw snippets without local filtering or truncation.
      • maxSnippetChars (number, optional, default 400): Maximum characters per snippet in compact mode. Minimum 80, maximum 4000.
      • maxOutputChars (number, optional, default 8000): Approximate maximum serialized response size in compact mode. Minimum 1000, maximum 100000.

OpenAI Apps & MCP Apps Support

There is now support for OpenAI Apps and MCP Apps in this MCP Server. When UI mode is enabled for each tool there is a corresponding UI widget that let's you control what gets added to the model's context. See the directions in usage with ChatGPT section.

Configuration

Getting an API Key

  1. Sign up for a Brave Search API account
  2. Choose a plan
  3. Generate your API key from the developer dashboard

Runtime modes

By default the MCP server runs in stdio mode.

bash
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp

To enable Streamable HTTP mode:

bash
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http

By default the server listens on port 3001. The URL is:

http://0.0.0.0:3001/mcp

There are two configuration modes:

  • Env mode: BRAVE_MCP_CONFIG is unset. Feature toggles come from environment variables exactly as in previous releases.
  • File mode: BRAVE_MCP_CONFIG=/path/to/config.toml is set. The TOML file becomes the single source of truth for feature settings, and overlapping feature env vars are ignored with warnings.

Environment-only settings

These settings are always read from the process environment, regardless of mode:

  • BRAVE_API_KEY (required): Brave Search API key.
  • PORT (optional): HTTP port (default: 3001).
  • HOST (optional): Interface to bind to (default: 0.0.0.0).
  • BRAVE_MCP_CONFIG (optional): Absolute or relative path to a TOML config file for feature settings.

Env mode feature settings

When BRAVE_MCP_CONFIG is not set, these feature env vars are supported:

  • ALLOWED_HOSTS (HTTP mode only): Comma-separated list of allowed hostnames for Host header validation.
    • Example: ALLOWED_HOSTS=localhost,127.0.0.1,my-app.ngrok-free.app
    • Use hostnames only (no scheme/path), e.g. my-app.ngrok-free.app not https://my-app.ngrok-free.app/mcp
  • BRAVE_MCP_POLICY_FILE: JSON policy file path.
  • BRAVE_MCP_POLICY_REDACT: true to redact matched text instead of blocking it.
  • BRAVE_MCP_REQUEST_LIMIT: Positive integer request cap.
  • BRAVE_MCP_WINDOW_SECONDS: Non-negative integer rolling window size.
  • BRAVE_MCP_COOLDOWN_SECONDS: Non-negative integer cooldown after the limit is exceeded.
  • BRAVE_MCP_AUDIT_LOG: true to emit audit logs.
  • BRAVE_MCP_AUDIT_LOG_RAW: true to include raw query text in audit logs.
  • BRAVE_MCP_REQUIRE_JUSTIFICATION: true to reject tool calls without a justification string.

Examples:

bash
# Local only
HOST=127.0.0.1 ALLOWED_HOSTS=localhost,127.0.0.1 BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http
bash
# Local with ngrok tunnel
HOST=127.0.0.1 ALLOWED_HOSTS=localhost,127.0.0.1,my-app.ngrok-free.app BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http --ui

File mode (BRAVE_MCP_CONFIG)

When BRAVE_MCP_CONFIG is set, the file controls feature configuration, including the HTTP host allowlist.

toml
[auth]
httpApiKey = "sk-..."
requireAuth = true
callerId = "team-a"

[auth.jwt]
jwksUri = "https://idp.example.com/.well-known/jwks.json"
audience = "brave-search-mcp"
clockSkewSeconds = 30

[auth.oauth]
issuer = "https://idp.example.com"
audience = "brave-search-mcp"
clientId = "client-123"
clientSecret = "super-secret"
verifyStrategy = "jwks"

[audit]
enabled = true
logRaw = false
hmacSecret = "audit-secret"

[policy]
file = "/etc/brave-mcp/policy.json"
redact = false

[guardrail]
requestLimit = 100
windowSeconds = 60
cooldownSeconds = 10
requireJustification = false

[server]
allowedHosts = [
  "localhost",
  "127.0.0.1",
  "my-app.ngrok-free.app",
]

Notes:

  • BRAVE_API_KEY, PORT, and HOST remain environment-only even in file mode.
  • If you set overlapping feature env vars such as BRAVE_MCP_REQUEST_LIMIT or ALLOWED_HOSTS alongside BRAVE_MCP_CONFIG, startup warns that they are being ignored.
  • Unknown TOML keys also emit warnings so typos like [guardrails] are visible before you debug runtime behavior.

To validate a config file without starting the server, use the packaged entrypoint after building the app workspace:

bash
pnpm -C apps/brave-search-mcp run build
node apps/brave-search-mcp/dist/index.js --check-config ./apps/brave-search-mcp/test/fixtures/config.valid.toml

To run the built local entrypoint in file mode:

bash
pnpm -C apps/brave-search-mcp run build
BRAVE_API_KEY="your_key_here" BRAVE_MCP_CONFIG="$PWD/apps/brave-search-mcp/test/fixtures/config.valid.toml" node apps/brave-search-mcp/dist/index.js --http

Usage with ChatGPT

The Brave Search MCP Server can be used with the web UI of ChatGPT. It takes a few steps.

1. Enable Developer Mode in ChatGPT

Settings → Apps → Advanced settings → Developer mode

Additional instructions here

2. Run the Brave Search MCP in HTTP mode and UI mode

bash
BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http --ui

3. Create a local tunnel to expose the MCP Server to ChatGPT

Sign up and configure ngrok, the free plan works.

bash
ngrok http 3001

Take note of the forwarding URL.

bash
...
Forwarding                    https://john-joe-asdf.ngrok-free.dev -> http://localhost:3001
...

4. Add Brave Search MCP as a Connector to ChatGPT

Open ChatGPT Apps settings

Click Apps

Click Create Apps

Fill out the form using the URL from step 3 as the MCP Server URL, but add /mcp.

https://john-joe-asdf.ngrok-free.dev/mcp

For Authentication, select 'No Auth'

Tick the checkbox for 'I understand and want to continue'

Then click Create.

5. Using the Brave Search MCP Server

In the ChatGPT UI, click the '+' button, scroll to '...more', select the newly created Brave Search app, and enter your query.

Usage with Claude Code

For Claude Code users, run this command:

Windows:

bash
claude mcp add-json brave-search '{"command":"cmd","args":["/c","npx","-y","brave-search-mcp"],"env":{"BRAVE_API_KEY":"YOUR_API_KEY_HERE"}}'

Linux/macOS:

bash
claude mcp add-json brave-search '{"command":"npx","args":["-y","brave-search-mcp"],"env":{"BRAVE_API_KEY":"YOUR_API_KEY_HERE"}}'

Replace YOUR_API_KEY_HERE with your actual Brave Search API key.

Usage with Claude Desktop

MCP Bundle (MCPB)

  1. Download the mcpb file from the Releases
  2. Open it with Claude Desktop or Go to File -> Settings -> Extensions and drag the .mcpb file to the window to install it

Docker

  1. Clone the repo
  2. Build the image from the repo root
bash
docker build -t brave-search-mcp:latest -f apps/brave-search-mcp/Dockerfile .
  1. Run it directly if you want HTTP mode:
bash
docker run --rm -p 3001:3001 -e BRAVE_API_KEY="YOUR_API_KEY_HERE" brave-search-mcp:latest --http
  1. Add this to your claude_desktop_config.json for stdio mode:
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:

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

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

Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, monorepo structure, and release instructions. For UI build workflow details, including the entrypoint orchestrator, see UI Build Orchestrator.

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.

Usa el MCP de Brave Search MCP con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado Brave Search MCP, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade Brave Search MCP como servidor

Cuando el estado del conector sea «Listo», haz clic en «Editar servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en «Editar servidores».
  3. Pega la configuración del servidor MCP de Brave Search MCP.
  4. Guarda la lista de servidores.
  5. Actualiza si quieres comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Editar servidores»
{
  "mcpServers": {
    "mikechao-brave-search-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la conexión con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de Brave Search MCP y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de Brave Search MCP.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar Brave Search MCP para ayudarme con esta tarea?
Brave Search MCP
Claro. Lo he leído.
Esto es lo que he encontrado con Brave Search MCP.

Preguntas frecuentes

¿Para qué sirve el servidor MCP Brave Search MCP?

Brave Search MCP es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas externas y acceder a información de contexto de fuentes externas. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP Brave Search MCP con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar Brave Search MCP con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el servidor MCP Brave Search MCP con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves API y herramientas MCP en un solo espacio de trabajo. Con Brave Search MCP conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu trabajo con los chats en TypingMind.

¿Cómo conecto el servidor MCP Brave Search MCP a TypingMind?

Brave Search MCP funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP Brave Search MCP en TypingMind?

Brave Search MCP ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves API con TypingMind para usar el servidor MCP Brave Search MCP?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves API, prompts y configuración MCP. Si Brave Search MCP requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇