プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説 ログイン

Governed Warehouse

作者:tongliuTLバージョン 0.2.1i★ 0iパソコンで動く公式サイト ↗

インストール方法

できること

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

作者による原文

  • 接続方法 パソコンで動く
  • アカウントまたはキー キー不要
  • カテゴリ データベース・データセット

一緒に使える

この種の作業を AI に教える Skill。これと一緒に使えます

last30days-skill

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

作者:mvanhorn★ 76,2401 個の skill

Skill · 手順書

timesfm

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

作者:google-research★ 35,7401 個の skill

Skill · 手順書

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…

作者:BigBodyCobain★ 11,6391 個の skill

Skill · 手順書

この順位の理由

一覧は利用スコア(100 点満点)で並びます。内訳は次のとおり

人気0/80GitHub スターか週間ダウンロード数。大きい方を 60、小さい方を 20 で数えます
新しさ12/1230 日以内のリリースかコード更新で満点
応答中0/8前回の確認でクラウドのエンドポイントが応答
利用スコア12/100

品質: 基本チェック 3/3 項目に合格(表示のみ、並び順には不使用) · 勢い: データなし (「急上昇」タブでのみ使用)

インストール

使っているAIアプリを選んで、設定をコピーしてください。

ひとことで AI にインストールしてもらう

Governed Warehouse をインストールして。https://mcp.popnx.com/i/tongliutl-governed-warehouse-mcp.md に従い、コマンドを見せて、私が OK するまで実行しないで。

