Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Governed Warehouse

by tongliuTLversion 0.2.1i★ 0iRuns on your computerOfficial site ↗

How to install

What it does

Governed MCP server for warehouse data: semantic layer, scoped access, PII controls and SQL guard.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Databases & datasets

Use together with

Skills that teach the AI this kind of work; they work alongside this one

last30days-skill

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

by mvanhorn★ 76,2401 skills

Skill · How-to guide

timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

by google-research★ 35,7401 skills

Skill · How-to guide

Shadowbroker

Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…

by BigBodyCobain★ 11,6391 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Governed Warehouse. Follow https://mcp.popnx.com/i/tongliutl-governed-warehouse-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 28, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Governed Warehouse for Claude on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "governed-warehouse": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Governed Warehouse tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "governed-warehouse": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Governed Warehouse and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Governed Warehouse or shows a Governed Warehouse tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Governed Warehouse yet

Governed Warehouse runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Governed Warehouse

  • Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)
  • Install Docker on your computer first (one time)

B · Others in Databases & datasets that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Governed Warehouse for Claude Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user governed-warehouse -- docker run -i --rm ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Governed Warehouse tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user governed-warehouse -- docker run -i --rm ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1
  4. Type /mcp in Claude Code

    You should see Governed Warehouse listed as connected

  5. Try it

    Use Governed Warehouse and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Governed Warehouse or shows a Governed Warehouse tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Governed Warehouse for Cursor on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "governed-warehouse": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Governed Warehouse tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Governed Warehouse and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Governed Warehouse or shows a Governed Warehouse tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Docker on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Governed Warehouse for VS Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "governed-warehouse": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Governed Warehouse tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Governed Warehouse and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Governed Warehouse or shows a Governed Warehouse tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Governed Warehouse💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user governed-warehouse -- docker run -i --rm ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "governed-warehouse": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "governed-warehouse": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "governed-warehouse": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Registry name
