Skip to content
MCP server

Warehouse MCP

Read-only warehouse access for agents with SQL guard, row policies and pseudonymised PII

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
self-hosted, CLI
Runs
Locally
Version
0.1.0
Listing updated
today

Similar MCP servers

About Warehouse MCP

Warehouse MCP is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

The author's pitch is to give agents your data without giving them your warehouse. A semantic model lets agents ask for named metrics by dimension, a SQL guard allows only single SELECT statements on declared datasets with a function allowlist and a LIMIT cap, and each engine is locked down independently of the guard: DuckDB read-only without file access, Postgres a read-only transaction plus grants, BigQuery a dry run with a byte cap.

Personal columns are replaced by salted hashes inside the warehouse query, so counts and joins stay exact while names never leave. Roles come from the bearer key over HTTP and can carry row filters, and an audit log records calls without values or salt. Results are cell-capped with email and phone redaction.

The README reports 104 bypass attempts with no leaks on DuckDB and Postgres, identical results for 15 queries across three engines, and a 26-case Claude Haiku 5.5 evaluation at 78 of 78 correct. A demo with about 100,000 live Wikipedia edits runs with no keys.

Install

Run in a terminal

claude mcp add warehouse-mcp --env WAREHOUSE_MCP_POSTGRES_DSN='<WAREHOUSE_MCP_POSTGRES_DSN>' --env WAREHOUSE_MCP_PII_SALT='<WAREHOUSE_MCP_PII_SALT>' -- uvx warehouse-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_MCP_POSTGRES_DSN": "<WAREHOUSE_MCP_POSTGRES_DSN>",
        "WAREHOUSE_MCP_PII_SALT": "<WAREHOUSE_MCP_PII_SALT>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_MCP_POSTGRES_DSN": "<WAREHOUSE_MCP_POSTGRES_DSN>",
        "WAREHOUSE_MCP_PII_SALT": "<WAREHOUSE_MCP_PII_SALT>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "warehouse-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_MCP_POSTGRES_DSN": "<WAREHOUSE_MCP_POSTGRES_DSN>",
        "WAREHOUSE_MCP_PII_SALT": "<WAREHOUSE_MCP_PII_SALT>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_MCP_POSTGRES_DSN": "<WAREHOUSE_MCP_POSTGRES_DSN>",
        "WAREHOUSE_MCP_PII_SALT": "<WAREHOUSE_MCP_PII_SALT>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_MCP_POSTGRES_DSN": "<WAREHOUSE_MCP_POSTGRES_DSN>",
        "WAREHOUSE_MCP_PII_SALT": "<WAREHOUSE_MCP_PII_SALT>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • WAREHOUSE_MCP_POSTGRES_DSNPostgres connection string of a read-only role (Postgres configs only).
  • WAREHOUSE_MCP_PII_SALTFixed salt for stable pseudonyms across restarts (16-128 letters or digits).
  • WAREHOUSE_MCP_AUDIT_LOGPath of the JSONL audit log; stderr when unset.

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

warehouse_list_datasets
What the caller's role may query, with each dataset's grain and metrics
warehouse_describe_dataset
Columns, pseudonymised fields, row policy and three sample rows
warehouse_query_metrics
Named metrics by dimensions and time buckets
warehouse_run_sql
One guarded SELECT for questions metrics cannot express

What it does

Governed SQL guard
Single SELECT statements on declared datasets, with function allowlist and capped LIMIT.
Pseudonymised PII
Personal columns become salted hashes inside the warehouse query.
Per-role row policies
Bearer keys map to roles with row filters and dataset access.
Metrics-first queries
Named metrics by dimensions and time buckets, built as a syntax tree.
Cost cap
BigQuery queries are refused before billing when they exceed a byte cap.
Audit log
JSONL log of calls without values or salt.
Three backends
DuckDB, Postgres and BigQuery.

Good for

  • Let an analyst agent answer metric questions without raw table access
  • Give an external partner a single-region view of event data
  • Try governed analytics on the bundled Wikipedia demo
  • Stop an agent from running an expensive BigQuery scan

Pricing

Open source

Warehouse MCP FAQ

Which databases work?

DuckDB, Postgres and BigQuery.

Can an agent write data?

Writes are refused by the SQL guard and, separately, by the engine's read-only settings.

How are names protected?

The guard rewrites dataset references so personal columns are salted hashes, keeping counts exact but hiding values.

How can I try it without keys?

Run uvx warehouse-mcp --demo to use the bundled Wikipedia edits dataset.

How was it tested?

The README cites a 104-attempt red-team suite with 0 leaks on DuckDB and Postgres.

Is Warehouse MCP free?

Yes. Warehouse MCP is open source, so you can use and self-host it for free.

How do I add Warehouse MCP to Claude Code?

Run this command in your terminal: claude mcp add warehouse-mcp --env WAREHOUSE_MCP_POSTGRES_DSN='<WAREHOUSE_MCP_POSTGRES_DSN>' --env WAREHOUSE_MCP_PII_SALT='<WAREHOUSE_MCP_PII_SALT>' -- uvx warehouse-mcp

What are the best alternatives to Warehouse MCP?

The closest alternatives to Warehouse MCP are REA, Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, dashboard-icons and AiSOC.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers