Skip to main content

How to find your dbt MCP IDs

Several dbt MCP environment variables and headers require numeric IDs from your dbt platform account. This guide shows exactly where to find each one.

Use numeric IDs, not full URLs

ID variables expect integers, not URLs. A common mistake is copying the URL from your browser address bar.

# ✅ Correct
DBT_HOST=cloud.getdbt.com # https://cloud.getdbt.com also works
DBT_PROD_ENV_ID=54321
DBT_USER_ID=123

# ❌ Wrong — IDs must be numeric, not full URLs
DBT_PROD_ENV_ID=https://cloud.getdbt.com/deploy/12345/projects/67890/environments/54321
DBT_USER_ID=https://cloud.getdbt.com/settings/profile

DBT_HOST (account hostname)

Your hostname is the domain you use to access dbt platform. Both cloud.getdbt.com and https://cloud.getdbt.com are accepted.

  1. Log in to your dbt platform account.
  2. Go to Account settings.
  3. Copy the Access URL value.
Account typeExample Access URLDBT_HOST value
US multi-tenantcloud.getdbt.comcloud.getdbt.com
Multi-cellabc123.us1.dbt.comus1.dbt.com (set MULTICELL_ACCOUNT_PREFIX=abc123)
Single-tenantyour-company.getdbt.comyour-company.getdbt.com
Loading table...

For more information on regions and hosting, refer to Access, Regions, & IP addresses.

DBT_ACCOUNT_ID (account ID)

  1. Log in to your dbt platform account.
  2. Go to Account settings.
  3. The account ID is displayed on the settings page, or you can find it in the URL: https://cloud.getdbt.com/settings/accounts/ACCOUNT_ID/. So for example, if the URL is https://YOUR_ACCESS_URL/settings/accounts/12345/, the account ID would be 12345.

Alternatively, see Finding your user and account IDs for additional methods.

DBT_PROD_ENV_ID (production environment ID)

  1. Log in to your dbt platform account.
  2. Go to DeployEnvironments.
  3. Click on your production environment.
  4. The environment ID is in the URL: https://cloud.getdbt.com/deploy/ACCOUNT_ID/projects/PROJECT_ID/environments/ENVIRONMENT_ID. So for example, if the URL is https://YOUR_ACCESS_URL/deploy/12345/projects/67890/environments/54321, the environment ID would be 54321.

Copy only the number at the end — for example, 54321.

DBT_DEV_ENV_ID (development environment ID)

Follow the same steps as for DBT_PROD_ENV_ID, but click on your development environment instead of production.

This variable is required for execute_sql. If you don't have a dedicated development environment, you can use your production environment ID here, though a separate development environment is recommended.

DBT_USER_ID (user ID)

  1. Log in to your dbt platform account.
  2. Go to Account settingsProfile (or click your profile/avatar).
  3. Your user ID is in the URL: https://cloud.getdbt.com/settings/profile/USER_ID. So for example, if the URL is https://YOUR_ACCESS_URL/settings/profile/123, the user ID would be 123.

Copy only the number.

Alternatively, see Finding your user and account IDs.

DBT_TOKEN (access token)

The following sections explain how to find your Personal Access Token (PAT) and Service token.

Personal Access Token (PAT)

Required for execute_sql. Tied to your personal account.

  1. Go to Account settingsAPI tokensPersonal tokens.
  2. Click + New token, give it a name, and copy the token value.
  3. Store it somewhere safe — you can't view it again after closing the dialog.

Service token

Used for shared or team setups. Better for CI/automation.

  1. Go to Account settingsAPI tokensService tokens.
  2. Click + New token, assign the required permissions, and copy the token value.
  3. For full MCP access, the service token needs at least Semantic Layer Only, Metadata Only, and Developer permissions.

For more information, see User tokens (PAT) and Service tokens.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading