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 - 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 l
Add this skill
npx mdskills install mikechao/brave-search-mcpClear setup and tool descriptions for web and local search via Brave API
1# Brave Search MCP Server23An MCP Server implementation that integrates the [Brave Search API](https://brave.com/search/api/), providing, Web Search, Local Points of Interest Search, Video Search, Image Search and News Search capabilities45<a href="https://glama.ai/mcp/servers/@mikechao/brave-search-mcp">6 <img width="380" height="200" src="https://glama.ai/mcp/servers/@mikechao/brave-search-mcp/badge" alt="Brave Search MCP server" />7</a>89## Features1011- **Web Search**: Perform a regular search on the web12- **Image Search**: Search the web for images.13- **News Search**: Search the web for news14- **Video Search**: Search the web for videos15- **Local Points of Interest Search**: Search for local physical locations, businesses, restaurants, services, etc1617## Tools1819- **brave_web_search**20 - Execute web searches using Brave's API21 - Inputs:22 - `query` (string): The term to search the internet for23 - `count` (number, optional): The number of results to return (max 20, default 10)24 - `offset` (number, optional, default 0): The offset for pagination25 - `freshness` (enum, optional): Filters search results by when they were discovered26 - The following values are supported27 - pd: Discovered within the last 24 hours.28 - pw: Discovered within the last 7 Days.29 - pm: Discovered within the last 31 Days.30 - py: Discovered within the last 365 Days31 - YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)3233- **brave_image_search**34 - Get images from the web relevant to the query35 - Inputs:36 - `query` (string): The term to search the internet for images of37 - `count` (number, optional): The number of images to return (max 50, default 10)3839- **brave_news_search**40 - Searches the web for news41 - Inputs:42 - `query` (string): The term to search the internet for news articles, trending topics, or recent events43 - `count` (number, optional): The number of results to return (max 20, default 10)44 - `offset` (number, optional, default 0): The zero-based offset for pagination (max 9)45 - `freshness` (enum, optional): Filters search results by when they were discovered46 - The following values are supported47 - pd: Discovered within the last 24 hours.48 - pw: Discovered within the last 7 Days.49 - pm: Discovered within the last 31 Days.50 - py: Discovered within the last 365 Days51 - YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)5253- **brave_local_search**54 - Search for local businesses, services and points of interest55 - **REQUIRES** subscription to the Pro api plan for location results56 - Falls back to brave_web_search if no location results are found57 - Inputs:58 - `query` (string): Local search term59 - `count` (number, optional): The number of results to return (max 20, default 5)60 - `offset` (number, optional, default 0): The zero-based offset for pagination (max 9)6162- **brave_video_search**63 - Search the web for videos64 - Inputs:65 - `query`: (string): The term to search for videos66 - `count`: (number, optional): The number of videos to return (max 20, default 10)67 - `offset` (number, optional, default 0): The zero-based offset for pagination (max 9)68 - `freshness` (enum, optional): Filters search results by when they were discovered69 - The following values are supported70 - pd: Discovered within the last 24 hours.71 - pw: Discovered within the last 7 Days.72 - pm: Discovered within the last 31 Days.73 - py: Discovered within the last 365 Days74 - YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)7576## OpenAI Apps & MCP Apps Support7778<p align="center">79 <a href="https://www.youtube.com/watch?v=Z5KiC00gBVE">80 <img src="https://img.youtube.com/vi/Z5KiC00gBVE/maxresdefault.jpg" alt="Watch the demo" width="80%">81 </a>82 <br>83 <a href="https://www.youtube.com/watch?v=Z5KiC00gBVE"><em>▶️ Click to watch the demo video</em></a>84</p>8586There is now support for [OpenAI Apps](https://developers.openai.com/apps-sdk/) and [MCP Apps](https://modelcontextprotocol.io/docs/extensions/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](#usage-with-chatgpt).8788## Configuration8990### Getting an API Key91921. Sign up for a [Brave Search API account](https://brave.com/search/api/)932. Choose a plan (Free tier available with 2,000 queries/month)943. Generate your API key [from the developer dashboard](https://api.search.brave.com/app/keys)9596### Streamable HTTP mode9798By default the MCP server runs in stdio mode.99100```bash101BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp102```103104To enable Streamable HTTP mode:105106```bash107BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http108```109110By default the server listens on port 3001.111The URL is:112113```114http://0.0.0.0:3001/mcp115```116117### Environment variables118119When running in HTTP mode, the following environment variables are supported:120121- `BRAVE_API_KEY` (required): Brave Search API key.122- `PORT` (optional): HTTP port (default: `3001`).123- `HOST` (optional): Interface to bind to (default: `0.0.0.0`).124- `ALLOWED_HOSTS` (optional): Comma-separated list of allowed hostnames for Host header validation.125 - Example: `ALLOWED_HOSTS=localhost,127.0.0.1,my-app.ngrok-free.app`126 - Use hostnames only (no scheme/path), e.g. `my-app.ngrok-free.app` not `https://my-app.ngrok-free.app/mcp`127128Examples:129130```bash131# Local only132HOST=127.0.0.1 ALLOWED_HOSTS=localhost,127.0.0.1 BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http133```134135```bash136# Local with ngrok tunnel137HOST=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 --ui138```139140### Usage with ChatGPT141142The Brave Search MCP Server can be used with the web UI of ChatGPT. It takes a few steps.143144#### 1. Enable Developer Mode in ChatGPT145146Settings → Apps → Advanced settings → Developer mode147148Additional instructions [here](https://platform.openai.com/docs/guides/developer-mode)149150#### 2. Run the Brave Search MCP in HTTP mode and UI mode151152```bash153BRAVE_API_KEY="your_key_here" npx -y brave-search-mcp --http --ui154```155156#### 3. Create a local tunnel to expose the MCP Server to ChatGPT157158Sign up and configure [ngrok](https://ngrok.com/), the free plan works.159160```bash161ngrok http 3001162```163164Take note of the forwarding URL.165166```bash167...168Forwarding https://john-joe-asdf.ngrok-free.dev -> http://localhost:3001169...170```171172#### 4. Add Brave Search MCP as a Connector to ChatGPT173174Open [ChatGPT Apps settings](https://chatgpt.com/#settings/Connectors)175176Click Apps177178Click Create Apps179180Fill out the form using the URL from step 3 as the MCP Server URL, but add `/mcp`.181182```183https://john-joe-asdf.ngrok-free.dev/mcp184```185186For Authentication, select 'No Auth'187188Tick the checkbox for 'I understand and want to continue'189190Then click Create.191192#### 5. Using the Brave Search MCP Server193194In the ChatGPT UI, click the '+' button, scroll to '...more', select the newly created Brave Search app, and enter your query.195196### Usage with Claude Code197198For [Claude Code](https://claude.ai/code) users, run this command:199200**Windows:**201202```bash203claude mcp add-json brave-search '{"command":"cmd","args":["/c","npx","-y","brave-search-mcp"],"env":{"BRAVE_API_KEY":"YOUR_API_KEY_HERE"}}'204```205206**Linux/macOS:**207208```bash209claude mcp add-json brave-search '{"command":"npx","args":["-y","brave-search-mcp"],"env":{"BRAVE_API_KEY":"YOUR_API_KEY_HERE"}}'210```211212Replace `YOUR_API_KEY_HERE` with your actual Brave Search API key.213214### Usage with Claude Desktop215216#### MCP Bundle (MCPB)2172181. Download the `mcpb` file from the [Releases](https://github.com/mikechao/brave-search-mcp/releases)2192. Open it with Claude Desktop220 or221 Go to File -> Settings -> Extensions and drag the .mcpb file to the window to install it222223#### Docker2242251. Clone the repo2262. Docker build227228```bash229docker build -t brave-search-mcp:latest -f ./Dockerfile .230```2312323. Add this to your `claude_desktop_config.json`:233234```json235{236 "mcp-servers": {237 "brave-search": {238 "command": "docker",239 "args": [240 "run",241 "-i",242 "--rm",243 "-e",244 "BRAVE_API_KEY",245 "brave-search-mcp"246 ],247 "env": {248 "BRAVE_API_KEY": "YOUR API KEY HERE"249 }250 }251 }252}253```254255#### NPX256257Add this to your `claude_desktop_config.json`:258259```json260{261 "mcp-servers": {262 "brave-search": {263 "command": "npx",264 "args": [265 "-y",266 "brave-search-mcp"267 ],268 "env": {269 "BRAVE_API_KEY": "YOUR API KEY HERE"270 }271 }272 }273}274```275276### Usage with LibreChat277278Add this to librechat.yaml279280```yaml281brave-search:282 command: sh283 args:284 - -c285 - BRAVE_API_KEY=API KEY npx -y brave-search-mcp286```287288## Contributing289290Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, monorepo structure, and release instructions.291292## Disclaimer293294This library is not officially associated with Brave Software. It is a third-party implementation of the Brave Search API with a MCP Server.295296## License297298This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.299
Full transparency — inspect the skill content before installing.