# Warehouse Context

> Warehouse Context is an MCP server for databases. Governed table docs, lineage, freshness and PII-safe read-only SQL for warehouses. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/andremuraro/warehouse-context-mcp
- **MCP Registry name:** io.github.AndreMuraro/warehouse-context-mcp
- **Categories:** [databases](https://ai-powered.com/categories/databases), [analytics and data](https://ai-powered.com/categories/analytics-and-data), [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-15

## About

Agents are good at SQL but poor at knowing which table to trust, and this server supplies that context. It reports what each table means, its owner, lineage upstream and downstream, whether it meets its freshness expectation, and which columns are personal data. DuckDB is the first backend, with Snowflake and Databricks added later, merging warehouse comments and tags with a curated YAML catalog.

The query tool treats every query as hostile. SQL is parsed with sqlglot and must be a single SELECT using only reviewed constructs, resolved against the real schema. PII columns are replaced with '***' inside the SQL, so values never leave the warehouse, and filtering or sorting on them is refused. Connections are read-only, and every query has row, time and byte limits.

A --demo flag serves a synthetic shipping warehouse for trying it out. The README says to also use native warehouse masking in production.

## Features

- **Table context:** Purpose, owner, columns, PII flags, grain and row count.
- **Lineage:** Upstream sources and downstream consumers, cycle-safe.
- **Freshness check:** Reports last update and whether expectations are met.
- **PII masking in SQL:** Personal columns are masked before the query is sent.
- **Allow-list query policy:** Only reviewed SELECT constructs are accepted.
- **Three backends:** DuckDB, Snowflake and Databricks.

## Good for

- Check whether a table is fresh before using it
- Find the governed source for a metric
- Sample rows without exposing personal data
- Trace which tables feed a report

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add warehouse-context-mcp -- uvx warehouse-context-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add warehouse-context-mcp -- uvx warehouse-context-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.warehouse-context-mcp]
command = "uvx"
args = ["warehouse-context-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user warehouse-context-mcp uvx -- warehouse-context-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "warehouse-context-mcp": {
      "command": "uvx",
      "args": [
        "warehouse-context-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 6 tools changes data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_tables` (name suggests: reads): Every table with its documented purpose and owner.
- `describe_table` (name suggests: reads): Columns, types, descriptions, PII flags, grain and row count.
- `table_lineage`: Upstream sources and downstream consumers.
- `table_freshness`: Last update, age and whether it meets expectations.
- `sample_rows`: A few example rows with PII masked.
- `run_query` (name suggests: changes): One read-only SELECT, row-limited, with PII protected.

## FAQ

### Can an agent write to the warehouse?

No; queries are single read-only SELECTs on read-only connections.

### How do I try Warehouse Context?

Run uvx warehouse-context-mcp --demo.

### Which backends work?

DuckDB, Snowflake and Databricks.

### Does masking replace warehouse controls?

No; the README calls it defence in depth, so use native masking too.

### How do I add Warehouse Context to Claude Code?

Run this command in your terminal: claude mcp add warehouse-context-mcp -- uvx warehouse-context-mcp

### What are the best alternatives to Warehouse Context?

The closest alternatives to Warehouse Context are Warehouse MCP, Cosmos Semantic, Universal DB (read-only), Pipetable and Alephgrid.

## Where this comes from

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

## Alternatives

- [Warehouse MCP](https://ai-powered.com/mcp/warehouse-mcp-2): Warehouse MCP is an open-source MCP server for databases.
- [Cosmos Semantic](https://ai-powered.com/mcp/cosmos-semantic): Cosmos Semantic is an open-source MCP server for analytics and data.
- [Universal DB (read-only)](https://ai-powered.com/mcp/universal-db-read-only): Universal DB (read-only) is an open-source MCP server for databases.
- [Pipetable](https://ai-powered.com/mcp/pipetable): Pipetable is an open-source MCP server for files and documents.
- [Alephgrid](https://ai-powered.com/mcp/alephgrid): Alephgrid is an open-source MCP server for analytics and data.
- [QueryDesk](https://ai-powered.com/mcp/querydesk): QueryDesk is a freemium MCP server for databases.
- [LakehouseBox](https://ai-powered.com/mcp/lakehousebox): LakehouseBox is a freemium MCP server for databases.
- [Datris](https://ai-powered.com/mcp/datris): Datris is an open-source MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/warehouse-context
