Adding MCP Servers from GitHub
This guide provides step-by-step instructions on how to use Bwat to build an existing MCP server from a GitHub repository.
Finding an MCP Server
There are several places to discover MCP servers online:
-
GitHub: Some of the most common repositories for MCP servers include:
-
Online directories: Several websites list available MCP servers, such as:
These directories allow sorting by criteria like downloads, date, stars, and use case. Each entry typically includes details on features, tools, and setup instructions.
Building with Bwat
Starting the Process
Provide Bwat with the necessary details:
- GitHub Repository URL: The link to the server's repository
- README.md Contents (Optional): Helps Bwat understand the server's purpose and configuration
Example Interaction
Here's an example of adding the Brave Search MCP server:
User: "Bwat, I want to add the MCP server for Brave browser control. Here's the GitHub link: 'https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search' Can you add it?"
Bwat: "OK. Cloning the repository to the MCP directory. It needs to be built since it has a 'package.json' file. Should I run 'npm run build'?"
User: "Yes, build it."
Bwat: "Build complete. This server requires a browser path. Where is your Brave browser executable located?"
User: "It's in '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser'."
Bwat: "OK. I've updated the server config with that path and added it to 'bwat_mcp_settings.json'. Anything else?"
User: "No, that's all. Let's test it."
Bwat: "Great! Starting the MCP Inspector to test the server connection. After that, we can try controlling the browser from Bwat."
Bwat's Actions
Based on your input, Bwat will:
- Clone the Repository: Copies the repository to your local machine, typically in your configured directory
- Adjust Configurations: You can guide Bwat to modify server settings
- Build the Server: Runs the appropriate build command (often
npm run build
) - Add Server to Settings: Updates
bwat_mcp_settings.json
with the new server configuration
Testing and Troubleshooting
- Test the Server: Once Bwat completes the build, verify that the server works as intended
- MCP Inspector: Use this tool to check the server's connection and functionality
Best Practices
- Learn the Basics: While Bwat simplifies setup, understanding the server's code, the MCP protocol, and configuration helps with troubleshooting and customization
- Provide Clear Instructions: Be specific when guiding Bwat through the process
- Thorough Testing: Test the server after installation to ensure proper functionality
- Version Control: Use Git or similar tools to track changes to the server's code
- Stay Updated: Keep MCP servers up to date for the latest features and security improvements
Brave Search MCP Server Example
The Brave Search MCP server provides these features:
- Web Search: General queries, news, articles, with pagination and freshness controls
- Local Search: Find businesses, restaurants, and services with detailed information
- Flexible Filtering: Control result types, safety levels, and content freshness
- Smart Fallbacks: Local search automatically falls back to web when no results are found
Configuration
To configure the Brave Search server:
- Sign up for a Brave Search API account (opens in a new tab)
- Choose a plan (Free tier available with 2,000 queries/month)
- Generate your API key from the developer dashboard (opens in a new tab)
Add this to your bwat_mcp_settings.json
:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
For Docker usage:
{
"mcpServers": {
"brave-search": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BRAVE_API_KEY",
"mcp/brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Build Commands
To build the Brave Search server:
docker build -t mcp/brave-search:latest -f src/brave-search/Dockerfile .