Summary
When using MCP tools that execute queries against the warehouse via the dbt platform (i.e. query_metrics and execute_sql), if the platform's Snowflake credentials have expired, the tool returns a cryptic error message like:
SSO authentication has expired, please re-connect to Snowflake: https://docs.getdbt.com/faqs/Troubleshooting/refresh-snowflake-oauth-credentials
This error message is misleading and sends users down the wrong troubleshooting path.
Two distinct auth scenarios
It's important to distinguish between two different authentication failure modes in dbt-mcp:
1. Local machine → Snowflake (dbt CLI tools)
Applies to tools that run dbt commands locally (build, run, show, etc.). Authentication is between the local machine and Snowflake — typically browser-based SSO (externalbrowser). Already tracked in #628.
Resolution: Re-authenticate locally (e.g. run dbt debug to trigger a browser login).
2. dbt platform → Snowflake (warehouse-executing platform tools)
Applies to tools that send queries to the warehouse through the dbt platform: query_metrics and execute_sql. The local machine is not involved — the MCP server forwards the query to the dbt platform, which executes it against Snowflake using its own stored development credentials.
Resolution: The user must go to the dbt Cloud UI → Profile → Credentials and refresh their development environment credentials for the relevant project/environment. There is nothing to fix locally.
Problem
The current error message points users toward local Snowflake reconnection steps (re-authenticate in the browser), which does not resolve the issue when the problem is actually expired credentials on the dbt platform side.
Expected behavior
When query_metrics or execute_sql fail due to expired platform credentials, the error should:
- Clearly indicate this is a dbt platform credential expiry, not a local auth issue
- Direct the user to refresh their development credentials in the dbt Cloud UI
Steps to reproduce
- Configure dbt-mcp with Semantic Layer or SQL tools enabled
- Let the dbt platform's Snowflake development credentials expire (or set up a fresh environment where they haven't been configured)
- Call
query_metrics or execute_sql
- Observe the misleading error message
Summary
When using MCP tools that execute queries against the warehouse via the dbt platform (i.e.
query_metricsandexecute_sql), if the platform's Snowflake credentials have expired, the tool returns a cryptic error message like:This error message is misleading and sends users down the wrong troubleshooting path.
Two distinct auth scenarios
It's important to distinguish between two different authentication failure modes in dbt-mcp:
1. Local machine → Snowflake (dbt CLI tools)
Applies to tools that run dbt commands locally (
build,run,show, etc.). Authentication is between the local machine and Snowflake — typically browser-based SSO (externalbrowser). Already tracked in #628.Resolution: Re-authenticate locally (e.g. run
dbt debugto trigger a browser login).2. dbt platform → Snowflake (warehouse-executing platform tools)
Applies to tools that send queries to the warehouse through the dbt platform:
query_metricsandexecute_sql. The local machine is not involved — the MCP server forwards the query to the dbt platform, which executes it against Snowflake using its own stored development credentials.Resolution: The user must go to the dbt Cloud UI → Profile → Credentials and refresh their development environment credentials for the relevant project/environment. There is nothing to fix locally.
Problem
The current error message points users toward local Snowflake reconnection steps (re-authenticate in the browser), which does not resolve the issue when the problem is actually expired credentials on the dbt platform side.
Expected behavior
When
query_metricsorexecute_sqlfail due to expired platform credentials, the error should:Steps to reproduce
query_metricsorexecute_sql