# Approval gate for databases

The Approval gate for databases MCP server for Claude Code lets database reads pass and holds changes until another person approves them. Each approved call runs once.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: hibira-io
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/hibira-io/mcp-approval-gate
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/approval-gate-for-databases

## What it does

Approval gate for databases sits between an AI client and a database MCP server. Read requests pass through; changes to data or schema wait for approval from another person, who reviews the statement on a Hibira Approvals page. An approved call runs once. If the approval service cannot be reached, the request does not run.

The setup requires a Hibira Approvals workspace and a database MCP server. Its install command passes `GATE_COMMAND`, `HIBIRA_APP_ID`, `HIBIRA_KEY`, and `HIBIRA_SECRET`; `GATE_LABEL` can also identify the database. Reads work before the gate connects to the workspace.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GATE_COMMAND`, `HIBIRA_APP_ID`, `HIBIRA_KEY`, `HIBIRA_SECRET`, `GATE_LABEL`, `GATE_PUSH_INTERESTS`, `GATE_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GATE_COMMAND=<GATE_COMMAND> --env HIBIRA_APP_ID=<HIBIRA_APP_ID> --env HIBIRA_KEY=<HIBIRA_KEY> --env HIBIRA_SECRET=<HIBIRA_SECRET> --env GATE_LABEL=<GATE_LABEL> --transport stdio approval-gate-for-databases -- npx -y @hibira-io/mcp-approval-gate
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add approval-gate-for-databases --env GATE_COMMAND=<GATE_COMMAND> --env HIBIRA_APP_ID=<HIBIRA_APP_ID> --env HIBIRA_KEY=<HIBIRA_KEY> --env HIBIRA_SECRET=<HIBIRA_SECRET> --env GATE_LABEL=<GATE_LABEL> -- npx -y @hibira-io/mcp-approval-gate
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "approval-gate-for-databases": {
            "command": "npx",
            "args": [
                "-y",
                "@hibira-io/mcp-approval-gate"
            ],
            "env": {
                "GATE_COMMAND": "<GATE_COMMAND>",
                "HIBIRA_APP_ID": "<HIBIRA_APP_ID>",
                "HIBIRA_KEY": "<HIBIRA_KEY>",
                "HIBIRA_SECRET": "<HIBIRA_SECRET>",
                "GATE_LABEL": "<GATE_LABEL>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "approval-gate-for-databases": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@hibira-io/mcp-approval-gate"
            ],
            "env": {
                "GATE_COMMAND": "<GATE_COMMAND>",
                "HIBIRA_APP_ID": "<HIBIRA_APP_ID>",
                "HIBIRA_KEY": "<HIBIRA_KEY>",
                "HIBIRA_SECRET": "<HIBIRA_SECRET>",
                "GATE_LABEL": "<GATE_LABEL>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GATE_COMMAND=<GATE_COMMAND> -e HIBIRA_APP_ID=<HIBIRA_APP_ID> -e HIBIRA_KEY=<HIBIRA_KEY> -e HIBIRA_SECRET=<HIBIRA_SECRET> -e GATE_LABEL=<GATE_LABEL> approval-gate-for-databases npx -y @hibira-io/mcp-approval-gate
```
Replace <…> with your own values. 2 more environment variables are in the server README

## When to use it
- let database reads proceed without an approval pause
- hold SQL changes until a supervisor reviews them
- require fresh approval when a call's arguments change
- stop write requests if the approval service is unreachable

## Example prompts
- Mark this order as refunded in the database.
- Run this SQL update against the database.
- Apply this migration to the database.

## Similar
- [planetscale-change-gates-and-approval-contract](https://affpapa.org/en/nevibecode/skills/planetscale-change-gates-and-approval-contract.md) — skill · 1900 installs
- [cloud-databases-onboarding](https://affpapa.org/en/nevibecode/skills/cloud-databases-onboarding.md) — skill · 3600 installs
- [databases](https://affpapa.org/en/nevibecode/skills/databases.md) — skill · 447 installs
- [digitalocean-managed-databases](https://affpapa.org/en/nevibecode/skills/digitalocean-managed-databases.md) — skill · 411 installs
- [vector-databases](https://affpapa.org/en/nevibecode/skills/vector-databases.md) — skill · 128 installs
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16928 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
