Back to blog

MCP servers for PostgreSQL and other databases: 8 options compared

Eight database MCP servers from the vendors themselves, compared by engine, transport, authentication, and license, plus the safety rules for letting an AI agent run SQL.

SOSourceWeftNov 20, 20267 min read

Data as of: 20 November 2026

The short answer

Pick the server from whoever runs your database.

  • Managed Postgres: use your provider's own server: Supabase, Neon, or Prisma Postgres.
  • A Postgres, MySQL, or SQLite you host yourself: use a local, engine-agnostic server such as DBHub.
  • PlanetScale, MongoDB, DuckDB or MotherDuck, Redis on Upstash: each vendor publishes its own server.

Then, whichever you choose, connect it with a read-only role first. The server matters less than the permissions you give it.

How this list was chosen

This is a selection, not a ranking. Each server below met three criteria in the SourceWeft MCP directory on 20 November 2026:

  1. It is published by the database vendor or the project's own maintainers, under their domain or their GitHub organization.
  2. Its listing is verified, meaning the registry confirmed that namespace.
  3. Its listing was updated within the previous 30 days.

We did not benchmark query quality, speed, or token use. Where the directory could not read a server's tools, the table says why.

The eight servers

ServerEnginePublisherRunsAuthenticationLicenseVersionUpdated
SupabasePostgres (Supabase)supabase.comRemoteOAuthApache-2.00.19.020 Nov 2026
NeonPostgres (Neon)neon.comRemoteOAuth or API keyMIT2.0.06 Nov 2026
Prisma PostgresPostgres (Prisma)prisma.ioRemoteOAuth or API keyHosted service1.1.020 Nov 2026
PlanetScaleMySQL (Vitess) and Postgres (PlanetScale)GitHub planetscaleRemoteOAuthApache-2.01.0.02 Nov 2026
MongoDBMongoDB and AtlasGitHub mongodb-jsLocalSet locallyApache-2.03.3.011 Nov 2026
MotherDuckDuckDB and MotherDuckGitHub motherduckdbLocalSet locallyMIT1.1.111 Nov 2026
UpstashRedis and other Upstash productsGitHub upstashRemoteOAuthHosted service0.1.027 Oct 2026
DBHubPostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse, SQLiteGitHub bytebaseLocalSet locallyMIT2.0.019 Nov 2026

"Remote" means Streamable HTTP: the vendor hosts the server and any MCP client can reach it. "Local" means stdio: the server runs as a process on your machine and needs a desktop host. "Set locally" means the MCP connection itself needs no sign-in; you give the server a connection string or key in its local configuration.

PostgreSQL

Supabase. Lets an assistant inspect, query, and change Supabase projects, databases, branches, and Edge Functions. The directory lists 36 tools, which makes it the only server here whose tool list the directory has indexed.

Neon. The official Neon server for managing Neon projects and the Lakebase Postgres databases on Neon, the wording its README uses. It supports OAuth or an API key, and has a read-only mode. The SourceWeft directory carries a note on this listing: the registry verified that the namespace belongs to neon.com, but the endpoint is not on that domain, so the publisher may not run the server. Neon's own documentation lists the endpoint as mcp.neon.tech.

Prisma Postgres. Manages Prisma Postgres databases and existing Prisma Compute apps after you sign in with a Prisma account.

DBHub. Runs SQL and explores schemas across seven engines from one local server. It is the option here for a Postgres you host yourself, because it connects to any database you can reach with a connection string. It has a read-only mode, a row limit, and a query timeout. Read-only mode is a setting you turn on in its configuration; with only a connection string, its SQL tool can also write.

MySQL

PlanetScale. Inspects databases, branches, and schema, reviews query insights, and runs SQL on PlanetScale, which offers both Vitess (MySQL) and Postgres databases.

DBHub also covers self-hosted MySQL and MariaDB.

Document, analytical, and key-value stores

MongoDB. Queries, inspects, and modifies MongoDB databases and can create and manage Atlas resources, as a local process. It has a read-only mode (--readOnly). MongoDB also hosts a separate remote server for Atlas.

MotherDuck. Runs DuckDB SQL against in-memory databases, local files, databases on S3, or MotherDuck, and browses their catalogs. MotherDuck also offers a hosted remote server.

