A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
This repository contains a Streamlit application that connects Snowflake Cortex to dbt's remote MCP (Model Context Proto
This repository contains a Streamlit application that connects Snowflake Cortex to dbt's remote MCP (Model Context Protocol) server, enabling a powerful "chat-with-your-data" experience for analytics. Users can query their dbt Semantic Layer using natural language and receive intelligent, context-aware responses about their data.
This project is designed for data teams who have:
This serves as an excellent example of building AI-driven analytics solutions that provide better context and results from your data warehouse through conversational interfaces. We have used this content as part of a hands-on-workshop, but it could be a great starting point for building such an appliction (with a few tweaks).
This project contains a Streamlit (SiS - Streamlit in Snowflake - see streamlit.py) app that leverages Cortex LLM functions (COMPLETE) along with dbt’s remote MCP server to provide a lightweight chat-based analytics interface. The Streamlit app has stripped down MCP capabilities and only uses Semantic Layer tools: list_metrics, get_dimensions, get_entities, and query_metrics. The LLM can orchestrate multiple tool calls to the MCP server and is fairly stable.

Example workflow for list_metrics (Ie. ‘What are my metrics?’) - workflow would be longer for additional toolcalls like query_metrics
Set up dbt project w/ Semantic Layer Models.
Set up Semantic Layer Config and add service token with warehouse credentials (don’t forget to copy info)
Snowflake setup:
setup warehouse, roles, db/schema/data
For our example, we use a role, dbt_cloud_user_role for all students
Setup for Streamlit/MCP
Please make the appropriate substitutions before running the following sql:
use role accountadmin;
-- if deploying to a region that does not have claude models available
ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'ANY_REGION';
-- db/schema setup --
create database if not exists streamlit;
create schema if not exists public;
-- NOTE: when creating your streamlit app, add to streamlit.public so it can access external access integration (see below)
-- user / role setup --
use role accountadmin;
create role if not exists dbt_cloud_user_role;
-- <ADD ANY PERMISSIONS YOU NEED FOR DBT DEVELOPMENT CREDENTIALS / ACCESS> --
grant ownership on database streamlit to role dbt_cloud_user_role;
grant ownership on schema streamlit.public to role dbt_cloud_user_role;
-- grant role dbt_cloud_user_role to user "<insert your user here>";
grant role dbt_cloud_user_role to role accountadmin;
-- network rule + external access integration setup --
use database streamlit;
use schema public;
use role dbt_cloud_user_role;
create or replace network rule dbt_mcp_rule
MODE = EGRESS
TYPE = HOST_PORT
-- you may need to update these depending on your dbt region
VALUE_LIST = ('*.dbt.com', '*.getdbt.com', '*.eu2.dbt.com');
show network rules;
use role accountadmin;
-- create or replace external access integration test_dbt_mcp_int
create or replace external access integration dbt_mcp_int
allowed_network_rules = (dbt_mcp_rule)
enabled = true;
show integrations;
grant usage on integration dbt_mcp_int to role dbt_cloud_user_role;
-- add any users who should access streamlit app to dbt_cloud_user_role
Streamlit setup:
Create New Streamlit app (under streamlit.public), edit & remove main contents
Add requests as a package

Enable external access integration by clicking on the options (… icon > upper right)

Environment.yml should look something like this
name: app_environment
channels:
- snowflake
dependencies:
- python=3.11.*
- snowflake-snowpark-python=
- streamlit=
- requests
- pandas
Copy the main code into your new Streamlit app from either streamlit_v1_single_sl.py or streamlit_v2_multi_sl_with_cred_mgr.py:
DEFAULT_MCP_URL on line 11 - make sure to update this to reflect your specific dbt accountTARGET_DATABASE and TARGET_SCHEMA on lines 15-16 - this should point to your production deployment environment, and you must have run a job that includes semantic layer models + metricsDBT_TOKEN and DBT_PROD_ENV_ID on lines 40-41model on line 70
Analyze your data!
Tips:
DEBUG_MODE at the top of streamlit.py. This enables some debugging UI elements (mostly st.expander) that allows you to see individual payloadsErrors/Troubleshooting
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
MCP server integration for DaVinci Resolve Studio
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba