A Model Context Protocol (MCP) server implementation for Brave Search API. This server enables AI applications and agents to perform privacy-focused web searches through the standardized MCP interface.
- Web Search: General web search with rich filtering and pagination
- Local Search: Find local businesses and services
- Image Search: Search for images with metadata
- Video Search: Search for video content
- News Search: Search for recent news articles
- Summarizer: Get AI-generated summaries for search queries
- Node.js 18 or higher
- A Brave Search API key (get one at https://brave.com/search/api/)
- Clone the repository:
git clone https://github.com/dshvvvshr/Prime-security.git
cd Prime-security- Install dependencies:
npm install- Create a
.envfile based on.env.example:
cp .env.example .env- Add your Brave Search API key to
.env:
BRAVE_API_KEY=your_api_key_here
- Build the project:
npm run buildStart the MCP server in STDIO mode (default):
npm startOr use the development mode with auto-reload:
npm run devSearch the web using Brave Search.
Parameters:
q(required): Search querycountry(optional): Country code (e.g., "US", "GB")search_lang(optional): Search language (e.g., "en", "es")count(optional): Number of results (1-20)offset(optional): Pagination offsetsafesearch(optional): Safe search level ("off", "moderate", "strict")freshness(optional): Time filter ("pd" = past day, "pw" = past week, "pm" = past month, "py" = past year)
Search for local businesses and places.
Parameters:
q(required): Search querycount(optional): Number of results (1-20)
Search for images.
Parameters:
q(required): Search querycount(optional): Number of results (1-150)safesearch(optional): Safe search level
Search for videos.
Parameters:
q(required): Search querycount(optional): Number of results (1-20)safesearch(optional): Safe search level
Search for news articles.
Parameters:
q(required): Search querycount(optional): Number of results (1-20)freshness(optional): Time filter
Get AI-generated summaries.
Parameters:
key(required): Summarizer key or search queryentity_info(optional): Include entity information
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"brave-search": {
"command": "node",
"args": ["/path/to/Prime-security/dist/index.js"],
"env": {
"BRAVE_API_KEY": "your_api_key_here"
}
}
}
}This server uses STDIO transport and can be integrated with any MCP-compatible client. Refer to your client's documentation for specific integration instructions.
Brave Search API has the following rate limits:
- Free Tier: 1 request/second, 2,000 queries/month
- Base Tier: Higher limits available
- Pro/Enterprise: Custom limits
This implementation uses Brave Search, which is privacy-focused and does not track users or build search profiles.
Prime-security/
├── src/
│ ├── index.ts # Main server entry point
│ ├── config.ts # Configuration management
│ ├── brave-api.ts # Brave API client
│ └── tools/ # Tool implementations
│ ├── web-search.ts
│ ├── local-search.ts
│ ├── image-search.ts
│ ├── video-search.ts
│ ├── news-search.ts
│ └── summarizer.ts
├── package.json
├── tsconfig.json
└── README.md
npm run buildnpm run devMIT
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions:
- Open an issue on GitHub
- Check the Brave Search API documentation: https://brave.com/search/api/
- Built on the Model Context Protocol
- Powered by Brave Search API