パソコンで作業できる AI(Claude Code や Cursor など)に貼り付けます。手順を読み、コマンドを見せて、あなたの OK を待ちます。キー不要・登録不要。 · AI が読む全文を見る

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月28日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server Governed Warehouse を入れてください。順番に:1) docker --version で Docker があるか確認。なければ https://www.docker.com/products/docker-desktop/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "governed-warehouse": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Governed Warehouse のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Docker を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    docker --version
    • バージョン番号(例 Docker version …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: Docker Desktop を入れます:Mac は Docker.dmg を開いてアイコンを「アプリケーション」へドラッグ(Mac に合わせて Apple silicon か Intel を選ぶ)· Windows は Docker Desktop Installer.exe をダブルクリック · 入れたら Docker Desktop アプリを開いたままにします。curl コマンドは不要です

    Docker のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: docker --version

    一度入れれば、Docker を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "governed-warehouse": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    Governed Warehouse を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が Governed Warehouse を使っていると言うか、回答に Governed Warehouse のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ Governed Warehouse につなげません

Governed Warehouse はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · Governed Warehouse につなげるアプリを使う

  • 先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Docker を入れてください(1 回だけ)
  • 先にパソコンへ Docker を入れてください(1 回だけ)
  • 先にパソコンへ Docker を入れてください(1 回だけ)

B · データベース・データセット の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Docker を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server Governed Warehouse を入れてください。順番に:1) docker --version で Docker があるか確認。なければ https://www.docker.com/products/docker-desktop/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user governed-warehouse -- docker run -i --rm ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Governed Warehouse のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Docker を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    docker --version
    • バージョン番号(例 Docker version …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: Docker Desktop を入れます:Mac は Docker.dmg を開いてアイコンを「アプリケーション」へドラッグ(Mac に合わせて Apple silicon か Intel を選ぶ)· Windows は Docker Desktop Installer.exe をダブルクリック · 入れたら Docker Desktop アプリを開いたままにします。curl コマンドは不要です

    Docker のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: docker --version

    一度入れれば、Docker を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user governed-warehouse -- docker run -i --rm ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1
  4. Claude Code で /mcp と入力

    Governed Warehouse が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    Governed Warehouse を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が Governed Warehouse を使っていると言うか、回答に Governed Warehouse のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Docker を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server Governed Warehouse を入れてください。順番に:1) docker --version で Docker があるか確認。なければ https://www.docker.com/products/docker-desktop/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "governed-warehouse": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Governed Warehouse のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Docker を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    docker --version
    • バージョン番号(例 Docker version …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: Docker Desktop を入れます:Mac は Docker.dmg を開いてアイコンを「アプリケーション」へドラッグ(Mac に合わせて Apple silicon か Intel を選ぶ)· Windows は Docker Desktop Installer.exe をダブルクリック · 入れたら Docker Desktop アプリを開いたままにします。curl コマンドは不要です

    Docker のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: docker --version

    一度入れれば、Docker を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    Governed Warehouse を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が Governed Warehouse を使っていると言うか、回答に Governed Warehouse のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Docker を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server Governed Warehouse を入れてください。順番に:1) docker --version で Docker があるか確認。なければ https://www.docker.com/products/docker-desktop/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "governed-warehouse": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、Governed Warehouse のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. Docker を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    docker --version
    • バージョン番号(例 Docker version …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: Docker Desktop を入れます:Mac は Docker.dmg を開いてアイコンを「アプリケーション」へドラッグ(Mac に合わせて Apple silicon か Intel を選ぶ)· Windows は Docker Desktop Installer.exe をダブルクリック · 入れたら Docker Desktop アプリを開いたままにします。curl コマンドは不要です

    Docker のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: docker --version

    一度入れれば、Docker を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    Governed Warehouse を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が Governed Warehouse を使っていると言うか、回答に Governed Warehouse のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?Governed Warehouse を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

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"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

レジストリ名
io.github.tongliuTL/governed-warehouse-mcp
週あたりのダウンロードi
npm/PyPIにない
接続方法
パソコンで動く
トランスポート
streamable-http
最新バージョンi
0.2.1
レジストリ公開日i
2026年11月27日
コードの最終更新i
2026年11月27日
作者
tongliuTL
パッケージ
oci: ghcr.io/tongliutl/governed-warehouse-mcp:0.2.1
ウェブサイト
tongliu.md
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

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

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月28日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント tongliuTL で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:昨日

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

未確認:バージョン付きの npm と PyPI パッケージのみ確認できます

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告
作者向け:README にバッジを付ける

作者の方は、このコードを README に貼れます。バッジはこのページにリンクします。

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

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

データベース・データセットのほかのサーバーとの比較i

  • このカテゴリのほかの1335件のうち0%よりスターが多い
  • このカテゴリのほかの1335件のうち99%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1335件のうち99%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Governed Warehouseは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は昨日、最新バージョン(0.2.1)がレジストリに届いたのは昨日です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにDockerも必要です。

代わりに使えるものは?

同じカテゴリには:Supabase, Neon, DBCode, Keboola MCP, WaveHouse Cloud

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Supabase

MCP server for interacting with the Supabase platform

作者:supabase広く使われている↓ 24.6万/週★ 3024 リポジトリ全体のスター昨日更新

すぐ接続できる(URL あり) · ログインが必要✓ 提供元 · supabase.com

Neon

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

作者:neondatabase成長中★ 66722 日前更新

すぐ接続できる(URL あり) · ログインが必要✓ 提供元 · neon.com

DBCode

Query and explore 100+ databases through your DBCode connections.

作者:dbcodeio初期↓ 118/週★ 369 リポジトリ全体のスター2 か月前更新

パソコンで動く✓ 提供元 · dbcode.io

Keboola MCP

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

作者:keboola成長中↓ 355/週★ 849 日前更新

すぐ接続できる(URL あり) · ログインが必要✓ 提供元 · keboola.com

WaveHouse Cloud

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

作者:Wave-RF初期★ 417 日前更新

すぐ接続できる(URL あり) · ログインが必要✓ 提供元 · wavehouse.cloud
似たものと比べる
これ
Governed Warehouse
SupabaseNeonDBCodeKeboola MCPWaveHouse Cloud
動く場所パソコンにインストールが必要クラウドでもパソコンにインストールでも使えるクラウドで動き、インストール不要パソコンにインストールが必要クラウドでもパソコンにインストールでも使えるクラウドで動き、インストール不要
キーが必要いいえはいいいえいいえいいえいいえ
Claude で + から追加いいえはいはいいいえいいえいいえ
基本チェック3/35/55/52/35/54/4
ライセンスMITApache-2.0MITNOASSERTIONMITApache-2.0
料金登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし登録情報に費用の記載なし

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

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 -

冒頭だけを表示しています。続きはリポジトリで読めます