← Back to directory
S

SchemaGate

Community
Selects database schema for text-to-SQL using the caller’s access.
Category
Database #21 of 86
Stars
★ 129 Very popular
Transport
stdio (local process)
Runtime
Python
Credentials
No credential needed
License
Apache-2.0
Last commit
Tools
14
58FMRS · C

This server provides schema selection, access filtering, and query-related tools for database text-to-SQL workflows over MCP. The source lists stdio transport, multiple database types, and filtering based on caller identity or database grants. Operators should verify identity propagation, grant configuration, and read-only database credentials.

Strongest · Documentation 15/20 Weakest · Reliability 9/20

Reliability
9/20
Security and permissions
10/20
Maintenance
10/20
Documentation
15/20
Setup experience
14/20
Why each score
Reliability 9/20
The README describes MCP tools, database support, read-only query checks, catalog refresh behavior, and local run examples, making the intended happy path reasonably clear. The supplied material contains no server source, committed test contents, or CI workflow contents, so startup, initialization and tool-list handshake, error handling, and actual tool behavior cannot be verified. This deduction follows the static-review rule and keeps the score at or below 12.
Security and permissions 10/20
The material says credentials are configured through environment variables and recommends a read-only database account. It describes visibility scoped by caller identity and database grants, and says the query tool checks read-only SELECT statements. These controls are documented but not supported by source code here; grant-based restriction also depends on the client sending the caller identity, with no evidence describing how that identity is verified. No evidence provided establishes a red-line issue.
Maintenance 10/20
The supplied facts include an Apache-2.0 license, PyPI version 1.23.0, and a non-archived status, which are useful release and licensing signals. There is no evidence about commit or release cadence, dependency updates, issue response, or a security reporting channel. Stars and open issue counts do not add maintenance points.
Documentation 15/20
The README covers installation options, database configuration, MCP client examples, a tool overview, access-control options, and several benchmark limitations. Deductions reflect that important security and runtime behavior cannot be verified from source here, troubleshooting and tool-parameter details are incomplete in the supplied material, and performance and accuracy figures remain repository claims for this review.
Setup experience 14/20
The README and manifest provide PyPI installation, uvx startup, stdio transport, environment-variable configuration, and examples for several clients. The path is concrete and supports many database choices. Deductions reflect the number of configuration choices and the need to prepare credentials, drivers, and connection settings for a real database; there is also no verifiable CI or test evidence for cross-platform installation or a successful first handshake, so the score stays at or below 15.

Static review · not runReviewed 2026-12-04

Read the FMRS scoring method →

Fit and risk

What it can accessConnects to a database

Best for

  • Building text-to-SQL applications that need schema visibility scoped by identity or role.
  • Database agent workflows that benefit from sending less schema information to a model.
  • Teams connecting the listed database types through MCP.

Not for

  • Users who do not need SQL databases or text-to-SQL.
  • Workflows that require database writes or modifications; the described query execution is read-only.
  • Deployments that cannot supply valid database connection details and do not use the built-in demo database.

Required permissions

  • Connecting to a real database requires its connection details; the project recommends a read-only database user.
  • For database-grant-based filtering, the client must send caller identity and the server must set `SCHEMAGATE_RESTRICT_FROM_GRANTS=1`.
  • Database passwords and full connection URLs can be supplied through configuration fields marked secret.

Risks and side effects

  • Access filtering depends on correct caller identity, roles, and policy configuration. Calls without identity are treated as anonymous and see only objects granted to everyone.
  • Grant-based filtering applies to the database types and grant mechanisms described in the source; misconfiguration or missing identity may produce an unexpected visibility scope.
  • Query tools can read data available to the configured database credentials; use a read-only account and protect credentials.
  • The source says `run_query` checks read-only SELECT statements, but that alone does not establish that every deployment or database configuration is risk-free.

Setup

Before you start

Runtime:Python

