Database MCP

Introduction

A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite

Database MCP is a Model Context Protocol (MCP) server that gives AI assistants safe, read-only access to your databases. Built in Rust as a single binary with zero runtime dependencies, it works with any MCP-compatible client including Claude Desktop, Cursor, and others.

Supported Databases

  • MySQL
  • MariaDB
  • PostgreSQL
  • SQLite

Key Features

  • Single binary — no runtime dependencies, no language runtimes to install
  • Read-only by default — 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
  • Multi-database support — connect to MySQL, MariaDB, PostgreSQL, or SQLite with a single binary
  • Optional PII redaction — opt-in regex-based redactor for query tool output (details)

How It Works

Database MCP exposes your database schema and data through the MCP protocol. AI assistants can discover tables, inspect schemas, and run read-only SQL queries to answer questions about your data — all without the risk of accidental modifications.

See the Installation guide to get started.

On this page