kalehdoo avatar

Warehouse Mcp

kalehdoo/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 tools

Public 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: stdio

Set 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_KEYSsecret

Comma-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_PATH

DuckDB file path, ':memory:', or 'md:<database>' for MotherDuck. Required when WAREHOUSE_TYPE=duckdb.

MOTHERDUCK_TOKENsecret

MotherDuck service token. Required when DUCKDB_PATH starts with 'md:'.

PG_HOST

Postgres host. Required when WAREHOUSE_TYPE=postgres. (Use REDSHIFT_HOST for Redshift.)

PG_DATABASE

Postgres database name.

PG_USER

Postgres user.

PG_PASSWORDsecret

Postgres password.

ORACLE_USER

Oracle user. Required when WAREHOUSE_TYPE=oracle.

ORACLE_PASSWORDsecret

Oracle password.

ORACLE_CONNECT_STRING

Oracle Easy Connect (e.g. host:1521/SERVICE), TNS descriptor, or alias.

SNOWFLAKE_ACCOUNT

Snowflake account identifier (e.g. xy12345.us-east-1). Required when WAREHOUSE_TYPE=snowflake.

SNOWFLAKE_USER

Snowflake username.

SNOWFLAKE_PRIVATE_KEY_PATH

Path to PKCS8 private key (.p8). Snowflake auth is key-pair only; password auth is not supported.

BIGQUERY_PROJECT

GCP project id. Required when WAREHOUSE_TYPE=bigquery.

GOOGLE_APPLICATION_CREDENTIALS

Path to BigQuery service-account JSON. Omit on GKE / Cloud Run with workload identity.

GUARDRAIL_PII_MASKdefault: off

Set 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: 0

Per-principal token-bucket rate limit on tool invocations. 0 = disabled. Recommend 60 for production.

Readme

warehouse-mcp

CI License: Apache 2.0

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


View the full README on GitHub

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

Related Databases MCP servers

View all
1microqueryhq avatarMicroquery Mcpmicroqueryhq/microquery-mcpSQL over real-world data — FDA, SEC, blockchain, genomics, CVEs, and more. No config.0stars
2minaprotocol avatarMina Mcp Serverminaprotocol/mina-mcp-serverQuery Mina Protocol: accounts, blocks, transactions, zkApp events/actions, archive SQL, Rosetta.0stars
3mcpso avatarChatsummcpso/mcp-server-chatsumQueries and summarizes chat messages from a chat database via MCP to provide concise summaries and insights.1Kstars
4arben-adm avatarSequential Thinking Working Notesarben-adm/mcp-sequential-thinkingLocal working notes, decisions, evidence and resumable sessions with SQLite persistence.960stars
5domdomegg avatarAirtabledomdomegg/airtable-mcp-serverRead and write access to Airtable database schemas, tables, and records.456stars
6massive-com avatarMassive.commassive-com/mcp_massiveProvides access to Massive.com data via an MCP server with four composable tools and in-memory DataFrame storage for SQL queries and analytics.332stars