### NPX Installation for Brave MCP Server Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Shows a JSON configuration example for connecting the Brave Search MCP Server to Claude Desktop via NPX. This includes the command, arguments for running the package, and environment variable setup, with a placeholder for the API key. ```json { "mcpServers": { "brave-search": { "command": "npx", "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "http"], "env": { "BRAVE_API_KEY": "YOUR_API_KEY_HERE" } } } } ``` -------------------------------- ### Install Brave Search MCP Server via NPX in VS Code Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This configuration enables the installation of the Brave Search MCP Server using NPX within VS Code. It prompts for a Brave Search API Key, which is then passed as an environment variable. This method is suitable for quick local setup. ```json { "command": "npx", "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"], "env": { "BRAVE_API_KEY": "${input:brave-api-key}" } } ``` -------------------------------- ### Launch Smithery.ai Development Environment with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Starts the development environment for smithery.ai integration. This script likely sets up necessary services and configurations for local development related to smithery.ai. ```bash npm run smithery:dev ``` -------------------------------- ### Prepare Project (Format and Build) with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Executes both code formatting and building the project. This script is automatically run during `npm install` to ensure the project is in a clean and buildable state. ```bash npm run prepare ``` -------------------------------- ### Manual Docker Installation Configuration for VS Code Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This JSON snippet configures the manual installation of the Brave Search MCP Server using Docker within VS Code User Settings or a `.vscode/mcp.json` file. It defines the necessary inputs (Brave Search API Key) and the server configuration, including the Docker command and environment variables. ```json { "inputs": [ { "password": true, "id": "brave-api-key", "type": "promptString", "description": "Brave Search API Key" } ], "servers": { "brave-search": { "command": "docker", "args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"], "env": { "BRAVE_API_KEY": "${input:brave-api-key}" } } } } ``` -------------------------------- ### Manual NPX Installation Configuration for VS Code Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This JSON configuration sets up the manual installation of the Brave Search MCP Server using NPX within VS Code settings. It specifies the required Brave Search API Key input and configures the NPX command and environment variables for the server. ```json { "inputs": [ { "password": true, "id": "brave-api-key", "type": "promptString", "description": "Brave Search API Key" } ], "servers": { "brave-search-mcp-server": { "command": "npx", "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"], "env": { "BRAVE_API_KEY": "${input:brave-api-key}" } } } } ``` -------------------------------- ### Install Brave Search MCP Server via Docker in VS Code Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This configuration allows for the installation of the Brave Search MCP Server using Docker directly within VS Code. It requires a Brave Search API Key and uses the docker run command to start the server. Ensure Docker is installed and running. ```json { "command": "docker", "args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"], "env": { "BRAVE_API_KEY": "${input:brave-api-key}" } } ``` -------------------------------- ### Local Project Build using NPM Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md These npm commands are used for local development and building the Brave Search MCP Server. `npm install` installs project dependencies, and `npm run build` compiles the TypeScript code into JavaScript. ```bash npm install npm run build ``` -------------------------------- ### Start MCP Inspector for Testing Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This command starts the MCP Inspector to test the Brave Search MCP Server. Ensure the server is already running. You can specify HTTP transport mode by adding `--transport http` to the arguments in the Inspector UI. ```bash npx @modelcontextprotocol/inspector node dist/index.js ``` -------------------------------- ### Run Local Development with Docker Compose Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Starts the local development environment using Docker Compose. This command builds the Docker images if necessary and launches the defined services for the MCP server. ```bash docker-compose up --build ``` -------------------------------- ### Docker Installation for Brave MCP Server Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Provides a JSON configuration snippet for integrating the Brave Search MCP Server with Claude Desktop using Docker. It specifies the Docker command, arguments, and environment variables, including a placeholder for the API key. ```json { "mcpServers": { "brave-search": { "command": "docker", "args": ["run", "-i", "--rm", "-e", "BRAVE_API_KEY", "mcp/brave-search"], "env": { "BRAVE_API_KEY": "YOUR_API_KEY_HERE" } } } } ``` -------------------------------- ### Watch for Changes and Rebuild with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Starts a watcher process that monitors for changes in the project files and automatically rebuilds the project. This is useful during active development to get quick feedback on code modifications. ```bash npm run watch ``` -------------------------------- ### Run Brave Search MCP Server for MCP Inspector Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md These commands are used to build and run the Brave Search MCP Server for testing with the MCP Inspector. First, build the project using `npm run build`, then start the server with `node dist/index.js`. The default transport mode is STDIO. ```bash npm run build node dist/index.js ``` -------------------------------- ### Format Code with Prettier using npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Formats the project's code according to Prettier's rules. This script ensures consistent code style across the project. It relies on Prettier being installed as a dev dependency. ```bash npm run format ``` -------------------------------- ### Build Project for Smithery.ai with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Builds the project specifically for deployment or integration with smithery.ai. This may involve specific configurations or optimizations. ```bash npm run smithery:build ``` -------------------------------- ### Brave Search API Key Configuration Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Instructions on how to obtain an API key for the Brave Search API. It outlines the steps to sign up, choose a plan (Free or Pro), and generate the key from the developer dashboard. ```text 1. Sign up for a [Brave Search API account](https://brave.com/search/api/) 2. Choose a plan: - **Free**: 2,000 queries/month, basic web search - **Pro**: Enhanced features including local search, AI summaries, extra snippets 3. Generate your API key from the [developer dashboard](https://api-dashboard.search.brave.com/app/keys) ``` -------------------------------- ### Test Brave Search MCP Server with Claude Desktop Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This JSON configuration snippet shows how to set up the Brave Search MCP Server for testing with Claude Desktop. It defines a local server entry, specifying the command to run the compiled JavaScript file and the necessary environment variable for the API key. ```json { "mcpServers": { "brave-search-dev": { "command": "node", "args": ["C:\\GitHub\\brave-search-mcp-server\\dist\\index.js"], // Verify your path "env": { "BRAVE_API_KEY": "YOUR_API_KEY_HERE" } } } } ``` -------------------------------- ### Launch MCP Inspector with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Launches an instance of the MCP Inspector tool. This is a development utility for inspecting or debugging the MCP server components. ```bash npm run inspector ``` -------------------------------- ### Clone Brave Search MCP Server Repository Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This command clones the Brave Search MCP Server repository from GitHub to your local machine. After cloning, navigate into the project directory using the `cd` command. ```bash git clone https://github.com/brave/brave-search-mcp-server.git cd brave-search-mcp-server ``` -------------------------------- ### Brave MCP Server Command Line Options Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Details the command-line options available when running the Brave MCP Server. These options mirror many of the environment variables for server configuration and tool management. ```bash node dist/index.js [options] Options: --brave-api-key Brave API key --transport Transport type (default: stdio) --port HTTP server port (default: 8080) --host HTTP server host (default: 0.0.0.0) --logging-level Desired logging level (one of _debug_, _info_, _notice_, _warning_, _error_, _critical_, _alert_, or _emergency_) --enabled-tools Tools whitelist (only the specified tools will be enabled) --disabled-tools Tools blacklist (included tools will be disabled) ``` -------------------------------- ### Launch MCP Inspector for STDIO with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Launches an instance of the MCP Inspector, specifically configured to work with Standard Input/Output (STDIO). This is useful for debugging inter-process communication. ```bash npm run inspector:stdio ``` -------------------------------- ### Build Brave Search MCP Server Docker Image Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md This bash command builds a Docker image for the Brave Search MCP Server, tagging it as `mcp/brave-search:latest`. Ensure you are in the project directory containing the Dockerfile. ```bash docker build -t mcp/brave-search:latest . ``` -------------------------------- ### Build TypeScript Project with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Builds the TypeScript project using the npm build script. This command compiles the TypeScript code into JavaScript, preparing the project for deployment or further execution. ```bash npm run build ``` -------------------------------- ### Brave MCP Server Environment Variables Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Lists the environment variables supported by the Brave MCP Server for configuration. These include API key, transport mode, HTTP server settings, logging level, and tool enabling/disabling. ```text - `BRAVE_API_KEY`: Your Brave Search API key (required) - `BRAVE_MCP_TRANSPORT`: Transport mode ("http" or "stdio", default: "stdio") - `BRAVE_MCP_PORT`: HTTP server port (default: 8080) - `BRAVE_MCP_HOST`: HTTP server host (default: "0.0.0.0") - `BRAVE_MCP_LOG_LEVEL`: Desired logging level("debug", "info", "notice", "warning", "error", "critical", "alert", or "emergency", default: "info") - `BRAVE_MCP_ENABLED_TOOLS`: When used, specifies a whitelist for supported tools - `BRAVE_MCP_DISABLED_TOOLS`: When used, specifies a blacklist for supported tools ``` -------------------------------- ### Image Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Searches for images, fetching them directly and providing base64 encoding for immediate display. Offers content filtering and spell checking. ```APIDOC ## Image Search (`brave_image_search`) ### Description Searches for images with automatic fetching and base64 encoding for direct display. Version 2.x removes base64 data and provides a response object closer to the original Brave Search API response. ### Method POST (Assumed, as it's a tool/function call in an MCP server) ### Endpoint `/brave_image_search` ### Parameters #### Query Parameters - **query** (string) - Required - Search terms (max 400 chars, 50 words) - **country** (string) - Optional - Country code (default: "US") - **search_lang** (string) - Optional - Search language (default: "en") - **count** (number) - Optional - Results per page (1-200, default: 50) - **safesearch** (string) - Optional - Content filtering ("off", "strict", default: "strict") - **spellcheck** (boolean) - Optional - Enable spell checking (default: true) ### Request Example ```json { "query": "cute kittens", "count": 20, "safesearch": "off" } ``` ### Response #### Success Response (200) - **results** (array) - List of image search results. ``` -------------------------------- ### Video Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Searches for videos with comprehensive metadata and thumbnail information. Supports filtering by country, language, and freshness. ```APIDOC ## Video Search (`brave_video_search`) ### Description Searches for videos with comprehensive metadata and thumbnail information. Supports various parameters to refine video search queries. ### Method POST (Assumed, as it's a tool/function call in an MCP server) ### Endpoint `/brave_video_search` ### Parameters #### Query Parameters - **query** (string) - Required - Search terms (max 400 chars, 50 words) - **country** (string) - Optional - Country code (default: "US") - **search_lang** (string) - Optional - Search language (default: "en") - **ui_lang** (string) - Optional - UI language (default: "en-US") - **count** (number) - Optional - Results per page (1-50, default: 20) - **offset** (number) - Optional - Pagination offset (max 9, default: 0) - **spellcheck** (boolean) - Optional - Enable spell checking (default: true) - **safesearch** (string) - Optional - Content filtering ("off", "moderate", "strict", default: "moderate") - **freshness** (string) - Optional - Time filter ("pd", "pw", "pm", "py", or date range) ### Request Example ```json { "query": "how to learn python", "count": 10, "freshness": "pw" } ``` ### Response #### Success Response (200) - **results** (array) - List of video search results with metadata and thumbnails. ``` -------------------------------- ### Check Code Formatting with npm Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Checks if the project's code adheres to the defined formatting rules without modifying any files. This is typically used in CI/CD pipelines to enforce code style standards. ```bash npm run format:check ``` -------------------------------- ### Brave News Search Parameters Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Defines the parameters available for the Brave News Search functionality. It includes query, country, language settings, pagination, content filtering, and freshness controls. Some features like 'extra_snippets' are specific to Pro plans. ```text - `query` (string, required): Search terms (max 400 chars, 50 words) - `country` (string, optional): Country code (default: "US") - `search_lang` (string, optional): Search language (default: "en") - `ui_lang` (string, optional): UI language (default: "en-US") - `count` (number, optional): Results per page (1-50, default: 20) - `offset` (number, optional): Pagination offset (max 9, default: 0) - `spellcheck` (boolean, optional): Enable spell checking (default: true) - `safesearch` (string, optional): Content filtering ("off", "moderate", "strict", default: "moderate") - `freshness` (string, optional): Time filter (default: "pd" for last 24 hours) - `extra_snippets` (boolean, optional): Get additional excerpts (Pro plans only) - `goggles` (array, optional): Custom re-ranking definitions ``` -------------------------------- ### Brave Summarizer Search Parameters Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Specifies the parameters for the Brave Summarizer Search functionality. It requires a summary key obtained from a web search and offers options to include entity information and inline references. ```text - `key` (string, required): Summary key from web search results (use `summary: true` in web search) - `entity_info` (boolean, optional): Include entity information (default: false) - `inline_references` (boolean, optional): Add source URL references (default: false) ``` -------------------------------- ### News Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Searches for current news articles with freshness controls and breaking news indicators. ```APIDOC ## GET /brave_news_search ### Description Searches for current news articles with freshness controls and breaking news indicators. ### Method GET ### Endpoint /brave_news_search ### Parameters #### Query Parameters - **query** (string) - Required - Search terms (max 400 chars, 50 words) - **country** (string) - Optional - Country code (default: "US") - **search_lang** (string) - Optional - Search language (default: "en") - **ui_lang** (string) - Optional - UI language (default: "en-US") - **count** (number) - Optional - Results per page (1-50, default: 20) - **offset** (number) - Optional - Pagination offset (max 9, default: 0) - **spellcheck** (boolean) - Optional - Enable spell checking (default: true) - **safesearch** (string) - Optional - Content filtering ("off", "moderate", "strict", default: "moderate") - **freshness** (string) - Optional - Time filter (default: "pd" for last 24 hours) - **extra_snippets** (boolean) - Optional - Get additional excerpts (Pro plans only) - **goggles** (array) - Optional - Custom re-ranking definitions ### Request Example ```json { "query": "latest AI news", "freshness": "7d", "count": 10 } ``` ### Response #### Success Response (200) - **articles** (array) - List of news articles - **total_results** (number) - Total number of results found #### Response Example ```json { "articles": [ { "title": "Brave Search Unveils New AI Features", "url": "https://brave.com/news/ai-features", "published_at": "2023-10-27T10:00:00Z", "source": "Brave Blog" } ], "total_results": 50 } ``` ``` -------------------------------- ### Summarizer Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Generates AI-powered summaries from web search results using Brave's summarization API. ```APIDOC ## POST /brave_summarizer ### Description Generates AI-powered summaries from web search results using Brave's summarization API. First perform a web search with `summary: true`, then use the returned summary key with this tool. ### Method POST ### Endpoint /brave_summarizer ### Parameters #### Request Body - **key** (string) - Required - Summary key from web search results - **entity_info** (boolean) - Optional - Include entity information (default: false) - **inline_references** (boolean) - Optional - Add source URL references (default: false) ### Request Example ```json { "key": "summary_key_from_web_search", "entity_info": true, "inline_references": true } ``` ### Response #### Success Response (200) - **summary** (string) - The AI-generated summary - **entity_map** (object) - Entity information (if requested) - **references** (array) - Source URL references (if requested) #### Response Example ```json { "summary": "This is an AI-generated summary of the web search results.", "entity_map": { "Brave Search": "A privacy-focused search engine." }, "references": [ "https://brave.com/" ] } ``` ``` -------------------------------- ### Local Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Searches for local businesses and places with detailed information. It shares parameters with the web search but includes automatic location filtering. ```APIDOC ## Local Search (`brave_local_search`) ### Description Searches for local businesses and places with detailed information including ratings, hours, and AI-generated descriptions. Requires Pro plan for full capabilities. ### Method POST (Assumed, as it's a tool/function call in an MCP server) ### Endpoint `/brave_local_search` ### Parameters #### Query Parameters - **query** (string) - Required - Search terms (max 400 chars, 50 words) - **country** (string) - Optional - Country code (default: "US") - **search_lang** (string) - Optional - Search language (default: "en") - **ui_lang** (string) - Optional - UI language (default: "en-US") - **count** (number) - Optional - Results per page (1-20, default: 10) - **offset** (number) - Optional - Pagination offset (max 9, default: 0) - **safesearch** (string) - Optional - Content filtering ("off", "moderate", "strict", default: "moderate") - **freshness** (string) - Optional - Time filter ("pd", "pw", "pm", "py", or date range) - **text_decorations** (boolean) - Optional - Include highlighting markers (default: true) - **spellcheck** (boolean) - Optional - Enable spell checking (default: true) - **result_filter** (array) - Optional - Filter result types (default: ["web", "query", "locations"]) - **goggles** (array) - Optional - Custom re-ranking definitions - **units** (string) - Optional - Measurement units ("metric" or "imperial") - **extra_snippets** (boolean) - Optional - Get additional excerpts (Pro plans only) - **summary** (boolean) - Optional - Enable summary key generation for AI summarization **Note:** Automatically includes "web" and "locations" in `result_filter`. Requires Pro plan for full local search capabilities. Falls back to web search otherwise. ### Request Example ```json { "query": "best pizza downtown", "country": "US", "count": 3, "summary": true } ``` ### Response #### Success Response (200) - **results** (array) - List of local search results including business details. - **summary** (string, optional) - AI-generated summary of the search results. ``` -------------------------------- ### Web Search API Source: https://github.com/brave/brave-search-mcp-server/blob/main/README.md Performs comprehensive web searches with rich result types and advanced filtering options. Supports various parameters to refine search results. ```APIDOC ## Web Search (`brave_web_search`) ### Description Performs comprehensive web searches with rich result types and advanced filtering options. ### Method POST (Assumed, as it's a tool/function call in an MCP server) ### Endpoint `/brave_web_search` ### Parameters #### Query Parameters - **query** (string) - Required - Search terms (max 400 chars, 50 words) - **country** (string) - Optional - Country code (default: "US") - **search_lang** (string) - Optional - Search language (default: "en") - **ui_lang** (string) - Optional - UI language (default: "en-US") - **count** (number) - Optional - Results per page (1-20, default: 10) - **offset** (number) - Optional - Pagination offset (max 9, default: 0) - **safesearch** (string) - Optional - Content filtering ("off", "moderate", "strict", default: "moderate") - **freshness** (string) - Optional - Time filter ("pd", "pw", "pm", "py", or date range) - **text_decorations** (boolean) - Optional - Include highlighting markers (default: true) - **spellcheck** (boolean) - Optional - Enable spell checking (default: true) - **result_filter** (array) - Optional - Filter result types (default: ["web", "query"]) - **goggles** (array) - Optional - Custom re-ranking definitions - **units** (string) - Optional - Measurement units ("metric" or "imperial") - **extra_snippets** (boolean) - Optional - Get additional excerpts (Pro plans only) - **summary** (boolean) - Optional - Enable summary key generation for AI summarization ### Request Example ```json { "query": "latest AI developments", "country": "US", "count": 5, "safesearch": "moderate", "summary": true } ``` ### Response #### Success Response (200) - **results** (array) - List of search results. - **summary** (string, optional) - AI-generated summary of the search results. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.