server-brave-search
server-brave-search: An MCP server connecting AI models to Brave Search API for web & local search.

server-brave-search Solution Overview
The server-brave-search
is an MCP server designed to seamlessly integrate Brave Search API functionalities into AI models, providing both web and local search capabilities. It empowers AI with tools like brave_web_search
for general queries, news, and articles, complete with pagination and freshness controls, and brave_local_search
for finding local businesses and services, with smart fallbacks to web search when needed.
This server addresses the developer need for reliable, up-to-date information retrieval, enabling AI models to access a vast index of web data and local business listings. By offering flexible filtering options, developers can fine-tune search results based on content type, safety levels, and freshness. Integrating this server is straightforward, requiring only a Brave Search API key and configuration within the MCP client, such as Claude Desktop, using Docker or NPX. This unlocks a wealth of information for AI models, enhancing their ability to provide informed and contextually relevant responses.
server-brave-search Key Capabilities
Web Search with Filtering
The server-brave-search
MCP server empowers AI models with comprehensive web search capabilities via the Brave Search API. This includes general web queries, access to news articles, and other relevant online content. The server allows for flexible filtering, enabling the AI to control the types of results returned, adjust safety levels to filter out inappropriate content, and specify the desired freshness of the information. Pagination controls are also available, allowing the AI to efficiently retrieve large datasets by specifying the number of results per page and the starting offset.
For example, an AI model tasked with summarizing recent developments in AI ethics could use this feature to query "AI ethics developments" with a high freshness setting to prioritize recent articles and a moderate safety level to avoid potentially biased or unreliable sources. The AI could then iterate through the results using pagination to gather a comprehensive overview. This ensures the AI has access to a wide range of information while maintaining control over the quality and relevance of the data.
Local Search with Fallback
This feature enables AI models to perform location-based searches for businesses, restaurants, and services using the Brave Search API. The server-brave-search
MCP server provides detailed information about local entities, such as addresses, phone numbers, operating hours, and user reviews. A key advantage is the smart fallback mechanism: if no local results are found for a given query, the server automatically defaults to a broader web search. This ensures that the AI model always receives relevant information, even when specific local data is unavailable.
Imagine an AI assistant helping a user find a nearby Italian restaurant. The AI could use the local search feature to identify restaurants in the user's vicinity. If no Italian restaurants are found within a certain radius, the server would automatically broaden the search to include other types of restaurants or related services, such as grocery stores selling Italian ingredients. This seamless fallback ensures a more robust and user-friendly experience.
API Key Management
The server-brave-search
MCP server simplifies the integration of the Brave Search API by providing a straightforward mechanism for managing API keys. Users can obtain an API key by signing up for a Brave Search API account and generating the key from the developer dashboard. The server then allows users to configure the API key through environment variables, ensuring secure and flexible deployment options. This approach avoids hardcoding the API key directly into the application, reducing the risk of accidental exposure and simplifying key rotation.
For example, when deploying the server using Docker, the API key can be passed as an environment variable using the -e BRAVE_API_KEY=YOUR_API_KEY_HERE
flag. Similarly, when using NPX, the API key can be set using the env
configuration option in the claude_desktop_config.json
file. This centralized management of the API key makes it easier to update and maintain the server configuration, especially in complex deployment environments.