Braintrust MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Braintrust MCP or direct API to query logs, run evaluations, manage prompts, and update datasets through natural language.

Braintrust MCP logoBraintrust MCP
Dcr Oauth

Braintrust MCP is a hosted Model Context Protocol server for Braintrust observability and evaluation data. It gives agents a secure, structured way to work with logs, evals, prompts, datasets, and alerts.

60 Tools

Try Braintrust MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Braintrust MCP
Try asking
TOOLS

Supported Tools

Every Braintrust MCP action and event your agent gets out of the box.

Add to dataset

Add up to 1000 project log rows to a Braintrust dataset by row ID, like the UI's "Add to dataset", without reading and re-sending their contents.

Add to human review queue

Add existing project log traces, experiment traces, or dataset rows to Human Review, optionally assigning individual reviewers.

Create dashboard sql

Create a project-scoped dashboard, optionally containing SQL charts that were already previewed with generate_dashboard_chart_sql.

Create environment update alert

Create an alert for environment updates.

Create evaluator

Create a versioned Braintrust LLM or inline code evaluator.

Create facet

Create a versioned Braintrust facet that extracts structured information from spans or traces.

Create human review score

Create a native Human Review score definition for a project: categorical choices, a numeric slider, or a free-form text field such as Review notes.

Create log alert

Create an alert for individual matching project logs.

Create preprocessor

Create a versioned Braintrust preprocessor from inline JavaScript using the same QuickJS runtime as the Braintrust UI.

Create prompt

Create a versioned Braintrust prompt using the same function representation as project.prompts.create() and bt functions push.

Create protected field rule

Add a protected field rule to a scope's policy, creating the policy if needed.

Create scheduled loop job

Create a custom Loop job that runs on an interval or cron schedule over a recent project-data window.

Create threshold alert

Create a threshold alert for an aggregate over a recent project-data window.

Delete protected field rule

Delete a protected field rule by id.

Edit dataset rows

Insert, update, or delete up to 1000 Braintrust dataset rows using explicit operations.

Enable topics automation

Enable Topics for a Braintrust project.

Fail dashboard section

Report a failure for a precomputed dashboard section using the target and revision from its computation request.

Generate dashboard chart sql

Generate a SQL-backed dashboard chart configuration for visualizing data from project_logs.

Generate permalink

Generate a direct web link (permalink) to a Braintrust object for sharing or bookmarking.

Get monitoring view

Inspect a saved Monitoring view, including its options and ordered chart definitions.

Get project settings

Get Braintrust project settings, including the configured field paths in settings.user_id_fields and settings.session_id_fields.

Get protected field policy

Get the protected field policy and its rules for a scope.

Infer schema

Look up field paths and types when the query depends on an unknown field.

List automations

List a project's automations, including online scoring rules, alerts, exports, retention policies, Topics automations, and other automation kinds.

List dataset custom views

List up to 100 saved custom views for labeling dataset rows in a project, including each view's code and a link reviewers can open.

List monitoring views

List the saved Monitoring views and chart IDs for a project so the user can choose a view or chart to inspect or edit.

List recent objects

List recently created projects, experiments, datasets, prompts, or functions you have access to.

List scheduled loop job runs

List a saved scheduled Loop job's run threads, newest first, with thread IDs, names, and Braintrust links.

List slack channels

List the Slack workspaces connected to a project's org and the public channels in a workspace, so a Slack alert action targets the channel the user named instead of a guessed ID.

Load braintrust skill

Load a guide when the request matches the workflow or SDK task described below.

Lookup api keys

Look up Braintrust API keys and service tokens by exact IDs, exact name, or an explicit request to list all visible keys.

Lookup users

Look up human Braintrust organization members by exact user IDs, partial name or email, or an explicit request to list all users.

Measure pattern frequency

Measure distinct users, sessions, or traces matched by a pattern in one time window of up to 14 days.

Publish dashboard section

Publish one precomputed chart, Markdown note, or insight to a registered dashboard artifact target.

Read patterns rubric

Read the project's Patterns rubric, which defines how to assign pattern severity and categories.

Resolve attachments

Resolve one attachment reference or a batch from sql_query results into temporary download URLs.

Resolve object

Convert names to IDs (or vice versa) and parse Braintrust URLs.

Rewind topics automation

Rewind an existing Topics automation to process historical data from an explicit start time or recent window.

Run eval

Run a Braintrust experiment through the authenticated Eval API with a hosted dataset, inline rows, or a prior experiment, any saved or inline functional task, and zero or more saved or inline scorers.

Run scheduled loop job

Run a saved active scheduled Loop job using the same execution path as Run now in Braintrust.

Save dataset custom view

Create or update a versioned custom view that reviewers use to label rows of a dataset.

Search docs

Search Braintrust documentation to find relevant information and guidance.

Search patterns

Search existing patterns in a project by text, semantic similarity, ID, status, or quality.

Send feedback

Send feedback to the Braintrust team about a problem with this MCP server, such as a missing capability, a tool error that looks like a server bug, malformed or inconsistent output, or parameters that are confusing or rejected despite matching the schema.

Set automation status

Pause or activate an alert, scheduled job, or online scoring rule.

Set project default preprocessor

Set or clear the default preprocessor for a Braintrust project.

Set project session id field

Configure the project's session or conversation ID field and create its bloom index.

Set project user id field

Configure the project's derived end-user ID field and create its bloom index.

Set topics automation

Update an existing Topics automation's configuration.

Sql query

Run one read-only Braintrust SQL (BTQL) query.

Summarize experiment

Get aggregated performance metrics for an experiment, optionally compared to a baseline.

Test evaluator

Run one saved, global, or inline evaluator on representative inputs without writing results.

Test facet on trace

Run an inline facet definition with a saved, global, inline, or project-default preprocessor on one to ten canonical span, trace, or group references concurrently using the same preview path as the Braintrust UI.

Test preprocessor on trace

Run a saved, global, or inline preprocessor on one to 50 canonical span, trace, or group references concurrently using the same preview path as the Braintrust UI.

Unpin topic maps

Remove version pins from topic maps on an existing Topics automation so they classify new traffic with each topic map's latest version.

Update dashboard sql

Apply one or more SQL chart or section edits to an existing project dashboard.

Update debug report

Save or replace the diagnosis report for one trace.

Update online scoring rule

Save or rewind an online-scoring rule that runs saved evaluator functions.

Update pattern

Update an existing project pattern's content, source review, status, quality, or feedback, and optionally attach quoted evidence to matching traces.

Update protected field rule

Update fields of an existing protected field rule by id.

SETUP GUIDE

Connect Braintrust MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["braintrust_mcp"],
  mcp: true,
});
Create a session scoped to Braintrust MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Query Braintrust logs for failed traces from the last 24 hours",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Braintrust MCP request
SETUP GUIDE

Connect Braintrust MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["braintrust_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Braintrust MCP
3

Run Braintrust MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Query Braintrust logs for failed traces from the last 24 hours" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Braintrust MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native Braintrust MCP Integration

  • Supports both Braintrust MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Braintrust MCP data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Braintrust MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Braintrust MCP
  • Scoped, least privilege access to Braintrust MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use Braintrust MCP with any AI Agent Framework

Choose a Framework you want to connect Braintrust MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Braintrust MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Braintrust MCP tool your agent needs.Free to start.

Start building