Best MCP servers for SQL databases
SQL is still where most operational and analytical data lives, and giving an agent direct query access turns vague questions into concrete answers without hand-writing migrations or copy-pasting query output. The right server depends on what you run: a transactional Postgres or MySQL, a serverless Postgres with branching, a distributed SQL engine that survives node failures, or a columnar warehouse built for analytics. The safest servers expose schema introspection and default to read-only so an agent can explore before it mutates, while migration-aware servers let it propose and apply schema changes deliberately. The servers below cover the common SQL engines, each a real MCP server with a verified, current install config.
DBHub (Postgres)
Bytebase
A universal database MCP gateway that connects agents to Postgres (and others) via a DSN.
A universal database gateway that connects agents to Postgres (and others) via a DSN, the go-to for the most popular open-source relational database.
MySQL (DBHub)
Bytebase
Connect an agent to a MySQL database with Bytebase's DBHub: run SQL and explore schema through one universal database MCP server.
Bytebase's DBHub connects an agent to MySQL to run SQL and explore schema through one universal database server, a clean fit for the LAMP-era workhorse.
Neon
Neon
Neon's official MCP server lets agents create projects and branches, run SQL, and drive safe schema migrations on serverless Postgres.
Neon's official server lets agents create projects and branches, run SQL, and drive safe schema migrations on serverless Postgres, ideal when you want disposable branches per change.
CockroachDB
amineelkouhen
A natural-language MCP server for CockroachDB: query data, manage schema, and monitor cluster health across nodes.
A natural-language server for CockroachDB queries data, manages schema, and monitors cluster health across nodes, built for distributed SQL that needs to stay online.
ClickHouse
ClickHouse
ClickHouse's official MCP server lets agents list databases and tables and run read-only SQL against a ClickHouse cluster.
ClickHouse's official server lists databases and tables and runs read-only SQL against a cluster, the columnar option when your SQL is analytical rather than transactional.