Setup
Install Cursor
If you haven’t already, download and install Cursor.
Install the extension
Install from the Cursor extension marketplace~~:~~
- Open Cursor.
- Go to Extensions (
Shift+Cmd+Xon macOS /Ctrl+Shift+Xon Windows/Linux). - Search for “Braintrust”.
- Click Install.
Set your API key
The extension reads your API key from the Then restart your terminal.
BRAINTRUST_API_KEY environment variable:Add Braintrust as a trusted domain
To allow the extension to authenticate without OAuth prompts:
- Open Cursor Settings (
Cmd+,on macOS /Ctrl+,on Windows/Linux) - Search for “trusted domains”
- Add
braintrust.devto the list of trusted domains
Usage
Once the extension is installed andBRAINTRUST_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
BRAINTRUST_API_KEY is not set
BRAINTRUST_API_KEY is not set
- Verify the variable is set:
echo $BRAINTRUST_API_KEY(macOS/Linux) orecho %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.
Extension doesn't seem to work
Extension doesn't seem to work
- 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
- Run evaluations: Check out the evaluation guide to learn evaluation patterns.
- Browse the source: The braintrust-cursor-extension repository contains the extension source code.