logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Brave Data Retrieval Conduit

This utility connects to the Brave Search Application Programming Interface, facilitating comprehensive information retrieval across the public internet and localized directories. As a search engine component, it processes user requests, similar to established systems indexing web content, providing a ranked list of relevant hyperlinks and concise summaries. Users can specify criteria, such as retrieving only recent news items or locating nearby points of interest, offering functional parity with major indexed information discovery platforms.

Author

Brave Data Retrieval Conduit logo

vinhphamai23

No License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 50744
Tools 1
Last Updated 2026-02-19

Tags

searchesapisearchsearch apibrave searchweb search

Introduction

This implementation serves as a Model Context Protocol (MCP) server, designed to interface with the Brave Search API. Its primary function mirrors that of a general search engine: processing user input to furnish indexed results from the World Wide Web. Information access through this means relies on continuous indexing, a hallmark of distributed computing systems responsible for mapping global data stores.

Core Capabilities

This module furnishes two distinct operational modes for querying external data sources.

  • Internet Query: Facilitates generalized requests for web content, news aggregation, and textual resources, supporting controls for result ordering and temporal relevance.
  • Geospatial Inquiry: Enables the location of specific establishments and local services, delivering detailed entries where available.
  • Refinement Controls: Allows callers to modulate output attributes, including result categorization, content suitability filters, and data currency.
  • Automated Persistence: Should the geospatial search fail to yield directory matches, the system transparently executes a broader web search.

Tool Definitions

  • brave_web_search

  • Used for executing broad internet lookups, incorporating pagination logic and result constraints.

  • Required Input Parameters:

    • query (string): The specific terms sought by the user.
    • count (number, optional): Defines the quantity of records returned per invocation (maximum limit is 20).
    • offset (number, optional): Governs which segment of the result set is retrieved for sequential viewing (maximum offset index is 9).
  • brave_local_search

  • Designed to locate physical businesses or service providers based on the input terms.
  • Required Input Parameters:
    • query (string): Descriptive identifiers for the intended local target.
    • count (number, optional): Sets the upper bound on the number of local entities returned (maximum limit is 20).
  • Note: This tool defaults to the general web index if local data sources yield no corresponding matches.

Configuration Procedure

Acquiring Authorization Credentials

  1. Register for an authorized key via the Brave Search API portal.
  2. Select an appropriate service tier; introductory access levels are often provided.
  3. Retrieve your unique API credential from the developer management console.

Deployment via Containerization

When initiating the service using Docker containers, ensure the necessary environmental variable containing your credential is passed correctly:

{
  "mcpServers": {
    "brave-search": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BRAVE_API_KEY",
        "mcp/brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Deployment via Node Package Execution

For direct execution using the Node Package eXecute utility, configure the environment as follows:

{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Integration Within Local Development Environments

For user environments like VS Code, configuration involves mapping the required API token input to the server launch command. This setup can be added to global settings or localized workspace configuration files, such as .vscode/mcp.json.

For instance, configuring the Docker execution pathway to utilize a secure input prompt for the key:

Docker Integration Schema

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave Search API Key",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "BRAVE_API_KEY",
          "mcp/brave-search"
        ],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}"
        }
      }
    }
  }
}

NPX Integration Schema

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "brave_api_key",
        "description": "Brave Search API Key",
        "password": true
      }
    ],
    "servers": {
      "brave-search": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-brave-search"],
        "env": {
          "BRAVE_API_KEY": "${input:brave_api_key}"
        }
      }
    }
  }
}

Build Artifact Generation

To create the necessary container image locally, use the following command structure:

docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .
  • Distributed Indexing Systems
  • Information Retrieval Theory
  • Web Crawling Mechanisms
  • Search Engine Optimization (SEO) Principles
  • Query Processing Latency

Extra Details

The efficacy of any search system, including those challenging established market leaders, hinges critically on the indexing process. These systems employ automated agents to traverse the network, gathering data from publicly accessible web servers. However, certain data repositories remain opaque to these automated discovery tools. Fine-tuning search parameters allows users to mimic the targeted result selection often performed when limiting searches to specific media types like visual media or published reports.

Conclusion

This Conduit provides a functional pathway for accessing indexed knowledge via the Brave infrastructure. By standardizing the interface, it ensures that complex web and local lookups translate into manageable queries within the protocol environment, supporting effective decision-making based on current external data.

See Also

`