sql-steward MCP server
io.github.Pawansingh3889/sql-steward·v0.4.0The agent never writes SQL: queries compile from a semantic layer you control, PII refused first.
0 stars22 downloads/wk
Reviews
Write oneNobody has reviewed sql-steward yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
sql-steward tools (9, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
audit_verifyVerify the tamper-evident audit chain (agent-blackbox), if enabled.
describe_entityShow one entity's fields, types and PII tags.
get_metricCompute a pre-approved metric, optionally grouped/filtered by allowed dimensions. The aggregation itself is fixed by the semantic layer.
get_recordsRead rows from one entity.
list_checksList the declared data-quality checks the layer can run.
list_entitiesList the entities (tables) you may read, plus the available metrics.
list_metricsList pre-approved metrics and the dimensions/filters each one allows.
run_checkswrite actionRun the declared data-quality checks and return a readiness summary.
semantic_searchVector similarity search over an entity's embedding column (pgvector).
Public scan report
scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it
- Code scan12 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancerepository archived0/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year9/10
Findings (1)
- highRepository is archived
maint.archived
How sql-steward compares
Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 62/100
- higher than 12% of 802 Databases servers
- Tools
- 9
- the typical Databases server has 8
- Tools that change things
- 11%
- typical: 10%. Fewer write tools means less an agent can break
- Downloads a week
- 22
- more than 8% of 328 Databases servers with a package
What its tools let an agent do: 8 read · 1 run or deploy
Install sql-steward in Claude Code, Cursor or VS Code
claude mcp add sql-steward -- uvx sql-steward
What the publisher says
From the sql-steward repository's README, as published. We do not edit it. Read it on GitHub
[!IMPORTANT]
This repository has moved into the 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.
sql-steward
<!-- mcp-name: io.github.Pawansingh3889/sql-steward -->
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.
Three guarantees
- Read-only by construction. There is no run_sql, query, or execute tool. The compiler can only ever build a SELECT, so a write isn't blocked, it's unrepresentable.
- PII refused before retrieval. Every field can carry a PII tag. If a request touches a category your policy blocks, sql-steward refuses with a structured reason before any SQL is compiled or run.
- Auditable. Every call, refusal and error can be recorded in a tamper-evident, hash-chained log via agent-blackbox, with audit-verify to prove nothing was rewritten.
See it in 10 seconds
pip install sql-steward # or: pipx install sql-steward
sql-steward demo # zero config, no API key, no agent, SQLite1) get_metric('mrr_total', dimensions=['plan']) -> safe aggregate
compiled: SELECT subscriptions.plan, SUM(subscriptions.mrr) AS mrr_total
FROM subscriptions GROUP BY subscriptions.plan LIMIT 1000
{'plan': 'pro', 'mrr_total': 297.0}
{'plan': 'team', 'mrr_total': 598.0}
2) get_metric('mrr_total', dimensions=['customers.country']) -> auto-join
compiled: ... INNER JOIN customers ON subscriptions.customer_id = customers.id ...
3) get_records('customers', fields=['id','email']) -> PII refusal
refused: {"kind": "pii_blocked", "detail": "Field 'customers.email' is tagged
EMAIL_ADDRESS, which this policy refuses."}The semantic layer
This YAML is the entire contract between the agent and your database. Review it like code.
dialect: postgresShortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
sql-steward: common questions
- Is sql-steward MCP server safe?
- With care: it is graded C, so read the findings first (62/100). Read the sql-steward safety report
- How do I install sql-steward?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does sql-steward need an API key?
- Yes. The registry entry asks for
SQL_STEWARD_DB_URL. - Is sql-steward maintained?
- The last commit was 98 days ago (2026-07-29). The latest release is v0.4.0.
- What can I use instead of sql-steward?
- Servers from other publishers that do the same job: Sqlsure MCP server, Orionbelt Semantic Layer MCP server and ZenBrain Memory MCP server.
- How does sql-steward compare with other Databases MCP servers?
- safety score 62/100 (higher than 12% of 802 Databases servers); tools 9 (the typical Databases server has 8); tools that change things 11% (typical: 10%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to sql-steward
Same job from other publishers: the closest match first, then the best rated.
- SqlsureSemantic SQL inspector: catches double-counting, wrong joins, PII exposure before execution.not reviewedGrowingA
- Orionbelt Semantic LayerAPI-first semantic layer MCP server compiling YAML models into dialect-specific SQLnot reviewedGrowingA
- ZenBrain MemoryAgent memory: working, episodic, semantic, procedural and core layers. Local SQLite, no account.not reviewedGrowingA
- Memory VaultLocal-first AI memory layer with hybrid search. Postgres + pgvector. Self-hosted, MIT.not reviewedGrowingB
- DBHubToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLitenot reviewedWidely usedA