Repository navigation
[External Plugin]: schemagate #6160
Description
Plugin name
schemagate
Short description
Text-to-SQL that sends the model ~91% fewer schema tokens on 50+ table databases: a read-only MCP server that hands Copilot only the tables a question needs, and only the ones the user may see. #1 on the BIRD Mini-Dev leaderboard; listed in LangChain's docs.
GitHub repository
ashishsinha1602/schemagate
Plugin path inside the repository
copilot-plugin
Ref to review
No response
Commit SHA to review
b30a9714c43a784a29d7f3c43f1e196412d5eb47
Version
1.15.1
License identifier
Apache-2.0
Author name
Ashish Sinha
Author URL
https://github.com/ashishsinha1602
Homepage URL
https://github.com/ashishsinha1602/schemagate
Keywords
sql
database
text-to-sql
schema
access-control
mcp
postgres
mysql
sqlite
Additional notes for reviewers
Re #6006 ("there are already MCP servers for PostgreSQL, MySQL, MSSQL, and Data API builder"): schemagate is not another database connector. Those servers expose the whole schema, or let the model browse it table by table, and leave the hard part to the model: deciding which of hundreds of tables matter, and never touching the ones this user must not see. schemagate is the layer that does that, in front of any of them.
What it does that a database MCP server does not
- Schema selection, so prompts shrink. It ranks every table for each question (hybrid keyword + embedding retrieval, foreign-key expansion, join-table recovery) and returns DDL for just those. Median schema-token saving on Spider 2.0-lite databases with 50+ tables: 91.1% (BENCHMARKS.md).
- Accuracy, measured on public leaderboards. Durable Ownership - Repository github/awesome-copilot will be archived #1 on the official BIRD Mini-Dev text-to-SQL leaderboard in SQLite, PostgreSQL and MySQL (81.0 / 72.6 / 72.4 EX, bird-bench.github.io), and Add comprehensive Copilot Instructions for Flutter and Dart Development #2 with Gemini 2.5 Flash. On MIT's BEAVER enterprise warehouses it reaches 31-39% execution accuracy on 100-question samples, against 11.4% for the paper's best setup (not yet an official leaderboard entry).
- BIRD hidden test set, scored by the BIRD team: 74.34 EX (simple 81.03 / moderate 72.25 / challenging 56.14; leaderboard row pending), dev 84.03 EX.
- Per-user access control at selection time. The model only ever sees the tables and columns the caller may read: from a policy file, or derived from the database's own GRANTs. Column-level restriction, and on PostgreSQL row-level-security policies are flagged and probed per role, with the views that bypass them named.
- A checked query path.
run_queryparses the SQL and refuses writes, multiple statements, and any object outside the caller's scope, including names hidden in dynamic SQL (a reported advisory, GHSA-r77g, fixed in 1.15.1). - An audit trail. Every selection and query records what was shown, to whom, and why, as a signed log (ML-DSA-65) that can be verified for edits, gaps and reordering.
- Agent mode when one call is not enough.
deep_answerlets the model take small, scope-checked exploring steps before its final query (+17 points over single-shot on BIRD dev with Gemini 2.5 Flash). Off in this plugin unless the user configures a model. - Your organisation's words. A glossary, business rules and an ontology (imported from dbt / Snowflake semantic models / CSV, or learned from past queries) map business terms to the right tables.
- One server for every engine. PostgreSQL, MySQL, SQLite, SQL Server, Oracle, Snowflake, BigQuery and DuckDB, instead of one MCP server per database.
Community and adoption
SchemagateRetrieveris listed in LangChain's official integrations docs (https://docs.langchain.com/oss/python/integrations/retrievers), usable from LangChain and LangGraph apps; a LlamaIndex retriever is on PyPI (llama-index-retrievers-schemagate).- In the official MCP Registry (io.github.ashishsinha1602/schemagate), Glama, TensorBlock's MCP index and awesome-duckdb.
- 34.5k PyPI downloads, 13.9k in the last 30 days (pepy.tech/projects/schemagate). Apache-2.0, releases signed with SLSA provenance.
Safety of this plugin (unchanged from #6006, which passed every intake gate)
- The MCP server is pinned (
uvx --from "schemagate[mcp]==1.15.1" schemagate-mcp) and points atdemo, a bundled sample schema, so installing it connects to nothing and ships no credentials. The README shows how to configure a real database in the user's own MCP config, with the URL inenv. - Every tool is read-only and annotated so. Over stdio the server trusts the principal and roles the client sends: it limits what the model sees, it is not authentication. The skill and README say this.
- No paid service.
answer,semantic_queryanddeep_answeruse a model only if the user configures one on the server; in this plugin they are off. - Install:
copilot plugin install ashishsinha1602/schemagate:copilot-plugin
Submission checklist
- The plugin lives in a public GitHub repository.
- The ref and/or sha I provided is immutable (release tag and/or full 40-character commit SHA), not a branch.
- This submission follows this repository's contribution, security, and responsible AI policies.
- This plugin is not already listed in the Awesome Copilot marketplace.
Activity
github-actions commentedon Nov 2, 2026
🔴 Contributor Reputation Check: HIGH risk
Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.
github-actions commentedon Nov 2, 2026
✅ External plugin intake passed
This submission passed automated intake validation and quality checks and is ready for maintainer review.
View workflow run · Download full quality gate logs
Plugin: schemagate
Repository: https://github.com/ashishsinha1602/schemagate
SHA:
b30a9714c43a784a29d7f3c43f1e196412d5eb47Reviewer signals
These are non-blocking heuristics for maintainer review; they are not evidence of misconduct or low quality.
Quality gate summary
Legend: ✅ pass ·⚠️ warning · 🛑 fail
spec compliance output (✅ pass)
vally lint output (✅ pass)
install smoke test output (✅ pass)
Version match output
Ref/SHA consistency output
Canvas structure output
Canonical external.json payload
{ "name": "schemagate", "description": "Text-to-SQL that sends the model ~91% fewer schema tokens on 50+ table databases: a read-only MCP server that hands Copilot only the tables a question needs, and only the ones the user may see. #1 on the BIRD Mini-Dev leaderboard; listed in LangChain's docs.", "version": "1.15.1", "author": { "name": "Ashish Sinha", "url": "https://github.com/ashishsinha1602" }, "repository": "https://github.com/ashishsinha1602/schemagate", "homepage": "https://github.com/ashishsinha1602/schemagate", "license": "Apache-2.0", "keywords": [ "sql", "database", "text-to-sql", "schema", "access-control", "mcp", "postgres", "mysql", "sqlite" ], "source": { "source": "github", "repo": "ashishsinha1602/schemagate", "path": "copilot-plugin", "sha": "b30a9714c43a784a29d7f3c43f1e196412d5eb47" } }