
mcp server brave test
一个使用 Brave 搜索和 Anthropic Claude 实现的 MCP 协议服务器,支持搜索和对话功能。
Repository Info
About This Server
一个使用 Brave 搜索和 Anthropic Claude 实现的 MCP 协议服务器,支持搜索和对话功能。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Server with Brave Search and Anthropic Claude
This project is a Model Context Protocol (MCP) server that uses Brave Search for web search and Anthropic Claude for analysis and response generation.
Features
- 🔍 Web search via Brave Search API
- 🤖 Analysis and response generation with Claude 3 Sonnet
- 🌐 MCP-compliant server implementation
- 💬 Support for search and chat capabilities
Prerequisites
- Node.js (version 14 or higher)
- Brave Search API key
- Anthropic API key
Installation
- Clone the repository:
git clone <your-repo>
cd mcp-server-brave-test
- Install dependencies:
npm install
- Create a
.envfile in the root directory with your API keys:
ANTHROPIC_API_KEY=your_anthropic_api_key
BRAVE_SEARCH_API_KEY=your_brave_search_api_key
PORT=3000 # Optional, defaults to 3000
Usage
Starting the Server
To start the MCP server:
# First, build the project
npm run build
# Then start the server
npm start
The server will be available at http://localhost:3000
Using the Client
To use the MCP client:
# Make sure the server is running first
# Then in a new terminal, run:
npm run client
The client will automatically connect to the running server and start an interactive session.
MCP Endpoints
The server implements the following MCP capabilities:
Search Capability
POST /search
Content-Type: application/json
{
"query": "your search query"
}
Response:
{
"results": [
{
"title": "Result title",
"url": "https://example.com",
"description": "Result description"
}
]
}
Chat Capability
POST /chat
Content-Type: application/json
{
"message": "your question",
"context": {
"searchResults": [
{
"title": "Result title",
"url": "https://example.com",
"description": "Result description"
}
]
}
}
Response:
{
"response": "Claude's response based on the search results"
}
Development
- Build the project:
npm run build
- Start in development mode (with auto-reload):
npm run dev
Project Structure
mcp-server-brave-test/
├── src/
│ ├── mcpServer.ts # MCP server implementation
│ └── mcpClient.ts # MCP client implementation
├── dist/
│ ├── mcpServer.js # Compiled server
│ └── mcpClient.js # Compiled client
├── .env # Environment variables
├── package.json
└── tsconfig.json
License
ISC
Contributing
Contributions are welcome! Feel free to:
- Fork the project
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Quick Start
Clone the repository
git clone https://github.com/vinzlac/mcp-server-brave-testInstall dependencies
cd mcp-server-brave-test
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.