Skip to content

[External Plugin]: schemagate #6160

Open

Description

@ashishsinha1602

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_query parses 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_answer lets 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

  • SchemagateRetriever is 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 at demo, 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 in env.
  • 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_query and deep_answer use 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

  1. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    🔴 Contributor Reputation Check: HIGH risk

    Check Risk
    Profile HIGH
    Credential audit NONE

    Maintainers: please review this contributor before merging.
    See the workflow run for full details.
    Automated check powered by AGT.

  2. added
    needs-review:HIGHContributor reputation check flagged HIGH risk
    ready-for-reviewSubmission passed intake validation and is ready for maintainer review
    and removed
    awaiting-reviewSubmission is waiting for automated intake validation
    on Nov 2, 2026
  3. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    ✅ 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

    Reviewer signals

    These are non-blocking heuristics for maintainer review; they are not evidence of misconduct or low quality.

    Signal Result
    Repository age 56 day(s)
    Repository activity no configured signal
    Repository counts 179 stars · 1 watchers · 2 forks · 5 open issues/PRs
    Homepage heuristics ⚠️ pricing

    Quality gate summary

    Legend: ✅ pass · ⚠️ warning · 🛑 fail

    Gate Status
    spec compliance ✅ pass
    vally lint ✅ pass
    install smoke test ✅ pass
    version match ✅ pass
    ref/sha consistency ⚪ not_run
    canvas structure ⚪ not_run
    • spec compliance: pass
    • vally lint: pass
    • install smoke test: pass
    • version match: pass
    • ref/sha consistency: not_run
    • canvas structure: not_run
    • overall: pass
    spec compliance output (✅ pass)
    Agent Plugins v1.0.0 manifest checks passed for plugin.json.
    
    vally lint output (✅ pass)
    ✅ schemagate-sql (2/2 checks passed)
        ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
            ✓ spec-compliance: All spec checks passed.
        ✓ [valid-refs] All file references across 1 skill(s) are valid.
            ✓ valid-refs: All file references resolve to existing files within the skill directory.
    
    1 skill(s) linted, 1 passed
    
    install smoke test output (✅ pass)
    Install smoke test succeeded. Verified /tmp/external-plugin-quality-CSMzNR/copilot-home/.copilot/installed-plugins/external-plugin-intake/schemagate/plugin.json.
    
    Version match output
    - b30a9714c43a784a29d7f3c43f1e196412d5eb47: matched version "1.15.1" at "copilot-plugin/plugin.json".
    
    Ref/SHA consistency output
    Ref/SHA consistency gate skipped because one of source.ref or source.sha was not provided.
    
    Canvas structure output
    Canvas structure gate skipped because plugin is not tagged with "canvas".
    

    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"
      }
    }
  4. added
    awaiting-reviewSubmission is waiting for automated intake validation
    ready-for-reviewSubmission passed intake validation and is ready for maintainer review
    and removed
    ready-for-reviewSubmission passed intake validation and is ready for maintainer review
    awaiting-reviewSubmission is waiting for automated intake validation
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    external-pluginPublic external plugin submissionneeds-review:HIGHContributor reputation check flagged HIGH riskready-for-reviewSubmission passed intake validation and is ready for maintainer review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions