Skip to main content
Cursor is an AI-powered code editor. The Braintrust extension for Cursor automatically connects to the Braintrust MCP server, giving Cursor’s AI assistant access to your Braintrust projects, experiments, and logs.

Setup

1

Install Cursor

If you haven’t already, download and install Cursor.
2

Install the extension

Install from the Cursor extension marketplace~~:~~
  1. Open Cursor.
  2. Go to Extensions (Shift+Cmd+X on macOS / Ctrl+Shift+X on Windows/Linux).
  3. Search for “Braintrust”.
  4. Click Install.
3

Set your API key

The extension reads your API key from the BRAINTRUST_API_KEY environment variable:
export BRAINTRUST_API_KEY="your-api-key-here"
Then restart your terminal.
4

Add Braintrust as a trusted domain

To allow the extension to authenticate without OAuth prompts:
  1. Open Cursor Settings (Cmd+, on macOS / Ctrl+, on Windows/Linux)
  2. Search for “trusted domains”
  3. Add braintrust.dev to the list of trusted domains
5

Restart Cursor

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

Usage

Once the extension is installed and BRAINTRUST_API_KEY is set, the Braintrust MCP server is automatically registered when Cursor starts. No manual steps required. You can fetch experiment results, query logs, log data, and more. See MCP documentation for details.

Troubleshooting

  • Verify the variable is set: echo $BRAINTRUST_API_KEY (macOS/Linux) or echo %BRAINTRUST_API_KEY% (Windows).
  • Cursor must be restarted after setting environment variables.
  • On macOS, launching Cursor from Spotlight or Dock may not inherit shell variables. Try launching from the terminal instead.
  • This extension only works in Cursor, not vanilla VS Code.
  • Ensure you’re running a recent version of Cursor that supports the MCP Extension API.

Next steps