# Schemagate (MCP server)

> 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 173 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx schemagate.

Your text-to-SQL agent picks which tables to show the model before anyone checks what the caller is allowed to read. schemagate does the check first: it filters the schema by the caller's grants, so restricted tables are absent from the prompt rather than ranked low. Works with LangChain, MCP, or any SQL agent, on Postgres, Oracle, MySQL, SQL Server and SQLite.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/ashishsinha1602/schemagate |
| GitHub stars | 173 |
| License | Apache-2.0 |
| Language | Python |
| Transport | stdio |
| Packages | pypi: schemagate |
| Remote URL | none |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Databases |
| Latest release | v1.11.1 (Oct 24, 2026) |
| Last commit | Oct 24, 2026 |
| MCP registry name | io.github.ashishsinha1602/schemagate |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "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

```sh
claude mcp add --env SCHEMAGATE_DATABASE_URL=your-value --transport stdio schemagate -- uvx schemagate
```

### Cursor (.cursor/mcp.json)

```json
{
  "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 (.vscode/mcp.json)

```json
{
  "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 2026-10-07.

## Environment variables

- `SCHEMAGATE_DATABASE_URL` (secret) (required): SQLAlchemy URL of the database to reflect, or 'demo' for the bundled schema
- `SCHEMAGATE_CATALOG_CONFIG`: Optional path to a JSON file with roles, hints and shadow-name overrides

## Similar MCP servers

- [Argon](https://appsgit.com/mcp-servers/argon): Versioned MongoDB sandboxes for AI agents: branch, time-travel, merge, and undo over MCP. (176 stars, MIT)
- [Faucet](https://appsgit.com/mcp-servers/faucet): SQL database to MCP tools and REST API: PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake. (166 stars, MIT)
- [MCP Neo4j Memory](https://appsgit.com/mcp-servers/mcp-neo4j-memory): MCP Neo4j Knowledge Graph Memory Server. (989 stars, MIT, official, needs API key)
- [Prism Coder](https://appsgit.com/mcp-servers/prism-coder): Session memory for coding agents: local-first recall, drift detection, on-device inference. (156 stars, Apache-2.0, needs API key)
- [MCP Server Starrocks](https://appsgit.com/mcp-servers/mcp-server-starrocks): StarRocks MCP (Model Context Protocol) Server. (195 stars, Apache-2.0, needs API key)
- [Avrotize](https://appsgit.com/mcp-servers/avrotize): Schema conversion and schema-driven code generation MCP server. (132 stars, Apache-2.0)

---

Canonical page: https://appsgit.com/mcp-servers/schemagate
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
