Supabase
MCP server for interacting with the Supabase platform
作者による説明(英語の原文)
The agent never writes SQL: queries compile from a semantic layer you control, PII refused first.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
SQL_STEWARD_DB_URL, SQL_STEWARD_LAYER「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"sql-steward": {
"command": "uvx",
"args": [
"sql-steward"
],
"env": {
"SQL_STEWARD_DB_URL": "your-value",
"SQL_STEWARD_LAYER": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add sql-steward --env SQL_STEWARD_DB_URL=your-value --env SQL_STEWARD_LAYER=your-value -- uvx sql-steward動かす前に、空欄の値を入力してください。
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"sql-steward": {
"command": "uvx",
"args": [
"sql-steward"
],
"env": {
"SQL_STEWARD_DB_URL": "your-value",
"SQL_STEWARD_LAYER": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"sql-steward": {
"type": "stdio",
"command": "uvx",
"args": [
"sql-steward"
],
"env": {
"SQL_STEWARD_DB_URL": "your-value",
"SQL_STEWARD_LAYER": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
SQL_STEWARD_LAYER envこの設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント Pawansingh3889 で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
入力が必要なもの:SQL_STEWARD_DB_URL
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(0.4.0)がレジストリに届いたのは4 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。
同じカテゴリには:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
MCP server for interacting with the Supabase platform
MongoDB Model Context Protocol Server
MCP server for interacting with Elasticsearch
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
[!IMPORTANT]
This repository has moved into the [Governed Agent Stack](https://github.com/Pawansingh3889/governed-agent-stack) monorepo.
Active development is now at
packages/sql-steward/.
This repo is archived and read-only. Its full commit history is preserved here;
new work, issues and releases happen in the monorepo.
Part of the Governed Agent Stack: free, on-prem building blocks for an AI agent you can point at a real database and audit.
A governed SQL gateway for AI agents, exposed over the Model Context Protocol. The agent never gets a connection string and never writes SQL. It calls typed tools; sql-steward compiles every query from a semantic layer you control, refuses blocked PII before the query runs, and returns rows. Same tools across SQL Server, Postgres and SQLite.
Most SQL MCP servers hand the model a run_sql tool and try to catch the bad queries on the way out. sql-steward removes the tool. There is no path from a prompt to raw SQL at your database, because the only thing the agent can do is name an entity or a metric and pick from allow-lists you wrote.
See it defend a database live. The governed vs ungoverned demo runs the same request through a naive run_sql agent, which leaks customer PII and empties a table, and through sql-steward, which refuses it at compile time.
run_sql, query, or execute tool. The compiler can only ever build a SELECT, so a write isn't blocked, it's unrepresentable.audit-verify to prove nothing was rewritten.pip install sql-steward # or: pipx install sql-steward
sql-steward demo # zero config, no API key, no agent, SQLite
This YAML is the entire contract between the agent and your database. Review it like code.
dialect: postgres
entities: customers: table: customers fields: id: {type: int} name: {type: text, pii: PERSON} email: {type: text, pii: EMAIL_ADDRESS} country: {type: text} subscriptions: table: subscriptions fields: customer_id: {type: int} plan: {type: text} mrr: {type: numeric}
joins: # nothing reachable that isn't listed here
metrics: mrr_total: # the aggregation is fixed; the agent only entity: subscriptions # chooses dimensions/filters from the lists aggregate: sum field: mrr dimensions_allowed: [plan, status, customers.country] filters_allowed: [status, customers.country]
policy: block_pii: [EMAIL_ADDRESS, CREDIT_CARD] max_rows: 1000
Ask for a join that isn't defined and you get unreachable_entity, not an invented relationship. Ask to group a metric by a dimension that isn't listed and you get dimension_not_allowed. Misspell a metric or field and the error lists what does exist, with the closest spellings, so an agent corrects itself in one turn instead of making a second discovery call.
| Tool | Purpose |
|---|---|
list_entities() | What can be read, plus the available metrics |
describe_entity(entity) | Fields, types and PII tags (blocked ones flagged) |
list_metrics() | Metrics and the dimensions/filters each allows |
get_records(entity, fields, filters, order_by, limit) | Read rows from one entity |
get_metric(metric, dimensions, filters, limit) | Compute a pre-approved aggregate |
semantic_search(entity, query, k, filters) | pgvector nearest-neighbour search over an entity's embedding column |
audit_verify() | Verify the tamper-evident audit chain |
Filters are {field, op, value}; operators are =, !=, <, <=, >, >=, like, in, not in, is null, is not null. Values are always bound parameters, never inlined.
The semantic layer YAML lives wherever you point SQL_STEWARD_LAYER. Claude Desktop (claude_desktop_config.json):
{
"mcpServers": { "sql-steward": { "command": "sql-steward", "env": { "SQL_STEWARD_LAYER": "/full/path/to/semantic.yaml", "SQL_STEWARD_DB_URL": "postgresql+psycopg://readonly@db.internal/warehouse" } } } }
SQL_STEWARD_DB_URL is a SQLAlchemy URL, so the same server reads SQL Server (mssql+pyodbc://...), Postgres (postgresql+psycopg://...) or SQLite (sqlite:///path.db). Install the matching driver with the extras: pip install "sql-steward[postgres]" or "[mssql]".
The semantic layer is the primary control. These are extra layers, all opt-in, and no-ops if the library isn't installed:
pip install "sql-steward[rbac,mask,audit]"
export SQL_STEWARD_POLICY=/path/to/policy.yaml # query-warden second-pass role check export SQL_STEWARD_ROLE=analyst export SQL_STEWARD_MASK=1 # pii-veil masks anything left in results export SQL_STEWARD_AUDIT_DB=logs/steward.db # agent-blackbox audit chain (on if installed) export SQL_STEWARD_QUERY_BUDGET=200 # persistent per-role query cap (SQLite-backed) export SQL_STEWARD_BUDGET_WINDOW=3600 # optional: make the cap a sliding window, in seconds export SQL_STEWARD_EMBED_URL=http://localhost:11434/api/embeddings # local embeddings for semantic_search export SQL_STEWARD_EMBED_MODEL=nomic-embed-text
Give an entity a search block pointing at a pgvector column and the agent gets a semantic_search tool, governed exactly like everything else (PII refused, results masked, calls audited):
entities:
documents: table: documents fields: id: {type: int} title: {type: text} embedding: {type: vector} search: vector_column: embedding dim: 768 returns: [id, title]
The query text is embedded locally (set SQL_STEWARD_EMBED_URL to a local Ollama endpoint, so nothing leaves the building), and matched with pgvector's <=> operator. PostgreSQL only. The embedding column is never returned.
sql-steward audit-verify checks it.sql-steward governs the path from the model to your database. It assumes the process that calls its tools is trusted. That boundary is the difference between deploying it safely and exposing it, so it is worth stating plainly.
What it enforces, whatever the model asks. Every call runs the same gate: read-only by construction, blocked PII refused before retrieval, an optional role check via query-warden, results masked by pii-veil, and a hash-chained audit of the call. A jailbroken model still cannot write, cannot read a blocked column, and cannot reach an entity the layer does not define. These hold by construction, not by trusting the model to behave.
What it does not do. sql-steward is an enforcement plane, not a front door.
SQL_STEWARD_ROLE is configuration, not a verified identity; sql-steward trusts that the role it is handed is the correct one.SQL_STEWARD_DB_URL and the audit key AGENT_BLACKBOX_KEY are read from the environment; supply them from a secret store, not a checked-in file.What you provide. sql-steward is built to sit behind a trusted caller, whether that is an MCP host on the same machine or a gateway that has already authenticated the user.
The threat it is built for. The design assumes a capable, possibly compromised model and a trusted operator. It bounds what the agent can do with your database. It does not replace your identity provider and is not meant to face an untrusted network alone. Point it at a real database from behind a host or gateway you trust, and the three guarantees are what the model is left with.
A typical SQL MCP validates arbitrary SQL the model wrote (a blocklist: catch what's bad). sql-steward compiles SQL from definitions you wrote (an allow-list: only what's described exists). The read-only and PII guarantees hold by construction rather than by inspection, and the query surface is the same across three engines.
The nearest tools are not other MCP servers, they are semantic layers. Cube and the dbt Semantic Layer already expose compiled, metric-only access, and Snowflake Cortex Analyst and Databricks Genie both answer natural-language questions over a governed model. If you run on their platform, use them. This project exists for the case they do not cover:
冒頭だけを表示しています。続きはリポジトリで読めます