Connect to the remote dbt MCP server StarterEnterpriseEnterprise +
The remote MCP server connects to dbt platform using HTTP. No local installation is required — you configure your MCP client with a URL and headers instead of running uvx dbt-mcp.
When to use remote MCP
Remote MCP is a good fit when:
- You don't want to or can't install software (
uvx, dbt-mcp) on your machine. - Your use case is consumption-based: querying metrics, exploring metadata, viewing lineage, or running SQL via the platform.
- You need Semantic Layer, Administrative, and Discovery APIs access without a local dbt project.
Local development and agentic workflows (for example, running dbt commands like dbt run or dbt build from your AI assistant) require the local MCP server. Remote MCP does not support the local dbt Core or Fusion CLI or local project access. Use Connect to dbt platform or Run dbt locally for those workflows.
Set up remote MCP
Follow these steps to set up the remote MCP server.
1. Enable AI features
In dbt platform, ensure that you have AI features turned on.
2. Get your credentials
Obtain the following information from dbt platform:
- dbt platform host: Form the URL as
https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/(for example,https://cloud.getdbt.com/api/ai/v1/mcp/). For multi-cell accounts, the host is in the formatACCOUNT_PREFIX.us1.dbt.com. Refer to Access, Regions, & IP addresses. - Production environment ID: From Orchestration in dbt platform. You will use it as the
x-dbt-prod-environment-idheader. - Token — PAT or service token with Semantic Layer and Developer permissions.
- If you use
execute_sql: You must use a PAT, plus your development environment ID and user ID. Refer to Finding your IDs.
3. Choose authentication: OAuth or tokens
- OAuth (remote) — No API tokens in your client config. Requires an OAuth-capable MCP client. Available in private beta for Enterprise and Enterprise+ accounts.
- Token-based — PAT or service token in the
Authorizationheader. Works with any client and is required for shared/CI setups and forexecute_sql(which needs a PAT).
Remote MCP OAuth is available for Enterprise and Enterprise+ accounts. Contact your account manager to join the private beta.
4. Get your MCP URL and IDs
You can copy your full MCP URL from Account settings → Access URLs → MCP Endpoint URL in dbt platform, and paste it directly into your AI tool.
Depending on your auth method, you may also need:
- Production environment ID: From Orchestration in dbt platform. Used as the
x-dbt-prod-environment-idheader for token-based setup. - Token — PAT or service token with Semantic Layer and Developer permissions (token-based setup only).
- If you use
execute_sql: You must use a PAT, plus your development environment ID and user ID. Refer to Finding your IDs.
Only text_to_sql consumes dbt Copilot credits. Other MCP tools do not.
When your account runs out of Copilot credits, the remote MCP server blocks all tools that run through it, even tools invoked from a local MCP server and proxied to remote MCP (like SQL and remote Fusion tools).
If you reach your dbt Copilot usage limit, all tools will be blocked until your Copilot credits reset. If you need help, please reach out to your account manager.
5. Configure your MCP client
Configure your MCP client with the MCP URL and headers from the previous step.
- OAuth
- Token-based
Before you connect
- Your MCP client must support OAuth for HTTP-based MCP servers. If it doesn't, use token-based authentication instead.
- On first connect, your client opens a browser for sign-in. dbt then shows a consent screen with the scopes (the specific permissions the client is allowed to use) it's requesting — see Scopes and consent for what each scope means.
- Most modern MCP clients self-register on first connect via dynamic registration (RFC 7591). Clients that don't support it need an admin to register them in Account settings → Integrations → App integrations. See Manual registration.
For the full flow, sessions, and limitations, refer to OAuth (remote MCP).
Configure your client with the MCP URL from the previous step. On first connect, your client opens a browser for sign-in and consent.
- Claude Code
- Cursor
- VS Code
Add this to .mcp.json at your project root:
{
"mcpServers": {
"dbt": {
"type": "http",
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/"
}
}
}
Add this to .cursor/mcp.json (or use the Cursor deeplink in Integrate Cursor with MCP):
{
"mcpServers": {
"dbt": {
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/"
}
}
}
Add this to mcp.json (run MCP: Open Workspace Folder MCP Configuration from the command palette). VS Code uses the servers key, not mcpServers:
{
"servers": {
"dbt": {
"type": "http",
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/"
}
}
}
Set the server url to https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/ and add the required headers:
- Required:
Authorization(valueToken YOUR_TOKENorBearer YOUR_TOKEN),x-dbt-prod-environment-id - For
execute_sqlor Fusion tools: Also addx-dbt-dev-environment-idandx-dbt-user-id - Use numeric IDs in headers, not full URLs copied from your browser.
- Claude Code
- Cursor
- VS Code
- Gemini
{
"mcpServers": {
"dbt": {
"type": "http",
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/",
"headers": {
"Authorization": "Token YOUR_DBT_ACCESS_TOKEN",
"x-dbt-prod-environment-id": "DBT_PROD_ENV_ID",
"x-dbt-user-id": "DBT_USER_ID",
"x-dbt-dev-environment-id": "DBT_DEV_ENV_ID"
}
}
}
}
{
"mcpServers": {
"dbt": {
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/",
"headers": {
"Authorization": "Token YOUR_DBT_ACCESS_TOKEN",
"x-dbt-prod-environment-id": "DBT_PROD_ENV_ID",
"x-dbt-user-id": "DBT_USER_ID",
"x-dbt-dev-environment-id": "DBT_DEV_ENV_ID"
}
}
}
}
VS Code uses the servers key, not mcpServers:
{
"servers": {
"dbt": {
"type": "http",
"url": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/",
"headers": {
"Authorization": "Token YOUR_DBT_ACCESS_TOKEN",
"x-dbt-prod-environment-id": "DBT_PROD_ENV_ID",
"x-dbt-user-id": "DBT_USER_ID",
"x-dbt-dev-environment-id": "DBT_DEV_ENV_ID"
}
}
}
}
Gemini uses the httpUrl key instead of url:
{
"mcpServers": {
"dbt": {
"httpUrl": "https://YOUR_DBT_HOST_URL/api/ai/v1/mcp/",
"headers": {
"Authorization": "Token YOUR_DBT_ACCESS_TOKEN",
"x-dbt-prod-environment-id": "DBT_PROD_ENV_ID",
"x-dbt-user-id": "DBT_USER_ID",
"x-dbt-dev-environment-id": "DBT_DEV_ENV_ID"
}
}
}
}
- For the complete list of headers, Cursor and other client examples, and optional headers, refer to Set up remote MCP.
- For local MCP, configuration uses environment variables; check out the Environment variables reference for more information.
Once you have configured your MCP client, you can test your setup by asking your AI assistant a data-related question (for example, "What models are in my dbt project?" or "What metrics are defined in my Semantic Layer?"). If dbt MCP is working, the response will use your dbt metadata.
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
