--- title: "The MCP gateway for Postgres" sidebarTitle: "What is Midplane" description: "A gateway between AI agents and your Postgres databases. Every statement is checked against your policy and recorded before it runs." --- ![An AI agent sends five statements, and Midplane, drawn as a plane between the agent and Postgres, checks each one against your policy and records it before it runs. Two reads pass through to Postgres: one is answered, the other answered with its emails hashed. Three stop at Midplane: a read of the api_keys table is blocked because the table is not open to agents, a delete waits for your approval, and dropping the orders table is blocked because schema changes are denied.](/images/overview.png) The gateway runs in your network, next to your databases. In Midplane Cloud you write the policy, approve held writes and read the Query log. Agents reach the gateway through Midplane's relay, which passes their encrypted traffic without reading it, or at a URL of your own. Midplane never sees your query results or connection strings. From a new project to your agent's first query. The parts, how agents reach the gateway, and what stays in your network. On your computer, a server, or a platform. ## What it enforces Denied by default. You open tables one by one, or all for reading. Emails hashed, phones shortened, dates generalized, inside the query. A write can wait for a person to approve the exact statement. An agent that reads untrusted text loses access to secret tables. Every statement is also recorded in an audit log on the gateway's own disk. The gateway is MIT licensed, with its source on [GitHub](https://github.com/midplaneai/midplane).