> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# dbt

> Check dbt jobs, runs and the models they build from an investigation.

Connect the dbt platform as a [connector](https://docs.incident.io/nexus/extensions/connectors.md) to let incident.io's agents check jobs, runs, models and their lineage, so an investigation can see whether a failed or late dbt run is behind stale data.

dbt offers two ways in:

* **[MCP server](#connect-the-mcp-server)** Recommended: dbt maintains the tools, and you sign in with OAuth.
* **[HTTP API](#connect-the-http-api)**: dbt's Administrative API, for when you want to choose exactly which operations agents can call, or to connect with a token.

**What you'll need:**

* Your dbt account's access URL, such as `ab123.us1.dbt.com`. Copy it from **Account settings** in dbt.
* A dbt user with read access to the projects, jobs and runs agents should check.
* The **Manage Nexus sources** permission in incident.io.

## Connect the MCP server

dbt's [remote MCP server](https://docs.getdbt.com/docs/dbt-ai/setup-remote-mcp) runs on your account's access URL. Its OAuth sign-in is in beta on Starter, Enterprise and Enterprise+ plans, and calls run with the access of the dbt user who connects it.

1. From [Extensions](https://app.incident.io/~/nexus/extensions), add a connector and choose **MCP server**.
2. Leave network access as **Public internet**, and give the connector a display name such as `dbt`.
3. Enter `https://<access URL>/api/ai/v1/mcp/` as the server URL, and click **Check URL**. dbt also shows this as **MCP Endpoint URL** under **Account settings**.
4. Under **Authentication**, choose **OAuth**, click **Connect with OAuth** and sign in to dbt.
5. Review which tools are enabled and the connector's [default policy](https://docs.incident.io/nexus/extensions/connectors.md#default-policy), then save.

Which tools the server offers depends on your dbt plan, since some rely on the Discovery and Semantic Layer APIs.

## Connect the HTTP API

### Create a token

Use a service token with a read-only permission set, or a personal access token, which has the access of the user who creates it.

1. In dbt, go to **Account settings**, then **Service tokens**, and click **Create service token**.
2. Give it a name and an expiry, and add a read-only permission set such as **Job Viewer** or **Read-only**. Which permission sets you can choose depends on your plan.
3. Click **Save**, and copy the token. It's only shown once.

### Connect it in incident.io

1. From [Extensions](https://app.incident.io/~/nexus/extensions), add a connector and choose **HTTP API**.
2. Paste dbt's [API v2 OpenAPI document](https://raw.githubusercontent.com/dbt-labs/dbt-cloud-openapi-spec/master/openapi-v2.yaml), which covers jobs and runs. It describes the whole API, so you may want to trim it to the operations agents need.
3. Enter `https://<access URL>` as the base URL.
4. Under authentication, choose **Bearer token** and enter your token.
5. Test the connection, review which operations are enabled and the connector's [default policy](https://docs.incident.io/nexus/extensions/connectors.md#default-policy), then save.

See [Connectors](https://docs.incident.io/nexus/extensions/connectors.md#permissions) for how to control which tools agents can call, and from where.

## Pair it with a skill

Agents work best with a connector when it's paired with a [skill](https://docs.incident.io/nexus/extensions/plugins.md). For dbt, say which projects and jobs build which tables, how often each job should run, and which models feed the dashboards people check during incidents.
