Skip to main content
Back to the dbt Cloud MCP server

MCP Gateway · Codex

dbt Cloud icon

Connect dbt Cloud to Codex

Pull requests against a dbt project can affect models, tests and dashboards far from the changed file. Through the Speakeasy MCP Gateway, Codex can read dbt Cloud lineage, exposures and test metadata while it reviews or writes changes. Speakeasy's hooks approve or refuse every prompt and dbt Cloud call before it executes, and a spend limit can stop Codex traffic when the budget runs out.

Category
Data & analytics
Tools
24
Authentication
API key
Codex
CLI and ChatGPT desktop app

Behind the MCP Gateway

Run dbt Cloud MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every dbt Cloud call inspected and logged.

Deploy on MCP Gateway

Set up

Add dbt Cloud to Codex in 4 steps

  1. 01

    Add dbt Cloud from the catalog

    An admin finds dbt Cloud in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    dbt Cloud authenticates with an API key. Enter it under Upstream headers in the install dialog, or later on the server's Settings tab. The key is stored on the server, sent with every upstream request, and never reaches anyone's client configuration.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use dbt Cloud

    Give teams the mcp:connect scope on the dbt Cloud server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds dbt Cloud to their gateway on the next call, and removing it takes it away.

  3. 03

    Connect Codex

    Add the gateway as an MCP server, then log in.

    Run the first command with your organization gateway URL.

    Run the second command to sign in.

    codex mcp add 'speakeasy' \
      --url 'https://<organization host>/mcp/gateway/<organization slug>'
    codex mcp login 'speakeasy'
  4. 04

    Sign in and use dbt Cloud from Codex

    The first time Codex connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    From then on, dbt Cloud's tools appear in Codex, limited to what the person's access allows, and every call lands in the gateway's tool logs.

To roll it out to a team, a ChatGPT workspace admin imports the plugin marketplace under Admin > Plugins and sets an installation policy per role. Imported plugins reach nobody until a policy is set.

Use cases

What Codex users do with dbt Cloud

Review a PR for downstream impact

When a pull request changes a model, Codex lists its downstream models and the exposures that depend on them, and notes which dashboards or apps could be affected.

get_model_childrenget_exposures

Add tests where they're missing

Codex reads a model's columns and the details of its existing tests, then proposes tests for the columns that have none.

get_model_detailsget_test_details

Check a snapshot or seed before editing

When a change touches a snapshot or seed, Codex fetches its metadata first to confirm how it's set up before editing the YAML.

get_snapshot_detailsget_seed_details

Tools

24 tools

Each dbt Cloud tool can be allowed or denied per team and role at the MCP Gateway before Codex sees it.

get_mart_models

Get the name and description of all mart models in the environment. A mart model is part of the presentation layer of the dbt project. It's where cleaned, transformed data is organized for consumption by end-users, like analysts, dashboards, or business tools.

get_all_models

Get the name and description of all dbt models in the environment.

get_model_details

Retrieves information about a specific dbt model, including compiled SQL, description, database, schema, alias, and column details.

get_model_parents

Retrieves the parent models of a specific dbt model. These are the models that the specified model depends on.

get_model_children

Retrieves the child models (downstream dependencies) of a specific dbt model. These are the models that depend on the specified model.

get_model_health

Retrieves information about the health of a dbt model, including the last time it ran, the last test execution status, and whether the upstream data for the model is fresh.

See all 24 tools

Control

What Speakeasy can see and stop in Codex

The gateway covers every client the same way. The rest depends on what Codex exposes to Speakeasy.

Tool logs

Gateway

Every dbt Cloud call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the dbt Cloud tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to dbt Cloud can reject a tool request before it reaches the server, or withhold a result from Codex. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

Codex

Agent hooks send each prompt and tool call to Speakeasy, which allows or denies it before Codex runs it.

User attribution

Codex

An [otel] block in ~/.codex/config.toml sends telemetry to Speakeasy. Export is off by default.

Budgets

Codex

Spend limits can block Codex traffic once a budget is reached.

Device agent and MDM

Codex

The device agent keeps Codex's configuration in sync on managed laptops.

  • Codex cloud tasks and GitHub code review run off the device. Neither the plugin nor OpenTelemetry covers them; OpenAI's Compliance Logs record them after the fact.
  • The workspace rollout needs a ChatGPT Business, Enterprise or Edu admin.

Questions

Frequently asked questions

Does GitHub code review in Codex go through Speakeasy?
No. Codex cloud tasks and GitHub code review run off the device, so neither the plugin nor OpenTelemetry covers them. OpenAI's Compliance Logs record them after the fact.
How is dbt Cloud activity in Codex tied to an engineer?
An [otel] block in ~/.codex/config.toml sends telemetry to Speakeasy. Export is off by default, so add the block on each machine or let the device agent keep it in sync.
How do Codex users get dbt Cloud?
An admin adds dbt Cloud from the Speakeasy MCP Catalog and grants access by team or role. Add the gateway as an MCP server, then log in. Each person then sees only the dbt Cloud tools their access allows.
Are dbt Cloud calls from Codex logged?
Yes. dbt Cloud calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

dbt Cloud in other clients

AI everywhere.

Control here.