Quick Configuration
Choose the setup that matches your environment.
Before You Start
- Confirm you have the account, endpoint, or API key required for Brave Search.
- Start with minimum scopes and read-only access where possible.
- Keep secrets in environment variables instead of hardcoding them in JSON.
Last verified: 2026-04-27
Environment: Node.js 22, @brave/brave-search-mcp-server over stdio
Install command:
npx -y @brave/brave-search-mcp-server --transport stdioLocal config
JSON Local config json
{
"brave-search": {
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}"
}
}
} Verify prompt
Search the web for "Model Context Protocol official docs" and return the top 3 official-looking sources.
Expected success output
You should see web results with titles, URLs, and snippets from Brave Search.
Common Pitfalls & Fixes
- ⚠️ Watch out: API key signup and endpoint selection.
- 🔑 Always store API keys in environment variables, never hardcode them in JSON.
- 🛡️ Start with read-only scopes if available to verify connection safely.
Security checklist
- Keep BRAVE_API_KEY in an environment variable, not in committed JSON.
- Treat returned pages as untrusted web content and verify citations before taking action.
Common errors
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | BRAVE_API_KEY is missing or invalid. | Create a Brave Search API key and expose it as BRAVE_API_KEY before starting OpenClaw. |
Rate limit exceeded | The free quota or current plan limit was reached. | Wait for quota reset, reduce repeated searches, or upgrade the Brave Search API plan. |
No search results | The server started, but the query or selected tool returned no matches. | Try a broader query and confirm the API key has web search access enabled. |
Example Prompts
Once connected, try these prompts to test capabilities:
- Search the web for the latest MCP benchmarks and summarize the top 3 sources.
- Find a reliable source explaining Model Context Protocol.
- Collect three recent articles about AI tooling and summarize them.
Verification Checklist
- Run 1-2 real prompts to confirm Brave Search returns usable data.
- Check that error messages are clear enough for troubleshooting.
- Document the required scopes, dependencies, and env vars for future reuse.