io.github.tongliuTL/governed-warehouse-mcp
Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Transport
streamable-http
Latest versioni
0.2.1
Published to registryi
Nov 27, 2026
Code last changedi
Nov 27, 2026
Maker
tongliuTL
Packages
oci: ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1
Website
tongliu.md
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 28, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account tongliuTL, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked: only npm and PyPI packages with a version can be checked

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/tongliutl-governed-warehouse-mcp.svg)](https://mcp.popnx.com/en/servers/tongliutl-governed-warehouse-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Databases & datasetsi

  • More stars than 0% of the other 1335 servers in this category
  • Published to the registry more recently than 99% of the other 1335 servers in this category
  • Basic checks equal to or better than 99% of the other 1335 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Governed Warehouse safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (0.2.1) reached the registry yesterday.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.

What can I use instead?

In the same category: Supabase, Neon, DBCode, Keboola MCP, WaveHouse Cloud

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Supabase

Supabase’s official server lets AI create tables, query data and review project settings in your Supabase database.

by supabaseWidely used↓ 245.5K/wk★ 3K Stars for the whole repoUpdated yesterday

Connect now (has URL) · sign-in✓ service owner · supabase.com

Neon

Official Neon MCP server for managing Neon projects and Lakebase Postgres databases.

by neondatabaseGrowing★ 668Updated 22 days ago

Connect now (has URL) · sign-in✓ service owner · neon.com

DBCode

Query and explore 100+ databases through your DBCode connections.

by dbcodeioEarly↓ 118/wk★ 369 Stars for the whole repoUpdated 2 months ago

Runs on your computer✓ service owner · dbcode.io

Keboola MCP

Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...

by keboolaGrowing↓ 355/wk★ 84Updated 9 days ago

Connect now (has URL) · sign-in✓ service owner · keboola.com

WaveHouse Cloud

Browse, query, and administer your managed WaveHouse + ClickHouse projects (schema, pipes, policy).

by Wave-RFEarly★ 41Updated 7 days ago

Connect now (has URL) · sign-in✓ service owner · wavehouse.cloud
Compared with similar ones
This one
Governed Warehouse
SupabaseNeonDBCodeKeboola MCPWaveHouse Cloud
Runs whereInstalls on your computerCloud or install on your computerRuns in the cloud, nothing to installInstalls on your computerCloud or install on your computerRuns in the cloud, nothing to install
Needs a keyNoYesNoNoNoNo
Add with + in ClaudeNoYesYesNoNoNo
Basic checks3/35/55/52/35/54/4
LicenseMITApache-2.0MITNOASSERTIONMITApache-2.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

governed-warehouse-mcp

A governed Model Context Protocol server that lets AI agents answer questions from an analytical warehouse. Agents cannot write to the warehouse, read data their token does not allow, or see personal data they are not cleared for. The repository also has an eval harness for tool-calling agents. It runs the real Anthropic SDK and the real MCP server end to end, and it runs offline, so CI needs no API key. Live runs work with Claude or any Anthropic-compatible API, can be traced to Langfuse, and can be graded by an LLM judge that is calibrated against the deterministic graders first.

The warehouse is a synthetic cross-border freight dataset (shipments, carriers, lanes, border crossings, customs documents, invoices, quotes). It is generated deterministically from a seed, and nothing in it is real.

$ uv run gwm-eval all --gate

wrote reports/report.md and reports/report.json all gates passed

Contents

Why it exists

Letting an LLM agent query a warehouse is easy. Letting it do so safely, and knowing whether it answers correctly, is the hard part. This repository does both:

  • The server puts a semantic layer, an access policy and a SQL guard between the agent and the data. Agents ask for governed metrics by name, or write SQL. Agent SQL is parsed, checked and regenerated before it runs on a read-only, sandboxed connection. Every call is audited.
  • The eval harness measures an agent on that server. It checks whether the agent answers correctly, respects governance, and resists prompt injection planted in the data. The graders are deterministic, and they are themselves tested against planted failures. An LLM judge covers what rules cannot check (is a refusal honest? is the answer clear?), and it is calibrated against those graders and human labels before its verdicts count.

What an agent sees

Five tools and one resource:

toolwhat it does
search_modelsranks the models and metrics the caller may see for a plain-language question
describe_modelreturns grain, tier, columns (with which are PII), joins and metrics for one model
list_metricslists governed metrics with definitions, time column and allowed dimensions
query_metriccomputes a metric by name, grouped, filtered and bucketed by time; returns the SQL that ran
run_sqlruns one read-only SELECT over visible catalog models, after the guard checks it
catalog://versionresource: the published catalog version and its tiers

A metric query returns rows together with how they were produced. These are real responses for the analyst role; the data is synthetic:

// query_metric {"metric": "on_time_rate", "group_by": ["dim_lanes.border_crossing"],

// "start_date": "2025-01-01", "end_date": "2025-12-31"} { "columns": ["border_crossing", "on_time_rate"], "rows": [[null, 0.873348], ["Detroit-Windsor", 0.788462], ["El Paso", 0.765799], ["Laredo", 0.753898], ["Buffalo", 0.752964], ["Nogales", 0.752092]], "truncated": false, "sql": "SELECT \"dim_lanes\".\"border_crossing\" AS \"border_crossing\", AVG(CASE WHEN ...) ...", "models": ["dim_lanes", "fct_shipments"], "catalog_version": "v1-42c3e5f7aec9" }

Refusals start with a stable code, so an agent can recover and an eval can grade without parsing prose:

run_sql "select contact_email from dim_customers limit 3"

PII_DENIED: column 'contact_email' is PII and needs the pii:read scope

run_sql "select sum(amount_usd) from fct_invoices" (restricted model) UNKNOWN_MODEL: 'fct_invoices' is not a model you can query; use search_models to find one

run_sql "drop table fct_invoices" READ_ONLY: only SELECT queries are allowed, got DROP

A restricted model gets the same answer as a model that does not exist, so a refusal never confirms what is there.

Architecture

flowchart LR

subgraph Agent["Agent (warehouse_evals.agent)"] LLM["Anthropic SDK: Claude or an Anthropic-compatible API streaming, adaptive thinking"] Loop["Tool loop strict JSON re-parse JSON Schema validation"] LLM <--> Loop end

subgraph Server["MCP server (warehouse_mcp.server)"] Auth["Auth Ed25519 JWT, scopes"] RL["Rate limit"] Tools["Tools search_models · describe_model list_metrics · query_metric · run_sql"] Sem["Semantic compiler metric to AST"] Guard["SQL guard sqlglot AST, fail closed"] Audit[("Audit log JSONL")] Auth --> RL --> Tools Tools -- query_metric --> Sem --> Guard Tools -- run_sql --> Guard Tools -.-> Audit end

Catalog[["Catalog (YAML) models, tiers, PII columns, joins, metrics"]] DB[("DuckDB, read-only no external access, config locked, timeout")]

Loop -- "MCP: stdio, Streamable HTTP or in-process" --> Auth Loop -.->|"live runs only, PII redacted"| LF[("Langfuse traces")] Catalog --> Tools Catalog --> Sem Catalog --> Guard Guard --> DB

Every tool call takes the same path:

  1. resolve the principal from the token;
  2. apply the rate limit;
  3. run the tool against the catalog;
  4. check the SQL;
  5. execute it;
  6. write the audit record.

The architecture notes cover each component and the reasoning behind the main design choices.

Governance model
partneranalystfinancesupport
public models (lanes, carriers, lane and carrier marts)✓✓✓✓
internal models (shipments, customers, tracking, documents, quotes)✓✓✓
restricted models (invoices, revenue marts)✓
PII columns (customer contact name, email, phone)✓

Roles are only presets for dev tokens. The server reads scopes: warehouse:public, warehouse:internal, warehouse:restricted and pii:read. Tiers are contiguous, so a token with restricted but not internal gets public access only.

Defence in depth, from the outside in:

  1. Authentication. Tokens are Ed25519-signed JWTs. The algorithm is pinned, and exp, iat, sub, iss and aud are required. Over HTTP the MCP SDK's auth middleware verifies every request; over stdio the token is verified once at start-up. The token's client_id names the agent, and its scopes are cut to what that agent is permitted in the agent registry. A missing, unknown or disabled agent is rejected, and onboarding another agent is one registry entry.
  2. Semantic layer. query_metric compiles a metric request into a sqlglot AST from the catalog. User values only ever become quoted literals, and identifiers are always quoted.
  3. SQL guard. run_sql SQL, and compiled metric SQL again, must pass these checks:
  • exactly one read-only statement, over visible catalog models only;
  • no file, network, settings or introspection functions;
  • no positional references;
  • no PII columns without pii:read, wherever they appear (select list, filters, joins, *, whole-row references).

The SQL that runs is regenerated from the checked AST, so comments never reach the engine.

  1. Engine. DuckDB is opened read-only, with external access disabled, extension autoload off, a memory limit and a query timeout. Its configuration is locked, so a query cannot undo any of this.
  2. Result budget. Rows are capped, and responses are truncated to a character budget with a flag the agent can see. Results from free-text columns carry a warning that their content is data, not instructions.

The threat model maps each threat to its mitigation and to the test that proves it.

Quickstart

Requires uv.

uv sync

uv run gwm generate # build data/warehouse.duckdb (deterministic) uv run gwm keys # dev Ed25519 keypair in .keys/ uv run gwm token --role analyst # print a signed dev token

Use it from Claude Code
claude mcp add warehouse \

--env GWM_TOKEN="$(uv run gwm token --role analyst --ttl 86400)" \ -- uv --directory "$PWD" run gwm serve

Use it from Claude Desktop
{

"mcpServers": { "warehouse": { "command": "uv", "args": ["--directory", "/absolute/path/to/governed-warehouse-mcp", "run", "gwm", "serve"], "env": { "GWM_TOKEN": " " } } } }

Run it over Streamable HTTP
uv run gwm serve --transport http --port 8000 --audit-log audit.jsonl

clients send: Authorization: Bearer

Without a valid bearer token the server answers 401. With one, each request is served with that token's scopes. /healthz and /readyz answer without a token and return no data.

Deployment

The Dockerfile builds a small image that serves Streamable HTTP as a non-root user. The synthetic warehouse is baked in at /data, and the server needs only a public key at /keys:

A prebuilt image is published for each release as ghcr.io/tongliutl/governed-warehouse-mcp (linux/amd64 and linux/arm64), and the server is listed in the MCP Registry as io.github.tongliuTL/governed-warehouse-mcp. To build it yourself:

docker build -t governed-warehouse-mcp .

uv run gwm keys --dir .keys # dev keys; in production, your identity provider's key docker run --rm -p 8000:8000 --read-only --tmpfs /tmp \ -v "$PWD/.keys/public.pem:/keys/public.pem:ro" governed-warehouse-mcp curl localhost:8000/readyz # {"status": "ready", "catalog_version": "..."}

  • Read-only. The root filesystem can be read-only: the warehouse opens read_only, spilling to disk is off, and nothing is written outside /tmp. Mount your own warehouse with -v /path/to/data:/data:ro.
  • Host names. DNS-rebinding protection only accepts listed Host headers. The image accepts localhost:8000 and 127.0.0.1:8000; behind a proxy, pass your own, for example docker run ... governed-warehouse-mcp --allowed-host mcp.example.com --public-url https://mcp.example.com.
  • Probes. /healthz (the process is up) and /readyz (a trivial query succeeds; 503 otherwise). The image's HEALTHCHECK uses /readyz.
  • CI. Every change builds the image, runs it with a read-only root filesystem, and runs scripts/smoke_http.py: probes, a 401 without a token, an allowed query, a denied one and a refused write.

This makes the server deployable, not operated: there is no identity provider, TLS termination, log shipping or horizontal scaling here. Those belong to the platform it runs on.

Evals

uv run gwm-eval all --gate             # offline: what CI runs

uv run gwm-eval live --trials 3 -

Only the beginning is shown; read the rest in the repo