Skip to content
MCP server

Warehouse MCP

Production MCP server for Postgres, Oracle, Snowflake, BigQuery, Redshift, DuckDB…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.4.2
Listing updated
4 days ago

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.

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

Install

Run in a terminal

claude mcp add warehouse-mcp --env WAREHOUSE_TYPE='<WAREHOUSE_TYPE>' --env MCP_API_KEYS='<MCP_API_KEYS>' --env MOTHERDUCK_TOKEN='<MOTHERDUCK_TOKEN>' --env PG_PASSWORD='<PG_PASSWORD>' --env ORACLE_PASSWORD='<ORACLE_PASSWORD>' -- npx -y warehouse-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_TYPE": "<WAREHOUSE_TYPE>",
        "MCP_API_KEYS": "<MCP_API_KEYS>",
        "MOTHERDUCK_TOKEN": "<MOTHERDUCK_TOKEN>",
        "PG_PASSWORD": "<PG_PASSWORD>",
        "ORACLE_PASSWORD": "<ORACLE_PASSWORD>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_TYPE": "<WAREHOUSE_TYPE>",
        "MCP_API_KEYS": "<MCP_API_KEYS>",
        "MOTHERDUCK_TOKEN": "<MOTHERDUCK_TOKEN>",
        "PG_PASSWORD": "<PG_PASSWORD>",
        "ORACLE_PASSWORD": "<ORACLE_PASSWORD>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "warehouse-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_TYPE": "<WAREHOUSE_TYPE>",
        "MCP_API_KEYS": "<MCP_API_KEYS>",
        "MOTHERDUCK_TOKEN": "<MOTHERDUCK_TOKEN>",
        "PG_PASSWORD": "<PG_PASSWORD>",
        "ORACLE_PASSWORD": "<ORACLE_PASSWORD>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_TYPE": "<WAREHOUSE_TYPE>",
        "MCP_API_KEYS": "<MCP_API_KEYS>",
        "MOTHERDUCK_TOKEN": "<MOTHERDUCK_TOKEN>",
        "PG_PASSWORD": "<PG_PASSWORD>",
        "ORACLE_PASSWORD": "<ORACLE_PASSWORD>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "warehouse-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "warehouse-mcp"
      ],
      "env": {
        "WAREHOUSE_TYPE": "<WAREHOUSE_TYPE>",
        "MCP_API_KEYS": "<MCP_API_KEYS>",
        "MOTHERDUCK_TOKEN": "<MOTHERDUCK_TOKEN>",
        "PG_PASSWORD": "<PG_PASSWORD>",
        "ORACLE_PASSWORD": "<ORACLE_PASSWORD>"
      }
    }
  }
}

Configuration

  • MCP_TRANSPORTSet to 'stdio' for desktop AI clients (Claude Desktop, Cursor). Defaults to 'http'.
  • WAREHOUSE_TYPEWhich warehouse to connect to. One of: postgres, oracle, redshift, snowflake, bigquery, duckdb. (DuckDB also handles MotherDuck via DUCKDB_PATH=md:<db>.)Required
  • MCP_API_KEYSComma-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_TOKENMotherDuck 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_PASSWORDPostgres password.
  • ORACLE_USEROracle user. Required when WAREHOUSE_TYPE=oracle.
  • ORACLE_PASSWORDOracle 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_MASKSet to 'on' to enable role-aware PII masking on result rows (emails, SSNs, phones, IPs, Luhn-validated CCs). Off by default.
  • MCP_RATE_LIMIT_RPMPer-principal token-bucket rate limit on tool invocations. 0 = disabled. Recommend 60 for production.

Pricing

Open source

Warehouse MCP FAQ

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_TYPE='<WAREHOUSE_TYPE>' --env MCP_API_KEYS='<MCP_API_KEYS>' --env MOTHERDUCK_TOKEN='<MOTHERDUCK_TOKEN>' --env PG_PASSWORD='<PG_PASSWORD>' --env ORACLE_PASSWORD='<ORACLE_PASSWORD>' -- npx -y warehouse-mcp

What are the best alternatives to Warehouse MCP?

The closest alternatives to Warehouse MCP are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

Alternatives to Warehouse MCP

  1. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  2. PlatypusDB

    MCP server

    Gives MCP clients access to your PlatypusDB database connections, scoped per agent

    Runs locally
    • Open source
    • Databases
  3. Lorebase

    MCP server

    Lets agents read and change a governed, versioned Postgres knowledge graph

    Runs locally
    • Open source
    • Knowledge and memory
  4. Sovaria

    MCP server

    Manage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant

    Not checked yet
    • 4 tools
    • Remote
    • Freemium
    • Databases
  5. Generate realistic connected test data, dbt projects and dashboards from a schema

    • Remote
    • Freemium
    • Databases
  6. semlayer

    MCP server

    Infers a semantic layer from your data warehouse and serves it to agents

    Runs locally
    • Free
    • Databases