Upstash. A hosted endpoint for Upstash Redis and the company's other products. The directory lists OAuth sign-in; Upstash's own documentation also describes a developer API key.

Platform server or query server?

These servers fall into two groups, and the difference affects risk.

Platform serverQuery server
ExamplesSupabase, Neon, Prisma Postgres, PlanetScale, UpstashDBHub, MongoDB, MotherDuck
What it can doWork across the account: list and inspect projects, databases, and branches, and run SQL. Most can also create and delete resourcesRun queries against a database you point it at
Scope of a mistakeThe whole accountOne database
Limit it withOAuth scopes, a restricted API key, a project-scoped connection, or the server's read-only modeA read-only database role

A platform server is convenient for development, because the agent can create a branch, migrate it, and test. It can also be destructive at account level. The Neon, Prisma Postgres, and Upstash servers have tools that delete a project or a database. Supabase's can pause a project and delete a branch. PlanetScale's documented tools do not create or delete databases, but they can run write SQL, including schema changes.

Before you let an agent run SQL

  1. Start read-only. Create a database role with SELECT only and connect with it. Do not rely on the model to avoid writes. Several of these servers also have a read-only mode of their own: Supabase, Neon, PlanetScale, Upstash, MongoDB, and DBHub all document one.
  2. Use a branch or a copy, not production. Supabase, Neon, and PlanetScale all have branching. By default, a new Supabase branch or PlanetScale Vitess branch starts without your production data; both vendors also offer an option to include data, so check what your branch was created with. Point the agent at a branch.
  3. Limit what it can see. Grant access to the schemas the task needs. Keep tables with personal or payment data out of reach.
  4. Keep approval on for writes. Require confirmation for any tool that changes data or schema.
  5. Treat query results as untrusted. Text stored in a row can contain instructions aimed at the model. An agent that reads user-generated content from a table and can also write is the risky combination.
  6. Set limits. Use a statement timeout and a row limit so one bad query cannot stall the database or flood the context.

How to choose

  1. Who hosts your database? If the provider publishes a server, start there.
  2. Web app or desktop app? Web-based AI applications can only use remote servers. Local servers need a desktop host.
  3. Manage or just query? For answering questions from data, a query server with a read-only role is enough. For development work, a platform server saves time.
  4. One engine or several? If you work across Postgres, MySQL, and SQLite, one multi-engine server is simpler than three.

Browse more

The SourceWeft directory lists more database servers under the Databases category, including community servers for engines not covered here. Each page shows the publisher, transport, authentication, license, and tool list where one could be read.

FAQ

What is the best MCP server for PostgreSQL? For Postgres on Supabase, Neon, or Prisma, use that provider's own server. For a Postgres you host yourself, use a local server that takes a connection string, such as DBHub. In both cases connect with a read-only role first.

Is it safe to connect an AI agent to a production database? Only with limits: a read-only role, access to the schemas the task needs, and no path to write. For anything that changes data, use a branch or a copy.

Can an MCP server change or delete my data? Yes, if the credentials allow it. The server passes on what the model asks for. The database role and the OAuth scopes are what actually limit it.

Do I need a different server for each database? Not necessarily. A multi-engine server such as DBHub covers several SQL engines. Vendor servers add platform features, such as branching, that a generic one does not have.

Is there an official MongoDB MCP server? Yes. MongoDB's documentation points to the server published from the mongodb-js GitHub organization, which the directory lists. It runs locally and can also manage Atlas resources. MongoDB also hosts a separate remote server for Atlas.

Which database MCP servers work without a desktop app? The remote ones: Supabase, Neon, Prisma Postgres, PlanetScale, and Upstash in this list.

Shareable URL

Keep reading

Related essays

All posts

How to install skills and MCP servers in Claude Code, from an empty folder

Start from an empty folder and install a skill and an MCP server for Claude Code: search, inspect before installing, where the config files go, and how to check and remove them. Every command was actually run.

Read next

MCP servers by category: the 17 categories in our directory and how to browse them

A list of MCP servers sorted into 17 categories, from databases to browser automation to communication, with the number of servers in each as of 21 November 2026, and how to filter, search and install from a category page.

Read next

What is the Model Context Protocol (MCP)?

MCP is an open protocol that lets AI applications connect to tools and data through one standard interface. How it works, what a server exposes, and how to start.

Read next