
Warehouse Mcp
This is a production-grade read-only gateway to seven major data warehouses: Postgres, Oracle, Snowflake, BigQuery, Redshift, DuckDB, and MotherDuck. It exposes 16 tools for querying, catalog browsing, column profiling, and time-series bucketing with dialect-aware SQL validation. The five-tier role system (semantic_only, metadata_only, reader_restricted, reader, admin) maps cleanly to per-key authorization, and you can delegate to native warehouse roles for RLS and column-level security. JSONL audit logs and optional PII masking are built in. Deploy the Docker image or run via npx. Reach for this when you want LLMs querying your warehouse without writing infrastructure or duplicating access policies.
- tools
- 16
- auth
- Secret needed
- transport
- STDIO
- env vars
- 19
- last updated
- May 6, 2026
Tools
16 toolsPublic tool metadata for what this MCP can expose to an agent.
queryExecute a SELECT (validator-enforced read-only, dialect-aware).
Execute a SELECT (validator-enforced read-only, dialect-aware).
No parameter schema in public metadata yet.
list_schemasBrowse the catalog.
Browse the catalog.
No parameter schema in public metadata yet.
list_tablesBrowse the catalog.
Browse the catalog.
No parameter schema in public metadata yet.
describe_tableBrowse the catalog.
Browse the catalog.
No parameter schema in public metadata yet.
find_columnsSearch column names across the warehouse with a LIKE pattern.
Search column names across the warehouse with a LIKE pattern.
No parameter schema in public metadata yet.
get_foreign_keysDiscover declared FK relationships for safe joins.
Discover declared FK relationships for safe joins.
No parameter schema in public metadata yet.
get_view_definitionRead the SQL body of a view (where business logic lives).
Read the SQL body of a view (where business logic lives).
No parameter schema in public metadata yet.
sample_tablePeek at data, check size before scanning.
Peek at data, check size before scanning.
No parameter schema in public metadata yet.
count_rowsPeek at data, check size before scanning.
Peek at data, check size before scanning.
No parameter schema in public metadata yet.
column_statsProfile a single column.
Profile a single column.
No parameter schema in public metadata yet.
top_valuesProfile a single column.
Profile a single column.
No parameter schema in public metadata yet.
time_seriesBucket by hour/day/week/month/quarter/year — dialect-correct everywhere.
Bucket by hour/day/week/month/quarter/year — dialect-correct everywhere.
No parameter schema in public metadata yet.
search_valueFind a literal across a table's text columns.
Find a literal across a table's text columns.
No parameter schema in public metadata yet.
glossary_lookupRead business-glossary terms from the semantic layer (in-memory, no warehouse I/O).
Read business-glossary terms from the semantic layer (in-memory, no warehouse I/O).
No parameter schema in public metadata yet.
schema_lookupRead schema-level docs — purpose, owner, refresh, table list.
Read schema-level docs — purpose, owner, refresh, table list.
No parameter schema in public metadata yet.
table_lookupRead full semantic doc for one table — description + column metadata.
Read full semantic doc for one table — description + column metadata.
No parameter schema in public metadata yet.
Sponsors
Configuration
MCP_TRANSPORTdefault: stdioSet to 'stdio' for desktop AI clients (Claude Desktop, Cursor). Defaults to 'http'.
WAREHOUSE_TYPE*Which warehouse to connect to. One of: postgres, oracle, redshift, snowflake, bigquery, duckdb. (DuckDB also handles MotherDuck via DUCKDB_PATH=md:<db>.)
MCP_API_KEYSsecretComma-separated bearer keys with role and optional warehouse-role impersonation: 'key1:reader,key2:admin', 'key3:reader:set_role=alice'. Leave empty for stdio (OS process boundary is the trust boundary). Required for HTTP.
DUCKDB_PATHDuckDB file path, ':memory:', or 'md:<database>' for MotherDuck. Required when WAREHOUSE_TYPE=duckdb.
MOTHERDUCK_TOKENsecretMotherDuck service token. Required when DUCKDB_PATH starts with 'md:'.
PG_HOSTPostgres host. Required when WAREHOUSE_TYPE=postgres. (Use REDSHIFT_HOST for Redshift.)
PG_DATABASEPostgres database name.
PG_USERPostgres user.
PG_PASSWORDsecretPostgres password.
ORACLE_USEROracle user. Required when WAREHOUSE_TYPE=oracle.
ORACLE_PASSWORDsecretOracle password.
ORACLE_CONNECT_STRINGOracle Easy Connect (e.g. host:1521/SERVICE), TNS descriptor, or alias.
SNOWFLAKE_ACCOUNTSnowflake account identifier (e.g. xy12345.us-east-1). Required when WAREHOUSE_TYPE=snowflake.
SNOWFLAKE_USERSnowflake username.
SNOWFLAKE_PRIVATE_KEY_PATHPath to PKCS8 private key (.p8). Snowflake auth is key-pair only; password auth is not supported.
BIGQUERY_PROJECTGCP project id. Required when WAREHOUSE_TYPE=bigquery.
GOOGLE_APPLICATION_CREDENTIALSPath to BigQuery service-account JSON. Omit on GKE / Cloud Run with workload identity.
GUARDRAIL_PII_MASKdefault: offSet to 'on' to enable role-aware PII masking on result rows (emails, SSNs, phones, IPs, Luhn-validated CCs). Off by default.
MCP_RATE_LIMIT_RPMdefault: 0Per-principal token-bucket rate limit on tool invocations. 0 = disabled. Recommend 60 for production.
Readme
warehouse-mcp
Production MCP (Model Context Protocol) server for your data warehouse. Read-only enforcement, five-tier role-based access, optional warehouse-role impersonation (for native RLS / CLS), JSONL audit log, optional output PII masking, optional semantic-metadata layer (glossary + table docs) with per-session toggle. Self-host the Docker image, install via npx, or wait for the upcoming managed cloud variant.
Status: v0.4.x — production-ready for the v1 warehouse list. See CHANGELOG for what shipped in each release.
Demo Videos
Warehouse MCP in action using Cursor
Supported warehouses
Details
- Repository
- github.com/kalehdoo/warehouse-mcp
- Website
- github.com/kalehdoo/warehouse-mcp
- Categories
- Databases, Data & Analytics
- Package
warehouse-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active