Integrates Brave Search API for real-time web information retrieval, dynamically categorizing queries to proactively fet...
Created byApr 23, 2025
MCP Web Search Tool
A powerful Model Context Protocol (MCP) server providing real-time web search capabilities through pluggable search providers. Currently integrated with the [Brave Search API](https://api-dashboard.search.brave.com/app/documentation/web-search/get-started).

Features
**Real-Time Information Access**: Enables AI assistants to retrieve up-to-date information from the web
**Pluggable Search Providers**: Modular architecture allows for easy switching between different search engines
**Structured Output Format**: Returns search results in a clean, consistent JSON format
**Smart Query Handling**: Automatically categorizes queries and provides AI assistants with context-aware guidance
Requirements
**Node.js**: v16.x or newer
**npm**: v7.x or newer
**Brave Search API Key**: Required for accessing the Brave Search API
Installation
**Clone the Repository**:
```bash
git clone https://github.com/gabrimatic/mcp-web-search-tool.git
cd mcp-web-search-tool
```
**Install Dependencies**:
```bash
npm install
```
**Configure Environment Variables**:
Create a `.env` file in the project root:
```
BRAVE_API_KEY=your_api_key_here
MAX_RESULTS=10 # Optional: Default is 10
REQUEST_TIMEOUT=10000 # Optional: Default is 10000ms
```
**Build the Project**:
```bash
npm run build
```
Usage
Starting the Server
Testing the Server
Integration with Claude Desktop App _(optional)_
One of the most exciting aspects of this project is its seamless integration with the Claude Desktop app. This integration allows users to ask Claude questions that require real-time information, and Claude will automatically use the web search tool to provide up-to-date answers.
Read more about the MCP Web Search Tool, its capabilities, and how it enhances AI-driven web search in our detailed Medium article:
[Deep Dive into MCP Web Search Tool](https://medium.com/@gabrimatic/introducing-mcp-web-search-tool-bridging-ai-assistants-to-real-time-web-information-5df9ab92ad02)