Skip to content
MCP server

DBShield Database Guardrail & Sandboxing MCP Server

Guardrail MCP server that dry-runs agent SQL and masks sensitive tables

Runs locally

DBShield Database Guardrail & Sandboxing MCP Server is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
Version
0.2.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add dbshield -- npx -y @ritualdev-lab/dbshield

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "dbshield": {
      "command": "npx",
      "args": [
        "-y",
        "@ritualdev-lab/dbshield"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbshield": {
      "command": "npx",
      "args": [
        "-y",
        "@ritualdev-lab/dbshield"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbshield": {
      "command": "npx",
      "args": [
        "-y",
        "@ritualdev-lab/dbshield"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "dbshield": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ritualdev-lab/dbshield"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add dbshield -- npx -y @ritualdev-lab/dbshield

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.dbshield]
command = "npx"
args = ["-y", "@ritualdev-lab/dbshield"]

Codex setup guide

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

{
  "mcpServers": {
    "dbshield": {
      "command": "npx",
      "args": [
        "-y",
        "@ritualdev-lab/dbshield"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user dbshield npx -- -y @ritualdev-lab/dbshield

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "dbshield": {
          "command": "npx",
          "args": [
            "-y",
            "@ritualdev-lab/dbshield"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • DBSHIELD_DIALECTTarget database dialect (postgres, mysql, sqlite)
  • DBSHIELD_DB_URLConnection URL or file path for target database

About DBShield Database Guardrail & Sandboxing MCP Server

DBShield targets the gap between what an AI coding agent says it wants and what its SQL does. A mutation is run inside a transaction that is rolled back, so the agent sees the affected rows and column changes before anything touches the real database.

If the effect looks out of line, such as a delete hitting far more rows than expected or a role column changing, the change is held for sign-off through a Slack or Teams card. The README also describes virtual schema masking, which hides tables like credentials or api_keys from introspection queries, plus query normalisation against comment and Unicode tricks and an HMAC-signed audit trail.

It supports PostgreSQL, MySQL and SQLite and is configured with a dialect and a connection URL. It is MIT licensed and runs over stdio from npm.

What it does

Dry-run sandbox
Runs writes in a rolled-back transaction to preview exact row impact.
Intent versus effect check
Compares the stated intent with the simulated blast radius.
Schema masking
Hides sensitive tables and columns from introspection.
Human approval
Sends risky changes to Slack or Teams for sign-off.
Signed audit trail
Records commits with an HMAC-SHA256 ledger.

Good for

  • Stop a missing WHERE clause from wiping a table
  • Keep API keys and PII out of an agent's context
  • Require sign-off on bulk production changes
  • Preview what an agent's migration would change

Pricing

Open source

MIT licensed

DBShield Database Guardrail & Sandboxing MCP Server FAQ

Which databases work?

PostgreSQL, MySQL and SQLite.

How is DBShield Database Guardrail & Sandboxing MCP Server configured?

With DBSHIELD_DIALECT (default sqlite) and DBSHIELD_DB_URL for the target.

Which clients does DBShield Database Guardrail & Sandboxing MCP Server name?

Cursor, Claude Desktop, Antigravity and Windsurf.

What licence is DBShield Database Guardrail & Sandboxing MCP Server under?

MIT, per the README badge.

Is DBShield Database Guardrail & Sandboxing MCP Server free?

Yes. DBShield Database Guardrail & Sandboxing MCP Server is open source, so you can use and self-host it for free.

How do I add DBShield Database Guardrail & Sandboxing MCP Server to Claude Code?

Run this command in your terminal: claude mcp add dbshield -- npx -y @ritualdev-lab/dbshield

What are the best alternatives to DBShield Database Guardrail & Sandboxing MCP Server?

The closest alternatives to DBShield Database Guardrail & Sandboxing MCP Server are REA, AiSOC, x64dbg-mcp-server, redamon and Treasure Map.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers