I build schemagate, an open-source MCP server for asking questions of a database from Copilot Chat.
The problem I kept hitting with Copilot on real databases: the model either gets the whole schema (thousands of tokens on every question) or guesses table names. schemagate picks only the tables a question needs, plus the ones a foreign key away, and gives Copilot just those. On databases with 50+ tables that's a median 91% fewer schema tokens (measured on Spider 2.0-lite). Every query is read-only and checked before it runs.
New in 1.23.0, now on GitHub's MCP Registry:
Install from the registry and fill in a normal form: pick the database type from a list, then host, user, password. No connection URL to write, and the password is typed as is.
Already saved databases in VS Code (SQL Server, PostgreSQL or SQLTools extension, or Oracle SQL Developer)? Ask Copilot "which databases can you connect to?" and pick one. It sees names and hosts, never passwords. VS Code keeps saved passwords locked, so the first time you run one command: uvx schemagate-mcp login "<name>"
PostgreSQL, MySQL, SQL Server, Oracle (incl. Autonomous DB), SQLite, DuckDB, Snowflake, Databricks, BigQuery.
Where it stands: #1 for Oracle on the UniQL benchmark (64.93%, with error repair), 74.34 on BIRD's hidden test set, 14,000+ downloads.
What it doesn't do: it won't make the model write better SQL by itself, and on a small database you might as well send the whole schema.
Install: github.com/mcp/ashishsinha1602/schemagate