Setup
Install Windsurf
If you haven’t already, install Windsurf.
Add the Braintrust MCP server
Edit Replace
~/.codeium/windsurf/mcp_config.json and add the Braintrust server:YOUR_BRAINTRUST_API_KEY with your actual API key.Usage
Once configured, Cascade (Windsurf’s AI assistant) can access Braintrust data through the MCP server. You can fetch experiment results, query logs, log data, and more. See MCP documentation for details. Example prompts to Cascade:- “Show me my recent Braintrust experiments”
- “Query the last 10 logged requests with errors”
- “What’s the average latency for the summarizer prompt today?”
- “Summarize my latest A/B test results”
Troubleshooting
MCP server not appearing
MCP server not appearing
- Verify the JSON configuration syntax is correct (no trailing commas, proper quotes)
- Check that the file path is exactly
~/.codeium/windsurf/mcp_config.json - Try restarting Windsurf completely
Authentication fails
Authentication fails
- Verify your API key is correct (no extra spaces or quotes)
- Ensure you can log into Braintrust in your browser
- Check that the
Authorizationheader is properly formatted
Connection errors
Connection errors
- Verify the URL is exactly
https://api.braintrust.dev/mcp(no trailing slash) - Check your internet connection
- Corporate networks may need to allowlist
api.braintrust.devand*.braintrust.dev
Configuration not loading
Configuration not loading
- Ensure the JSON file is valid (use a JSON validator)
- Check file permissions:
chmod 644 ~/.codeium/windsurf/mcp_config.json - Look for error messages in Windsurf’s developer console
Next steps
- Run evaluations: Check out the evaluation guide to learn evaluation patterns.
- Explore MCP tools: See the MCP documentation for all available commands.
- Query with SQL: Learn how to query with SQL for complex data analysis.