# dbt Cloud — Pipedream Connect

> dbt is an intuitive, collaborative platform that lets you reliably transform data using SQL and Python code.

- API slug: `dbt` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Infrastructure & Cloud
- Website: https://www.getdbt.com/
- This page (HTML): https://pipedream.com/apps/dbt
- Tools: 5 actions · 4 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: dbt`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "dbt",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Get Environment:
const result = await mcp.callTool({
  name: "dbt-get-environment",
  arguments: {
    accountId: "Account",
    projectId: "Project",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "dbt-get-environment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    dbt: { authProvisionId: "apn_xxxxxxx" },
    accountId: "Account",
    projectId: "Project",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (5)

### `dbt-get-environment` — Get Environment (Read-only)

Retrieve information about an environment. See the documentation

Full schema: https://pipedream.com/apps/dbt/actions/get-environment.md

### `dbt-get-run` — Get Run (Read-only)

Retrieve information about a run. See the documentation

Full schema: https://pipedream.com/apps/dbt/actions/get-run.md

### `dbt-get-run-artifact` — Get Run Artifact (Read-only)

Retrieve information about a run artifact. See the documentation

Full schema: https://pipedream.com/apps/dbt/actions/get-run-artifact.md

### `dbt-list-account-id-options` — List Account Options (Read-only)

Retrieves available options for the Account field.

Full schema: https://pipedream.com/apps/dbt/actions/list-account-id-options.md

### `dbt-trigger-job-run` — Trigger Job Run (Write)

Trigger a specified job to begin running. See the documentation

Full schema: https://pipedream.com/apps/dbt/actions/trigger-job-run.md

## Triggers (4)

### `dbt-job-run-completed` — Job Run Completed (Instant) (Instant)

Emit new event when a job run has completed.

Full schema: https://pipedream.com/apps/dbt/triggers/job-run-completed.md

### `dbt-job-run-errored` — Job Run Errored (Instant) (Instant)

Emit new event when a job run has errored.

Full schema: https://pipedream.com/apps/dbt/triggers/job-run-errored.md

### `dbt-job-run-started` — Job Run Started (Instant) (Instant)

Emit new event when a job run has started.

Full schema: https://pipedream.com/apps/dbt/triggers/job-run-started.md

### `dbt-new-job-run-event` — New Job Run Event (Instant) (Instant)

Emit new event when a job run has started, errored, or completed.

Full schema: https://pipedream.com/apps/dbt/triggers/new-job-run-event.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
