Midplane MCP server
{
"mcpServers": {
"midplane": {
"command": "npx",
"args": [
"-y",
"midplane@latest",
"midplane",
"server",
"--stdio"
],
"env": {
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"MIDPLANE_APPROVAL_URL": "https://...",
"MIDPLANE_APPROVAL_TOKEN": "<midplane_approval_token>"
}
}
}
}{
"mcpServers": {
"midplane": {
"command": "npx",
"args": [
"-y",
"midplane@latest",
"midplane",
"server",
"--stdio"
],
"env": {
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"MIDPLANE_APPROVAL_URL": "https://...",
"MIDPLANE_APPROVAL_TOKEN": "<midplane_approval_token>"
}
}
}
}{
"mcpServers": {
"midplane": {
"command": "npx",
"args": [
"-y",
"midplane@latest",
"midplane",
"server",
"--stdio"
],
"env": {
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"MIDPLANE_APPROVAL_URL": "https://...",
"MIDPLANE_APPROVAL_TOKEN": "<midplane_approval_token>"
}
}
}
}{
"servers": {
"midplane": {
"command": "npx",
"args": [
"-y",
"midplane@latest",
"midplane",
"server",
"--stdio"
],
"env": {
"DATABASE_URL": "${input:database_url}",
"MIDPLANE_APPROVAL_URL": "${input:midplane_approval_url}",
"MIDPLANE_APPROVAL_TOKEN": "${input:midplane_approval_token}"
}
}
},
"inputs": [
{
"id": "database_url",
"type": "promptString",
"description": "Database url",
"password": true
},
{
"id": "midplane_approval_url",
"type": "promptString",
"description": "Midplane approval url",
"password": true
},
{
"id": "midplane_approval_token",
"type": "promptString",
"description": "Midplane approval token",
"password": true
}
]
}{
"mcpServers": {
"midplane": {
"command": "npx",
"args": [
"-y",
"midplane@latest",
"midplane",
"server",
"--stdio"
],
"env": {
"DATABASE_URL": "postgresql://user:password@host:5432/db",
"MIDPLANE_APPROVAL_URL": "https://...",
"MIDPLANE_APPROVAL_TOKEN": "<midplane_approval_token>"
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall npx -y midplaneversion 0.20.0
What it does
Midplane is a Postgres MCP server that sits between AI agents and a Postgres database, enforcing per-table access policies via SQL AST analysis, masking PII columns before data leaves the database, and recording every query in an audit log. It is aimed at developers and security-conscious teams who want to give AI agents (Claude, Cursor, or any MCP client) access to production databases without bypassing access controls.
- Allow an AI coding agent to query customer or orders tables while ensuring PII columns like email or SSN are masked before results are returned.
- Block destructive SQL operations—such as DELETE without a WHERE clause or DROP TABLE—issued by an AI agent, with every attempt recorded in an audit log.
- Require human approval before an AI agent executes any write statement, with the agent receiving the reviewer's decision and reason before proceeding.
Tools this server exposes
| Tool | Does |
|---|---|
| check_approval | Lets the agent poll for the outcome of a pending human approval on a write statement that was held before execution. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.