Skip to main content
Windsurf is Codeium’s AI-native IDE with deep AI integration. The Braintrust MCP server connects to Windsurf, giving its AI assistant (Cascade) access to your Braintrust projects, experiments, and logs.

Setup

1

Install Windsurf

If you haven’t already, install Windsurf.
2

Add the Braintrust MCP server

Edit ~/.codeium/windsurf/mcp_config.json and add the Braintrust server:
{
  "mcpServers": {
    "braintrust": {
      "serverUrl": "https://api.braintrust.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_BRAINTRUST_API_KEY"
      }
    }
  }
}
Replace YOUR_BRAINTRUST_API_KEY with your actual API key.
3

Restart Windsurf

Close and reopen Windsurf to load the new MCP server configuration.

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

  • 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
  • Verify your API key is correct (no extra spaces or quotes)
  • Ensure you can log into Braintrust in your browser
  • Check that the Authorization header is properly formatted
  • 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.dev and *.braintrust.dev
  • 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