SCHEMAGATE_DB_TYPE required Database type; choose demo to use the built-in sample database without additional database configuration.
SCHEMAGATE_DB_PASSWORD optionalsecret Database password, provided by your database administrator or service.
SCHEMAGATE_DATABASE_URL optionalsecret Optional full SQLAlchemy database URL used instead of the individual connection fields.
Other optional settings (7)
SCHEMAGATE_DB_HOST optional Database host name or IP, provided by your database service.
SCHEMAGATE_DB_PORT optional Database port; it can usually be left empty to use the standard port.
SCHEMAGATE_DB_USER optional Database username; a read-only account is recommended.
SCHEMAGATE_DB_NAME optional Database name; enter the name, service, dataset, or file path appropriate to the database type.
SCHEMAGATE_DB_CONNECTION optional Oracle only: the name of a connection saved in SQL Developer for VS Code or SQLcl.
SCHEMAGATE_DB_OPTIONS optional Extra database settings in key=value&key=value format, such as a Databricks http_path or Snowflake warehouse.
SCHEMAGATE_RESTRICT_FROM_GRANTS optional Set to 1 to scope each caller to tables and columns allowed by database GRANTs; the client must send the caller's identity.

Launch with uvx by setting the command to uvx and the argument to schemagate-mcp. Set SCHEMAGATE_DB_TYPE to demo to use the built-in sample database. To connect to a real database, provide the needed database type, host, port, username, password, and database name, or set SCHEMAGATE_DATABASE_URL. To scope visibility using database grants, set SCHEMAGATE_RESTRICT_FROM_GRANTS to 1; the client must also send the caller’s identity.

claude_desktop_config.json
{
  "command": "uvx",
  "args": [
    "schemagate-mcp"
  ],
  "env": {
    "SCHEMAGATE_DB_TYPE": "demo"
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

Check that it works

After installation, confirm the schemagate tools appear in your client's tool list. Ask which databases are available to connect to; with the demo database configured, ask a sample data question and confirm that it returns results.

Troubleshooting

  1. Check `SCHEMAGATE_DB_TYPE` and the required host, port, username, password, and database name; also verify `SCHEMAGATE_DATABASE_URL` if used.
  2. For connection failures, confirm the database is reachable from the MCP server environment and that the relevant driver and connection options are provided.
  3. If expected objects are missing, check that the client sends the correct caller identity and roles, and verify the database-grant filtering setting.
  4. For server-side `answer` or `deep_answer` model features, check the provider, model name, and required credentials.

Things to try

Once connected, you can ask your AI assistant things like:

  • Find the tables relevant to quarterly revenue and explain why they were selected.
  • Query the customer invoices that are still unpaid.
  • Compare the execution plans and performance of these two query approaches.

Tools 14

select_schema read-only
Select relevant schema objects for a question, scoped to the caller’s access.
list_objects read-only
List database objects visible to the caller.
describe_object read-only
Show structure information for a visible database object.
run_query read-only
Run a read-only query after SQL safety checks.
explain_query read-only
Explain a query.
compare_queries read-only
Compare queries.
optimize_query read-only
Optimize a query.
semantic_query read-only
Run a semantic query.
Show 6 more tools
answer read-only
Answer a question; available when a server-side model is configured.
deep_answer read-only
Produce a deeper answer to a question; available when a server-side model is configured.
refresh_catalog read-only
Refresh the database catalog.
health read-only
Check server health.
list_connections read-only
List recognized saved connections; available in local stdio installs.
connect_database read-only
Switch to a saved database connection; available in local stdio installs.

Use cases

Give a text-to-SQL agent question-relevant schema filtered by access.
Limit visible tables and columns by caller identity and roles before SQL generation.
Query a connected database through read-only SQL tools.

Supported clients

Claude Desktop
Cursor
VS Code
Claude Code
LangGraph

Listed from the project's documentation, not tested by this site.

Overview

SchemaGate is a database schema selection MCP server for text-to-SQL. It selects relevant tables for a question and can exclude tables and columns the caller is not allowed to read, using caller identity, roles, or database grants. It supports multiple database types and communicates with MCP clients over stdio.

Similar servers

Source revision bb2894ebdc2f Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/schemagate.svg)](https://followmcp.com/en/servers/schemagate)