Skip to content
MCP server

Midplane

Postgres gateway for AI agents with table grants, column masking and approval for writes

Runs locallyActively maintainedStatus and history

The repository was last updated 3 days ago and is published under MIT.

Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
GitHub stars
5
Last commit
3 days ago
Language
TypeScript

About Midplane

Midplane is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Every statement an agent sends is parsed, checked against a policy and logged before it reaches the database. The README lists four controls: table access you grant, masked columns, writes held for a person's approval, and containment once an agent has read untrusted content.

It runs next to your databases, and only agents connect to it. In local mode the policy is a YAML file and tokens come from midplane token; in linked mode, started with midplane gateway, policy, identities, approvals and a query log come from Midplane Cloud over a link the gateway opens. The audit log stays on the gateway's disk, hash-chained, with midplane audit export and midplane audit verify commands.

It needs Node 24.16 or newer, is MIT licensed, and also ships as a signed container image at ghcr.io/midplaneai/midplane.

Install

Run in a terminal

claude mcp add midplane --env MIDPLANE_TOKEN='<MIDPLANE_TOKEN>' -- npx -y midplane

Add to claude_desktop_config.json

{
  "mcpServers": {
    "midplane": {
      "command": "npx",
      "args": [
        "-y",
        "midplane"
      ],
      "env": {
        "MIDPLANE_TOKEN": "<MIDPLANE_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "midplane": {
      "command": "npx",
      "args": [
        "-y",
        "midplane"
      ],
      "env": {
        "MIDPLANE_TOKEN": "<MIDPLANE_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "midplane": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "midplane"
      ],
      "env": {
        "MIDPLANE_TOKEN": "<MIDPLANE_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "midplane": {
      "command": "npx",
      "args": [
        "-y",
        "midplane"
      ],
      "env": {
        "MIDPLANE_TOKEN": "<MIDPLANE_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "midplane": {
      "command": "npx",
      "args": [
        "-y",
        "midplane"
      ],
      "env": {
        "MIDPLANE_TOKEN": "<MIDPLANE_TOKEN>"
      }
    }
  }
}

Configuration

  • MIDPLANE_TOKENA token from `midplane token`, verified at start and on every call. It stays in this entry, so give it a --ttl (seconds) as long as the entry should work: the default is an hour.Required

What it does

Policy-checked statements
Each SQL statement is parsed and checked before it runs.
Table access grants
Agents only reach the tables you allow.
Masking at the source
Sensitive columns are masked before results reach the agent.
Write approvals
Writes can be held until a person approves them.
Containment
Restricts what an agent can do after it reads untrusted content.
Hash-chained audit log
Stored on the gateway's disk and verifiable with midplane audit verify.

Good for

  • Give an agent read access to a production Postgres without exposing PII
  • Require human sign-off on writes made by an AI agent
  • Keep a verifiable record of every query an agent ran
  • Try a policy locally from a YAML file before deploying

Pricing

Open source

MIT licensed; linked mode uses Midplane Cloud, pricing not published

Prices change. Check midplane.ai before you buy.

Midplane FAQ

Does it connect out to my database from the cloud?

No. It runs next to your databases and only agents connect in; linked mode uses a link the gateway opens itself.

What runtime does it need?

Node 24.16 or newer, or the signed container image.

What licence is it under?

MIT.

How do I verify the audit log?

Use midplane audit export and midplane audit verify.

Is Midplane free?

Yes. Midplane is open source, so you can use and self-host it for free.

How do I add Midplane to Claude Code?

Run this command in your terminal: claude mcp add midplane --env MIDPLANE_TOKEN='<MIDPLANE_TOKEN>' -- npx -y midplane

What are the best alternatives to Midplane?

The closest alternatives to Midplane are REA, Agent Roast, Leash, Tinplate Edge AI Safety, Security & EU Compliance and SecureCloud.

Alternatives to Midplane

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Agent Roast

    MCP server

    Offline review that flags agent changes which weaken tests, assertions or CI

    Runs locally
    • Open source
    • 4 Hacker News points
    • Developer tools
  3. Leash

    MCP server

    Review what your AI touched, approve risky actions and undo supported changes

    • 1 tool
    • Remote
    • Free
    • 1 GitHub star
    • Security
  4. SecureCloud

    MCP server

    SentinelOne and IT security catalog, prices, quotes and checkout links for Israel

    • 7 tools
    • Remote
    • Free
    • Security
  5. Eikino

    MCP server

    Estimate where photos or video frames were taken and check media for AI generation

    • 3 tools
    • Remote
    • Freemium
    • Security