The Claude Desktop configuration file resides at:
~/Library/Application Support/Claude/claude_desktop_config.json
Open the file in your editor:
code ~/Library/Application\\ Support/Claude/claude_desktop_config.json
Insert or merge the following configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/richardhightower/src",
"/Users/richardhightower/clients"
]
},
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
This configuration step is crucial for enabling the Brave Search MCP integration with Claude Desktop. The JSON configuration file specifies how Claude Desktop should interact with the Brave Search service, including the necessary command-line arguments and environment variables.
After adding or modifying this configuration, it’s essential to completely restart Claude Desktop for the changes to take effect. Simply closing and reopening the application window is not sufficient — you must fully quit Claude Desktop (using ⌘+Q on macOS or the equivalent on your operating system) and then relaunch it.
The restart allows Claude Desktop to properly initialize the MCP servers with the new configuration and establish the necessary connections for the Brave Search integration to function.
Remember, replace YOUR_API_KEY_HERE with the API key obtained in Step 1.
If starting from scratch, use:
cat > ~/Library/Application\\ Support/Claude/claude_desktop_config.json << 'EOL'
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
EOL
The alternate approach shown above uses the Unix/Linux cat command with a “here document” (heredoc) to create the configuration file in one step. This method is particularly useful when setting up the configuration for the first time, as it creates the entire file structure at once without needing to manually edit an existing file.
The heredoc syntax (<< 'EOL') allows you to input multiple lines of text until the delimiter (EOL) is reached. The single quotes around EOL prevent variable expansion, ensuring the configuration is written exactly as specified.
This command will create the configuration file in the correct location with the proper JSON structure. Remember to replace YOUR_API_KEY_HERE with your actual Brave Search API key before running the command.

