# Midplane - [The MCP gateway for Postgres](https://midplane.ai/docs/index.md): A gateway between AI agents and your Postgres databases. Every statement is checked against your policy and recorded before it runs. - [How it works](https://midplane.ai/docs/how-it-works.md): The gateway, the relay, your databases, projects and agents: how agents reach the gateway, the path of a statement, and what stays in your network. - [Get started](https://midplane.ai/docs/get-started.md): From a new Midplane Cloud project to the first query an agent makes through your gateway. - [Prepare your database](https://midplane.ai/docs/prepare-database.md): Create a read-only role for the gateway, write its connection string, and check that the gateway connects. - [Connect Supabase to AI agents over MCP](https://midplane.ai/docs/prepare-database/supabase.md): Let Claude Code, Cursor and other MCP clients query Supabase through the gateway: a read-only role, the session pooler's connection string, and a first check. - [Connect Neon to AI agents over MCP](https://midplane.ai/docs/prepare-database/neon.md): Let Claude Code, Cursor and other MCP clients query Neon through the gateway: a read-only role, the direct connection string, and a first check. - [Connect Amazon RDS or Aurora to AI agents over MCP](https://midplane.ai/docs/prepare-database/rds.md): Let Claude Code, Cursor and other MCP clients query a private RDS or Aurora database: the gateway in the VPC, a read-only role, and a first check. - [Connect Railway Postgres to AI agents over MCP](https://midplane.ai/docs/prepare-database/railway.md): Let Claude Code, Cursor and other MCP clients query Railway's Postgres through the gateway: a TCP proxy, a read-only role, and a first check. - [Deploy the gateway](https://midplane.ai/docs/gateway/deploy.md): What the gateway is, where to run it, and the steps to get it running on your computer, on a server with Docker, or on a platform. - [Run the gateway on AWS with CloudFormation](https://midplane.ai/docs/gateway/aws.md): One CloudFormation stack puts the gateway in your VPC, next to RDS or Aurora: an EC2 instance with nothing inbound, its env file in Secrets Manager and its logs in CloudWatch. - [Run the gateway on Fly.io](https://midplane.ai/docs/gateway/fly.md): Run the gateway on one Fly.io machine with a volume, behind Midplane's relay: no IP address or service, its connection strings in Fly's secrets. - [Run the gateway on Render](https://midplane.ai/docs/gateway/render.md): Deploy the gateway as a Render background worker with a disk, from Midplane's Blueprint, behind Midplane's relay: no port or domain. - [Run the gateway on Kubernetes with Helm](https://midplane.ai/docs/gateway/kubernetes.md): Install the gateway with Midplane's Helm chart, behind Midplane's relay: one pod with its own disk, its env file in a Secret, and no Service or Ingress. - [Multiple gateways](https://midplane.ai/docs/gateway/multiple-gateways.md): A gateway per network or region, replicas of one gateway, and adding databases later. - [People and roles](https://midplane.ai/docs/organization.md): Invite people into your organization, give them roles, remove them, and delete the organization. - [Troubleshooting](https://midplane.ai/docs/troubleshooting.md): What each message from the gateway and the dashboard means, and what to do about it. - [Configuration](https://midplane.ai/docs/gateway/configuration.md): Every key in midplane.yaml, in both modes, the variables setup reads, every command and the policy. - [Linked mode](https://midplane.ai/docs/gateway/linked-mode.md): Enrollment, bundles, databases a gateway can't reach, what goes up, replicas and revoking. - [Local mode](https://midplane.ai/docs/gateway/local-mode.md): The policy in midplane.yaml, tokens from midplane token, no Midplane Cloud. - [Secrets](https://midplane.ai/docs/gateway/secrets.md): Connection strings, the mask salt and the gateway's identity: where they live and how to keep them. - [Reaching a gateway from hosted agents](https://midplane.ai/docs/gateway/hosted-agents.md): claude.ai, ChatGPT and other hosted agents reach the gateway at a Midplane URL through the relay, through a vendor tunnel, or at your own endpoint. - [Operations](https://midplane.ai/docs/gateway/operations.md): Health checks, logs worth alerting on, stopping, resources and backups. - [Upgrading](https://midplane.ai/docs/gateway/upgrading.md): Move a gateway to a new release: what carries over, and the commands for Docker, your computer and each deploy template. - [The gateway's MCP tools](https://midplane.ai/docs/agents/tools.md): What an agent can call through the gateway: query, write, list_tables, describe_table and check_approval, their inputs and results, and how claude.ai and ChatGPT gate them. - [Connect Claude Code to Postgres over MCP](https://midplane.ai/docs/agents/claude-code.md): Add the gateway to Claude Code, sign in, and choose which Postgres databases it may read or write. - [Connect Cursor to Postgres over MCP](https://midplane.ai/docs/agents/cursor.md): Add the gateway to Cursor, sign in, and choose which Postgres databases it may read or write. - [Connect VS Code to Postgres over MCP](https://midplane.ai/docs/agents/vs-code.md): Add the gateway to VS Code so GitHub Copilot can query Postgres: sign in, then choose which databases it may read or write. - [Connect claude.ai to Postgres over MCP](https://midplane.ai/docs/agents/claude-ai.md): Add the gateway's URL to claude.ai as a custom connector, sign in, and choose which Postgres databases Claude may read or write. - [Connect ChatGPT to Postgres over MCP](https://midplane.ai/docs/agents/chatgpt.md): Add the gateway's URL to ChatGPT as a custom MCP server, sign in, and choose which Postgres databases it may read or write. - [Masking](https://midplane.ai/docs/policies/masking.md): The transforms, unreviewed columns, what else changes once a database has masks, and the known limits. - [Approvals and taint](https://midplane.ai/docs/policies/approvals-and-taint.md): Held writes and containment, from the operator's side. - [Security](https://midplane.ai/docs/security.md): What Midplane Cloud and Midplane's relay can and can't see, the relay's DNS caveat, how to watch Certificate Transparency logs for your gateway, and how to report a vulnerability. - [Audit](https://midplane.ai/docs/audit.md): The gateway's audit log, what goes to Midplane Cloud, retention, export and verification. - [Verifying a release](https://midplane.ai/docs/releases.md): Check the npm package's provenance and the image's signature and SBOM. ## Optional - [GitHub](https://github.com/midplaneai/midplane) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.