Schemagate
Schemagate is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Identity-scoped schema selection for text-to-SQL. It has 137 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx schemagate.
github.com/ashishsinha1602/schemagate (opens in a new tab)
Data as of from the GitHub API and the official MCP registry; description from the project's repository. Report an error
- Needs API key
- Databases
- Apache-2.0
- Too new to judge
Install Schemagate
Generated from the server's MCP registry entry. Replace your-value with your own values.
Claude Desktop
{
"mcpServers": {
"schemagate": {
"command": "uvx",
"args": [
"schemagate"
],
"env": {
"SCHEMAGATE_DATABASE_URL": "your-value"
}
}
}
}Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.
Claude Code
claude mcp add --env SCHEMAGATE_DATABASE_URL=your-value --transport stdio schemagate -- uvx schemagateCursor
{
"mcpServers": {
"schemagate": {
"type": "stdio",
"command": "uvx",
"args": [
"schemagate"
],
"env": {
"SCHEMAGATE_DATABASE_URL": "your-value"
}
}
}
}Project file; use ~/.cursor/mcp.json to enable it in every project.
VS Code
{
"inputs": [
{
"type": "promptString",
"id": "schemagate_database_url",
"description": "SCHEMAGATE_DATABASE_URL",
"password": true
}
],
"servers": {
"schemagate": {
"type": "stdio",
"command": "uvx",
"args": [
"schemagate"
],
"env": {
"SCHEMAGATE_DATABASE_URL": "${input:schemagate_database_url}"
}
}
}
}Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).
Environment variables
Variables the server reads at startup.
| Name | Required | Description |
|---|---|---|
SCHEMAGATE_DATABASE_URLsecret | Yes | SQLAlchemy URL of the database to reflect, or 'demo' for the bundled schema |
SCHEMAGATE_CATALOG_CONFIG | No | Optional path to a JSON file with roles, hints and shadow-name overrides |
About Schemagate
Most text-to-SQL prompts carry the whole schema, and on a big database that is most of the prompt, on every question. schemagate sends the model only the tables the question needs: 91.1% fewer schema tokens (median) on databases with 50+ tables (benchmark). It filters by the caller's grants first, so restricted tables are absent from the prompt rather than ranked low. Works with LangChain, LlamaIndex, MCP, or any SQL agent, on Postgres, Oracle, MySQL, SQL Server and SQLite.
- llm
- mcp
- mcp-server
- nl2sql
- oracle
- postgresql
- rag
- text2sql
- ai-agents
- data-engineering
Similar MCP servers
More databases MCP servers
Prism Coder
dcostenco/prism-coder
Session memory for coding agents: local-first recall, drift detection, on-device inference.
Maintained · last commit Nov 14, 2026
DatabasesTypeScriptAvrotize
clemensv/avrotize
Schema conversion and schema-driven code generation MCP server.
Active · last commit Nov 9, 2026
DatabasesPythonOpen Legal Data (Germany)
openlegaldata/oldp
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
Maintained · last commit Nov 11, 2026
OfficialDatabasesPythonAldine
trahloff/Aldine
Self-hosted collaborative LaTeX editor: read and edit files, typeset, get the errors and the PDF.
Active · last commit Nov 15, 2026
DatabasesTypeScriptMnemosyne
28naem-del/mnemosyne
Evidence-tracked local memory MCP server: one SQLite file; corrections retire dependent memories.
Active · last commit Nov 10, 2026
DatabasesTypeScriptGoSQLX
ajitpratap0/GoSQLX
SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.
Active · last commit Nov 15, 2026
DatabasesGo
How do I install the Schemagate MCP server?
Add the command uvx schemagate to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.
Is Schemagate free?
The server is open source under the Apache-2.0 license, so running it is free. It needs credentials (SCHEMAGATE_DATABASE_URL) for the service it connects to, which may require a paid account.
Is Schemagate actively maintained?
The most recent commit was on Nov 10, 2026. The latest release is v1.18.1, published Nov 11, 2026. appsgit only lists MCP servers with a commit in the last six months.