Schemagate MCP server
io.github.ashishsinha1602/schemagate·v1.15.5·7 starsIdentity-scoped schema selection for text-to-SQL. Returns only the tables the caller may read.
not scanned yet
7 stars159 downloads/wk
Reviews
Write oneNobody has reviewed Schemagate yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Schemagate tools
No tool declarations could be read from the package source. They show once the server is installed.
How Schemagate compares
Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 83/100
- higher than 60% of 802 Databases servers
- GitHub stars
- 7
- more than 76% of 602 Databases servers
- Downloads a week
- 159
- more than 67% of 328 Databases servers with a package
Release history: 20 versions in the registry since 2026-09-19, latest 2026-11-02, typically one every 2 days.
Install Schemagate in Claude Code, Cursor or VS Code
claude mcp add schemagate -- uvx schemagate
What the publisher says
From the Schemagate repository's README, as published. We do not edit it. Read it on GitHub
schemagate — text-to-SQL access control at schema selection
Your text-to-SQL agent picks which tables to show the model before anyone checks what the caller is allowed to read. schemagate does the check first: it filters the schema by the caller's grants, so restricted tables are absent from the prompt rather than ranked low. Works with LangChain, MCP, or any SQL agent, on Postgres, Oracle, MySQL, SQL Server and SQLite.
With row-level security alone the failure is quiet: the model writes valid SQL against a table the caller cannot read, RLS strips every row, and the user is told "no records found" — indistinguishable from "this data does not exist."
Demo · Install · Benchmarks · Local models · What it costs · Coming from Vanna
Same question, two callers, no database and no key:
schemagate demo "salary by employee" # hr_compensation absent
schemagate demo "salary by employee" --principal okta:hr --role payroll # now it is firstAbsent, not ranked low. A table the caller may not read never enters the prompt, so no rewording of the question reaches it and there is nothing to filter out of the answer afterwards.
Try it in the browser — no install, no database, no model call.
And it answers
The selection is a prompt, so the rest follows:
pip install schemagate
schemagate demo "which customers owe us money" --answer --provider anthropic --model <model-id>main.crm_customer main.crm_contact main.v_customer_balance (+5)
8 of 42 objects · ~383 prompt tokens instead of ~2,036
-- SQL written by Anthropic / claude-sonnet-5, from 8 tables
SELECT c.id, p.display_name, v.account_number, v.invoiced, v.paid,
(v.invoiced - v.paid) AS balance_due
FROM v_customer_balance v
JOIN crm_customer c ON c.id = v.id_customer
JOIN core_party p ON p.id = c.id_party
WHERE v.invoiced > v.paid
id display_name account_number invoiced paid balance_due
-- ----------------- -------------- -------- ------- -----------
1 Northwind Trading ACC-1001 33960.0 22080.0 11880.0
2 Kellner GmbH ACC-1002 8760.0 3000.0 5760.0Rows, from a question, with no database to set up — that runs against a bundled 42-object schema. Point it at your own with --url:
schemagate select "which customers owe us money" \
--url "postgresql+psycopg://user:pw@host/db" --answer --provider anthropic --model <model-id>No key? Drop --provider and it prints a prompt to paste into any chat, then run the SQL it gives you back with --sql "SELECT ...".
More of the bundled schema, with the questions people actually type:
schemagate demo "which customers owe us money"
schemagate demo "late shipments by carrier" --prompt # the DDL the model getsAgainst your own database it's the same shape:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Schemagate: common questions
- Is Schemagate MCP server safe?
- Mostly: it is graded B (83/100). Read the Schemagate safety report
- How do I install Schemagate?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Schemagate need an API key?
- Yes. The registry entry asks for
SCHEMAGATE_DATABASE_URL. - Is Schemagate maintained?
- The last commit was 33 days ago (2026-10-02). The latest release is v1.15.5.
- What can I use instead of Schemagate?
- Servers from other publishers that do the same job: Airtable MCP server, LINQ to DB MCP server and IBM Db2 for i MCP server. Compare all Schemagate alternatives.
- How does Schemagate compare with other Databases MCP servers?
- safety score 83/100 (higher than 60% of 802 Databases servers); github stars 7 (more than 76% of 602 Databases servers); downloads a week 159 (more than 67% of 328 Databases servers with a package). Full comparison.
Alternatives to Schemagate
Same job from other publishers: the closest match first, then the best rated.
AirtableRead and write access to Airtable database schemas, tables, and records.not reviewedEstablishedB- LINQ to DBInspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.not reviewedEstablishedA
- IBM Db2 for iRead-only SQL queries and schema inspection for IBM Db2 for i over ODBC, JT400 or Mapepire (SSH).not reviewedEstablishedA
- QueryWeaverAn MCP server for Text2SQL: transforms natural language into SQL using graph schema understanding.not reviewedGrowingA
Grain SQLRun SQL queries and inspect database schemas through safe, visible MCP tools.not reviewedGrowingB