A universal database MCP server — one integration for PostgreSQL, MySQL, SQL Server, SQLite, and MariaDB.
Database MCP (dbmcp)
Summary
A single ~7 MB binary that gives your AI assistant schema discovery, SQL queries and EXPLAIN plans for MySQL, MariaDB, PostgreSQL and SQLite, with a read-only mode.
Features
- MySQL, MariaDB, PostgreSQL and SQLite from one ~7 MB binary with no runtime dependencies
- Schema discovery: databases, tables, views, triggers, functions, procedures, materialized views
- readQuery and explainQuery for data and query-plan inspection
- Read-only mode hides every write and DDL tool from the model
- stdio and HTTP transports, with optional bearer-token auth on HTTP
- CLI flags override environment variables override backend defaults
Installation
Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.
Description
Database MCP, or dbmcp, is a Rust-built MCP server that connects an AI assistant to a SQL database without a Python, Node or Docker runtime. One small binary speaks to MySQL and MariaDB, PostgreSQL and SQLite, so the same setup works whether you are exploring a local SQLite file or a production replica.
The tool set covers the whole inspection loop. Discovery tools list databases, tables, views, triggers, functions, procedures and materialized views (availability varies by backend). readQuery and explainQuery let the model look at data and query plans, while writeQuery plus the DDL tools (createDatabase, dropDatabase, dropTable) are available when you want it to change things. Start the server in read-only mode and the write tools are hidden from the model altogether, which is the safer default for anything that matters.
It runs over stdio, where the client launches and manages the process, or over HTTP with an optional bearer token for remote or multi-client setups. Configuration is layered: CLI flags override environment variables, which override per-backend defaults. Installation is a one-line script on macOS, Linux, WSL and Windows, with Docker and Cargo as alternatives. Released under the MIT licence.
Good fit for developers who want an assistant to explain a schema, draft and sanity-check queries, or review slow-query plans against a real database without handing it a heavyweight toolchain.
Related MCP Servers
MCP: PlanetScale
by PlanetScale
PlanetScale's official hosted MCP server — browse organizations, databases and branches, read schema, run guarded SQL, and pull Insights and schema recommendations.
Turso's hosted MCP server — manage Turso Cloud databases, branch them point-in-time and run SQL from a coding agent, authorised over OAuth with no API token to paste.
MCP: SQLite
by Model Context Protocol
Query, modify, and analyse a local SQLite database file directly from an AI client.