With a coding agent, you can write and ship code quickly. But to improve what you're building, you need to incorporate evidence from production, like what's failing, which patterns keep coming up, and whether your evals are looking good.
The Braintrust Model Context Protocol (MCP) server connects the coding agent you already use to the production traces, experiments, datasets, prompts, scorers, and project configuration in your Braintrust organization. The MCP can create and test evaluators, build datasets, run evals, configure Topics, build monitor views, and set up alerts without moving data between tools or sharing context manually. Move from investigating a problem to acting on what it finds, all from your terminal.
Suppose a product support chatbot starts returning claims about your product that are untrue. You can ask your coding agent to:
Each step is connected to the underlying Braintrust objects. In your terminal, you'll get permalinks to inspect and share the traces, datasets, scorers, and experiments it creates.
Large SQL query results can be returned through a signed URL instead of being placed in the model context. This lets your agent work with production-scale results without filling its context window.
Query experiments, datasets, and production logs with Braintrust SQL. Your agent can infer schemas, inspect common field values, summarize an experiment, and compare results with a baseline.
Example prompts:
Create versioned prompts and evaluators, test evaluators against representative traces, edit datasets, and run evals. Evaluators can return numeric scores or categorical classifications.
Example prompts:
Running an eval may execute code or call an AI provider, so it can incur compute and model usage. Dataset deletions are permanent and should be reviewed before approval.
Your coding agent can configure Topics, build monitor views, and manage automations from the same conversation it uses to investigate production behavior.
For Topics, it can create and test preprocessors and facets against real traces, enable Topics for new traffic, and process historical data with a rewind. For monitoring, it can preview charts and create or update saved views. It can also configure alerts for matching logs, environment changes, and thresholds over recent project data, or schedule recurring investigations.
Example prompts:
Ask your coding agent to:
Install the Braintrust SDK and add tracing to my app.
The agent can identify the language and frameworks in your project, install the appropriate SDK, configure auto-instrumentation, run the application, verify that traces reach Braintrust, and provide a permalink to view them.
Installation guidance is available for Python, TypeScript, Go, Java, Ruby, and C#.
Search Braintrust documentation without leaving your coding agent. Braintrust MCP also includes workflow skills for Topics, evaluators, and automations.
Tools define what an agent can do. Skills provide the sequence, validation steps, and decision points needed to complete the work reliably. Additional resources cover SDK installation, SQL, URL formats, and experiments.
MCP connects Braintrust directly to an AI tool, while the CLI makes Braintrust available inside a shell. Choose between them based on what your AI tool can access and where the workflow needs to run.
Use MCP when your AI tool can connect to Braintrust but does not have access to an authenticated shell, as is often the case with chat applications. It's a good fit when you want an agent to reason over Braintrust data and take several connected actions in a conversation without installing and maintaining the bt CLI in its execution environment.
For repeatable work in scripts, CI, local files, and shell pipelines, use the Braintrust CLI. The bt CLI provides deterministic commands for instrumentation, data syncing, and eval execution. Coding agents with shell access can call those commands too.
If your AI tool supports both, either can work. Choose the interface that is more reliable and efficient for the task and best fits where the workflow needs to run.
Braintrust MCP works with Claude Code, Codex, Cursor, and other MCP-compatible clients.
The server uses streamable HTTP and supports API key and OAuth 2.0 authentication. Write tools use the permissions of the authenticated Braintrust account. Configure your MCP client to require confirmation before it runs write operations.
Organizations on the US data plane connect to https://api.braintrust.dev/mcp.
Organizations on the EU data plane use https://api-eu.braintrust.dev/mcp. Self-hosted organizations can use the MCP URL shown in their data plane settings.
Connect your preferred coding agent with the Braintrust MCP setup guide. If you need more help for your specific use case, book a demo.