# warehouse-mcp [Health: Active]

**Category:** 📊 Data Platforms  
**Repository:** https://github.com/kalehdoo/warehouse-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 184  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/warehouse-mcp

## Description
Production MCP server for Postgres, Oracle, Snowflake, BigQuery, Redshift, DuckDB, MotherDuck.

## Tools
Capabilities this server exposes over MCP:

- **query** — Execute a SELECT (validator-enforced read-only, dialect-aware)
- **find_columns** — Search column names across the warehouse with a LIKE pattern
- **get_foreign_keys** — Discover declared FK relationships for safe joins
- **get_view_definition** — Read the SQL body of a view (where business logic lives)
- **time_series** — Bucket by hour/day/week/month/quarter/year — dialect-correct everywhere
- **search_value** — Find a literal across a table's text columns
- **glossary_lookup** — Read business-glossary terms from the semantic layer (in-memory, no warehouse I/O)
- **schema_lookup** — Read schema-level docs — purpose, owner, refresh, table list
- **table_lookup** — Read full semantic doc for one table — description + column metadata

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "warehouse-mcp": {
    "command": "npx",
    "args": ["-y","warehouse-mcp@latest"],
    "env": {
      "WAREHOUSE_TYPE": "",
      "MCP_API_KEYS": ""
    }
  }
}
```

**Requires environment variables:** `WAREHOUSE_TYPE`, `MCP_API_KEYS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the warehouse-mcp MCP server does

The warehouse-mcp MCP server gives MCP-compatible clients a read-only interface to supported analytical databases. It can run validated SELECT statements, inspect catalogs, examine views and foreign-key relationships, profile columns, search text values, and generate dialect-aware time buckets. The supported systems are Postgres 12+, Oracle 12c+ in Thin mode, Amazon Redshift, Snowflake with key-pair authentication, Google BigQuery, DuckDB, and MotherDuck.

Its semantic layer is separate from warehouse queries. Glossary terms, schema descriptions, table documentation, ownership, refresh details, and column metadata can be served from in-memory configuration without warehouse I/O. A per-session setting controls whether semantic resources are visible.

## How it works

Access is assigned through five roles. `semantic_only` exposes only documentation lookups, while `metadata_only` adds catalog discovery without row access. `reader_restricted` permits aggregates, samples, and time-series operations but not arbitrary SELECT statements. `reader` adds general queries and literal searches, and `admin` exposes the full current tool set.

API keys use the form `key:role`, with optional directives for a warehouse role and semantic visibility. On Postgres and Redshift, the `set_role` option can issue `SET ROLE`, allowing native row-level security, column-level security, or masking policies to remain enforced by the warehouse. Requests and responses can be recorded in a JSONL audit log, and output PII masking is available as an optional setting.

## Setup and configuration

The warehouse-mcp MCP server can run from the published Docker image or through `npx`. Docker Compose provides a local demonstration with seeded Postgres data and exposes the service on port 3001. For another warehouse, set `WAREHOUSE_TYPE` and provide the credentials required by that adapter. The Docker image includes all listed adapters.

Postgres and Redshift use database connection variables. Oracle uses a user, password, and connect string without requiring Instant Client. Snowflake uses a mounted private-key file along with account, user, warehouse, and database settings. BigQuery uses mounted service-account credentials and a project identifier. DuckDB accepts a local file or `:memory:` path, while MotherDuck uses an `md:` path and token.

MCP clients can connect to the HTTP endpoint through `mcp-remote`, passing an API key as a Bearer authorization header. The selected key determines which tools and semantic resources the session can see. The documentation recommends environment files or a secrets manager instead of putting database passwords directly in shell commands.

## Tools and capabilities

The available operations cover several workflows:

- Browse schemas and tables, describe tables, find columns, and inspect declared foreign keys.
- Read view SQL definitions to understand embedded business logic.
- Sample tables, count rows, calculate column statistics, and inspect top values before larger scans.
- Run read-only, dialect-aware SELECT statements for roles that permit them.
- Search for a literal across text columns in a table.
- Group timestamps by hour, day, week, month, quarter, or year using warehouse-specific SQL.
- Look up glossary terms, schema documentation, and full table documentation from the semantic layer.

## Limitations and notes

Only read operations are currently exposed. The `admin` role is described as reserving future write tools, but no write capability is available in the listed tool set. Databricks SQL is not included in the current warehouse list; it is described as a future fast-follow.

Feature support depends on the selected adapter and its authentication requirements. Snowflake requires key-pair authentication, Oracle runs in Thin mode, and MotherDuck requires its cloud connection format and token. Native role impersonation is documented for Postgres and Redshift, not for every supported warehouse. The server is identified as version 0.4.x and production-ready for its v1 warehouse list.

_Full upstream README: https://allmcps.com/mcp/warehouse-mcp/readme_

