Best database MCP servers for Postgres, MySQL and SQL (2026)
Our pick
Start with DBHub if you want one MCP server for several databases. It connects Claude Code, Claude Desktop, Codex, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite and ClickHouse, with a small set of tools by default. You start it with npx @bytebase/dbhub@latest and a connection string, and it also installs as a Claude Code or Codex plugin. It is MIT licensed. The table shows its last commit and latest release, and how the other tools compare.
Best for
- Several databases from one server
bytebase/dbhubOne server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite and ClickHouse, with read-only mode, row limits and a query timeout.
- Google Cloud databases and custom tools
googleapis/mcp-toolboxPrebuilt tools connect Gemini CLI, Claude Code, Codex and other clients to your databases, and a tools framework lets you define your own queries. It runs with npx @toolbox-sdk/server or as a binary.
- MySQL only
designcomputer/mysql_mcp_serverA server for MySQL that installs with pip install mysql-mcp-server and supports SSH tunnelling.
- MongoDB and MongoDB Atlas
mongodb-js/mongodb-mcp-serverMongoDB's own MCP server for MongoDB databases and Atlas. Run npx -y mongodb-mcp-server@latest setup to configure it.
- Checking the health of a PostgreSQL server
call518/MCP-PostgreSQL-OpsRead-only tools for slow queries, locks, bloat, VACUUM, indexes and replication. It runs only predefined queries, never arbitrary SQL.
- Better PostgreSQL code from your coding agent
timescale/pg-aiguideNot a connection to your data: it searches the PostgreSQL manual and adds Postgres skills. It runs as an MCP server, a Claude Code plugin or Agent Skills.
The repos compared
Checked on Nov 28, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| bytebase / dbhub A small MCP server that connects AI tools to PostgreSQL, MySQL, SQL Server, Oracle and more. | 4,035 GitHub (opens in new tab) | Active Nov 25, 2026 | v2.1.0, Nov 21, 2026 | MIT | |
| googleapis / mcp-toolbox An MCP server for databases, with prebuilt tools and a framework for custom ones. | 17,029 GitHub (opens in new tab) | Active Dec 2, 2026 | v1.18.0, Nov 20, 2026 | Apache-2.0 | |
| designcomputer / mysql_mcp_server An MCP server for MySQL databases, installed with pip. | 1,424 GitHub (opens in new tab) | Active Oct 28, 2026 | v0.4.5, Oct 28, 2026 | MIT | |
| mongodb-js / mongodb-mcp-server An MCP server that connects AI tools to MongoDB databases and MongoDB Atlas. | 1,167 GitHub (opens in new tab) | Active Dec 1, 2026 | v3.4.0, Nov 24, 2026 | Apache-2.0 | A MongoDB connection string or Atlas API credentials. |
| call518 / MCP-PostgreSQL-Ops Read-only MCP tools for checking PostgreSQL performance, locks, bloat and replication. | 164 GitHub (opens in new tab) | Active Nov 23, 2026 | 3.5.2, Nov 13, 2026 | MIT | PostgreSQL 12+ (tested with PostgreSQL 17 and 18); Python 3.12; Network access to… |
| timescale / pg-aiguide An MCP server, Claude plugin and skills with PostgreSQL documentation for coding agents. | 1,890 GitHub (opens in new tab) | Active Nov 12, 2026 | v0.6.1, Sep 4, 2026 | Apache-2.0 | |
| Azure / data-api-builder Turns Azure SQL, SQL Server, PostgreSQL, MySQL and Cosmos DB into REST, GraphQL and MCP endpoints. | 1,551 GitHub (opens in new tab) | Active Nov 30, 2026 | v2.1.7, Nov 20, 2026 | MIT | |
| prest / prest REST and read-only MCP APIs on top of an existing PostgreSQL or MySQL database. | 4,638 GitHub (opens in new tab) | Active Dec 1, 2026 | v2.6.0, Nov 18, 2026 | MIT | |
| clidey / whodb A self-hosted database workspace with a terminal CLI that includes an MCP server. | 5,074 GitHub (opens in new tab) | Active Dec 2, 2026 | 0.139.0, Nov 17, 2026 | Apache-2.0 |
Install commands
Copied from each repo. Read its setup steps before you run anything.
bytebase/dbhub
npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable" googleapis/mcp-toolbox
npx @toolbox-sdk/server --config tools.yaml designcomputer/mysql_mcp_server
pip install mysql-mcp-serverQuestions
What is a database MCP server?
A program that lets an AI tool such as Claude Code or Cursor look at and query a database through the Model Context Protocol. DBHub, for example, sits between those clients and databases like PostgreSQL, MySQL and SQL Server.
Is there an official Postgres MCP server?
The original reference server, @modelcontextprotocol/server-postgres, is archived and marked deprecated on npm. DBHub documents how to switch from it: swap the package and pass the same connection string through --dsn. pg-aiguide and MCP-PostgreSQL-Ops are other Postgres-focused options.
Can the AI change or delete my data?
It depends on the server and its settings. With only --dsn, DBHub's execute_sql tool can also write, and a config file turns on read-only mode. MCP-PostgreSQL-Ops only runs predefined read-only queries. DBHub's read-only mode is a guardrail, not a permission boundary, so connect it with a least-privilege, read-only database user.
Can one server cover several databases?
Yes. DBHub covers PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite, and MCP Toolbox for Databases covers a longer list, including Google Cloud databases such as AlloyDB, BigQuery and Cloud SQL. Other servers here cover one family: mysql_mcp_server for MySQL, and the MongoDB server for MongoDB and Atlas.
Do I need an MCP server to give an app a database API?
Not always. pREST and Data API builder turn an existing database into REST endpoints, and both can also expose MCP. Data API builder also offers GraphQL.
