Skip to Content
dbmcp

The privacy first MCP server for SQL databases

An assistant lists last week's biggest orders through dbmcp; customer names and email addresses come back as placeholders while order totals stay visible

is the privacy first Model Context Protocol (MCP) server for SQL databases. Out of the box, redacts e-mail addresses, phone numbers, bank and card numbers, national IDs, API keys, and other pattern-detected values inside the server, so the AI client never sees them. An optional local model adds names and places, and column rules cover any column you name, with ready-made templates for popular applications. Redaction is on by default, and access is read-only by default. It works with any MCP-compatible client including Claude Desktop, Cursor, and others.

Quick Install

curl -fsSL https://dbmcp.haymon.ai/install.sh | bash

For more installation options, see Installation.

Supported Databases

  • MySQL 8.4+
  • MariaDB 10.11+
  • PostgreSQL 15+
  • SQLite 3.54

The exact versions tested, and the warning logged on others, are listed on Supported versions.

Key Features

  • Redaction on by default — sensitive data in query results is replaced before the AI client sees it; keyed tokens keep equal values equal, so the assistant can still count, group, and join (details)
  • Finds what you did not label — 48 built-in data types, from contact details and national IDs to bank numbers, API keys, and VAT numbers, plus an optional local model for names, places, and company names
  • Column rules that follow the data — every value of a named column is rewritten however a query reaches it, and statements that cannot be proven safe are refused (details, residual risks)
  • Templates for popular applications — ready-made column rules for Shopware, Magento, WooCommerce, Odoo, Keycloak, and more, listing every table that holds personal data so none is forgotten
  • Fewer side doors — errors that would echo ruled values are withheld, results are fenced as untrusted data to make prompt injection harder, and write operations are blocked unless explicitly enabled
  • Stdio and HTTP transport — works as a local stdio server or a remote HTTP server with CORS preflight and server-side Origin/Host allowlists
  • SSH tunnel — reach MySQL, MariaDB, or PostgreSQL through an SSH bastion with the embedded client: password or key auth, known_hosts verification, automatic reconnect (details)

How It Works

  1. Query. The AI assistant discovers tables, inspects schemas, and runs SQL through 's MCP tools, read-only unless you enable writes.
  2. Redact. finds sensitive values in the results and error messages and replaces them with tokens such as <EMAIL_ADDRESS_4e1f0dd69c51e84c>. Ruled columns are rewritten whole, and statements that could reveal them another way are refused.
  3. Return. The assistant gets the redacted result: it can still count, group, and join without seeing the redacted values. Your database is never modified by redaction.

See Data Privacy for what is detected and its limits.

See the Installation guide to get started.