MCP servers for databases
Connecting an agent to a database is the most useful and most dangerous MCP setup. Here is what each server needs, and which ones document a read-only mode.
Updated Oct 15, 2026 · 5 sources
§1At a glance
| Server | Runs | Auth | Read-only option |
|---|---|---|---|
| Supabase | Remote | OAuth | Yes — read_only=true URL parameter, scoped by project_ref |
| Neon | Remote | OAuth or Neon API key | Not in our verified snippet — see README |
| PostgreSQL (reference, archived) | Local (npx) | Connection string | Read-only by design (archived reference server) |
| DBHub | Local (npx, HTTP) | Database DSN | Use a read-only DB user (Claude Code docs example) |
| MongoDB | Local (npx) | Connection string or Atlas service account | Yes — --readOnly flag |
| SQLite (reference, archived) | Local | None (local file) | No — exposes write_query and create_table |
| Redis | Local | Redis URL / credentials | See README |
| ClickHouse | Local (uvx) | ClickHouse user + password | See README |
§2Postgres options
There are three Postgres paths in the index. Supabase and Neon are vendor-run remote servers that sign you in with OAuth. PostgreSQL (reference, archived) is the original reference server — read-only and schema-aware, but archived, so it receives no updates. DBHub is a maintained community server that speaks Postgres, MySQL, SQL Server and SQLite through one DSN.
{
"mcpServers": {
"supabase": { "url": "https://mcp.supabase.com/mcp?project_ref=<project-ref>&read_only=true" }
}
}claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
--dsn "postgresql://readonly:pass@prod.db.com:5432/analytics"§3Rules worth following
- Connect with a database user that has only the privileges the task needs; read-only for analysis.
- Prefer a branch, replica or staging database over production.
- Keep credentials in environment variables, not in a committed config file.
- Leave tool approval on for anything that writes.
§4All database servers
Connect agents to Supabase projects: databases, migrations, edge functions and docs.
Manage Neon serverless Postgres projects, branches and SQL in natural language.
Read-only Postgres access with schema inspection. Archived reference server.
Universal database MCP server for Postgres, MySQL, SQL Server, SQLite and more.
MongoDB's official MCP server for databases and Atlas clusters.
Query and analyze SQLite databases. Archived reference server.
Redis's official MCP server for managing and searching data in Redis.
Run SQL against ClickHouse clusters (and chDB) from your agent.
Query Elasticsearch indices and mappings from your agent.
Semantic memory layer on top of the Qdrant vector database.
Pinecone's developer MCP server: search docs and manage indexes and records.
§5FAQ
- Is there an official Postgres MCP server?
- The Postgres reference server from the MCP project is archived. Supabase and Neon run official remote servers for their hosted Postgres, and DBHub is a maintained community option.
- Which database MCP servers have a read-only mode?
- Supabase (read_only=true URL parameter) and MongoDB (--readOnly flag) document one; the archived Postgres reference server is read-only by design. For others, use a read-only database user.
§6Sources
- Claude Code docs — Connect Claude Code to tools via MCP ↗
- Supabase MCP docs ↗
- neondatabase/mcp-server-neon ↗
- bytebase/dbhub ↗
- mongodb-js/mongodb-mcp-server ↗
Sources checked Oct 15, 2026. Spot something out of date? Tell us.