Guides7 min read

Best Database MCP Servers 2026: PostgreSQL, MySQL, SQLite & More

The top MCP servers for database access. Connect Claude, Cursor, or VS Code to PostgreSQL, MySQL, SQLite, MongoDB, Redis, and more with these database MCP integrations.

By MyMCPTools Team·

Database access is arguably the most powerful thing you can give an AI assistant. When your AI can inspect your actual schema, run queries, and understand your data model, it stops giving generic advice and starts giving precise, accurate help.

Here are the best database MCP servers for 2026, organized by database type.

Why Database MCP Servers Are Game-Changers

Without database access, an AI assistant guesses at your schema when writing queries. It doesn't know your column names, relationships, or the actual data shape. With a database MCP server, it knows exactly what's there — and it can query it to verify assumptions.

Common workflows that become dramatically better with database MCP:

  • Writing complex SQL queries with the correct column names and types
  • Debugging data issues by querying actual records
  • Understanding a new codebase by exploring the data model
  • Data analysis and aggregation tasks
  • Schema migration planning

PostgreSQL MCP Server — The Gold Standard

PostgreSQL is the most popular MCP database server, and for good reason — it's the most widely deployed production database in the developer ecosystem.

Key capabilities:

  • Full schema introspection — tables, columns, types, constraints, indexes, foreign keys
  • Read-only query execution with row limits (safe by default)
  • Table statistics and query planning information
  • Support for multiple database connections
  • Works with Supabase, Neon, RDS, and any standard PostgreSQL endpoint

Installation:

npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Best for: Backend developers, data engineers, anyone running PostgreSQL in production or locally.

SQLite MCP Server — Lightweight & Fast

SQLite is more ubiquitous than most developers realize. It powers mobile apps, local-first tools, Electron applications, and countless embedded systems. The SQLite MCP server gives your AI access without any external database process.

Key capabilities:

  • Schema browsing for .db files anywhere on your filesystem
  • Query execution with sandboxed read access
  • Support for multiple database files simultaneously
  • Works with any SQLite database — no server required

Installation:

npx @modelcontextprotocol/server-sqlite /path/to/your.db

Best for: Mobile developers (React Native, Flutter), Electron app developers, prototyping with local databases.

MongoDB MCP Server — Document Databases

For teams using MongoDB, the MongoDB MCP server provides access to collections, documents, and aggregation pipelines. It understands the document model, not just SQL concepts.

Key capabilities:

  • Collection schema inference (MongoDB is schemaless, but patterns emerge from documents)
  • Query execution with find, aggregate, and count operations
  • Index inspection
  • Atlas and self-hosted MongoDB support

Best for: Applications using MongoDB Atlas, self-hosted MongoDB, or Mongoose ODM.

Redis MCP Server — Caching & Key-Value Access

Redis is often used as a cache, session store, or message broker — but understanding what's in Redis during debugging can be tricky without direct access. The Redis MCP server solves this.

Key capabilities:

  • Key browsing and pattern matching
  • Value inspection (strings, lists, sets, hashes, sorted sets)
  • TTL inspection for cache debugging
  • Read-only by default (prevents accidental writes)

Best for: Debugging cache issues, understanding session state, inspecting queue contents.

Supabase MCP Server — Postgres + Auth + Storage

Supabase combines PostgreSQL with authentication, file storage, and realtime capabilities. Its MCP server gives your AI access to all layers — not just the database.

Key capabilities:

  • Full PostgreSQL access via Supabase client
  • Auth schema introspection (users, sessions, policies)
  • Storage bucket contents
  • Row Level Security policy inspection
  • Edge Function listing

Best for: Developers building on Supabase who want AI that understands the entire stack, not just the database layer.

Neon MCP Server — Serverless Postgres

Neon is the leading serverless PostgreSQL platform. Its MCP server supports Neon's branching model — useful for working with development, staging, and production database branches.

Key capabilities:

  • PostgreSQL access with Neon-specific features
  • Branch awareness — query specific database branches
  • Auto-suspend compatible (handles serverless cold starts)
  • Connection pooling support

Best for: Teams using Neon for serverless database infrastructure, especially with frequent branch-based development workflows.

ClickHouse MCP Server — Analytics at Scale

ClickHouse is the go-to for high-volume analytics workloads. Its MCP server handles the columnar data model and ClickHouse's extended SQL dialect.

Key capabilities:

  • Table and column schema inspection
  • Analytical query execution
  • Table statistics and partition information
  • ClickHouse Cloud and self-hosted support

Best for: Data engineers and analysts running ClickHouse for event analytics, product analytics, or log aggregation.

DuckDB MCP Server — In-Process Analytics

DuckDB is the SQLite of analytics — fast, embedded, and file-based. It's increasingly popular for local data analysis, especially with Parquet and CSV files. The DuckDB MCP server is ideal for data science workflows.

Key capabilities:

  • SQL analytics on local files (Parquet, CSV, JSON)
  • In-memory database support
  • Full analytical SQL including window functions
  • Blazing fast for local data analysis

Best for: Data scientists, analysts, and anyone doing local data analysis with Parquet/CSV files.

Choosing the Right Database MCP Server

DatabaseBest Use CaseHosted Options
PostgreSQLMost production appsSupabase, Neon, RDS, Heroku
SQLiteLocal/embedded appsLocal only
MongoDBDocument data modelsAtlas, self-hosted
RedisCache debuggingRedis Cloud, Upstash
ClickHouseEvent analyticsClickHouse Cloud
DuckDBLocal data analysisLocal only

Related guides:

Recommended Tools

Better Stack

Free Plan

Get alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.

Start monitoring free →

1Password

14-day Free Trial

Store and inject API keys, payment credentials, tokens, and file access secrets into your MCP server configs. Trusted by 150K+ developers.

Try 1Password free →

🔧 MCP Servers Mentioned in This Article

🗄️

PostgreSQL MCP Server

The PostgreSQL MCP server was the Model Context Protocol reference server for Postgres, and it is retired: the source now sits in modelcontextprotocol/servers-archived — a repository GitHub reports as archived, described as "Reference MCP servers that are no longer maintained" — and the npm package @modelcontextprotocol/server-postgres carries a deprecation notice reading "Package no longer supported." It still installs and still runs, which is why most third-party setup articles have not caught up. What it provides is deliberately small: a single tool, query, which executes read-only SQL inside a READ ONLY transaction, plus per-table schema information exposed as MCP resources at postgres://<host>/<table>/schema, with column names and data types discovered from database metadata. There is no index advice, no health check, no separate schema-listing tool, and no write mode. Install is npx @modelcontextprotocol/server-postgres with a postgres:// connection string as the argument. For active work against Postgres, the maintained alternative is Postgres MCP Pro (crystaldba/postgres-mcp), which exposes nine tools including index tuning against hypothetical indexes and a database health check, and has an explicit restricted access mode; if your database is hosted on Supabase or Neon, their platform servers add branching and logs that a raw Postgres connection cannot see. Reach for this archived server only when you want the smallest possible surface — one process, one read-only query tool, nothing else.

Local📘
🗄️

SQLite MCP Server

conversational read and write access to any SQLite database file, plus a running business-insights memo that accumulates what the analysis turns up. It is a Python server on PyPI, not a Node one, and the difference is the single most common reason setups fail here: `@modelcontextprotocol/server-sqlite` does not exist on npm, so every npx line for it 404s. The working invocation is `uvx mcp-server-sqlite --db-path /path/to/database.db` (PyPI package mcp-server-sqlite, v2025.4.25), or the equivalent `mcp/sqlite` Docker image with a volume mounted at /mcp. The --db-path argument is required and points at the .db file; the server will create it if it is not there yet. Six tools are exposed, deliberately split by risk: read_query for SELECT only, write_query for INSERT/UPDATE/DELETE, create_table for DDL, list_tables and describe-table for schema introspection, and append_insight, which writes into a memo://insights resource that updates live as findings accumulate — that resource, not the SQL tools, is what makes this server different from a generic database connector. It also ships an mcp-demo prompt that takes a business topic, generates a plausible schema and sample data, and walks through an analysis end to end, which is the fastest way to see the memo behaviour without wiring up real data. One caveat to weigh before adopting it: this is an Anthropic reference implementation that now lives in modelcontextprotocol/servers-archived, archived on 2025-05-28. The published package still installs and runs, but it is frozen — no new features, no dependency updates, and no security patches.

Local
🗄️

MongoDB MCP Server

The official MongoDB MCP server, `mongodb-js/mongodb-mcp-server`, maintained by MongoDB. Searchers find it as the MongoDB MCP server or the Mongo MCP server; both names refer to this one project, and there is no separate short-form server. It is really two tool surfaces in one process. The database tools connect to any MongoDB deployment over a connection string in `MDB_MCP_CONNECTION_STRING` — `find`, `aggregate`, `explain`, `collection-schema`, `collection-indexes`, `create-index`, `count`, `export`, `mongodb-logs` and the write tools — or, if no connection string is set, the model calls the `connect` tool at runtime and passes the returned `connectionId` to later calls. The Atlas tools are a separate control plane: listing and creating clusters, database users, IP access-list entries, stream processing resources and the performance advisor. They authenticate with Atlas Service Account credentials (`MDB_MCP_API_CLIENT_ID` / `MDB_MCP_API_CLIENT_SECRET`), not with a connection string, and they simply do not register when those are unset — the usual cause of a 'the Atlas tools are missing' report. Two defaults are worth knowing before you point it at production. `readOnly` is false, so every write tool including `drop-database` is registered unless you pass `--readOnly`, which is why MongoDB's own README uses that flag in every example. And confirmation-required tools rely on MCP elicitation, so on a client that does not support elicitation they execute without prompting — `--readOnly` or `--disabledTools` is the actual boundary. Other guardrails: `indexCheck` rejects queries that would do a collection scan, server-side JavaScript (`$where`, `$function`, `$accumulator`) is disabled by default, results are capped at 100 documents and 16 MB per call, and `--dryRun` prints the resolved config and enabled tool list without starting the server. Requires Node 22.13.0 or later (Node 20 is deprecated); also published as the `mongodb/mongodb-mcp-server` Docker image. Runs over stdio by default, with an optional HTTP transport and a separate monitoring listener for `/health` and Prometheus `/metrics`.

Local📘
🗄️

Redis MCP Server

The Redis MCP Server (redis/mcp-redis) is Redis's own natural-language interface for agentic applications, letting an AI client read and write Redis data over the Model Context Protocol. Note which one you install: the server most tutorials still point at is Anthropic's reference implementation, which now lives in modelcontextprotocol/servers-archived, and its npm package @modelcontextprotocol/server-redis is explicitly marked "Package no longer supported" with a last publish of 2025-04-25. The maintained server is a Python package instead, run with uvx --from redis-mcp-server@latest, and it covers far more of Redis than the reference one did: string, hash, list, set and sorted-set tools; JSON document tools; pub/sub with stateful channel and pattern subscriptions; Streams tools including consumer-group create, read, acknowledge and destroy; vector index management and vector search through the query engine; a docs search tool; and a server-management tool for database info. Connection is a redis:// or rediss:// URL passed as --url, or the REDIS_HOST/REDIS_PORT/REDIS_PWD/REDIS_SSL environment variables, with Redis Cluster mode behind REDIS_CLUSTER_MODE and EntraID service-principal, managed-identity and default-credential auth flows for Azure Managed Redis. There is no --read-only flag: the documented way to stop an agent writing is a Redis ACL user (ACL SETUSER readonlyuser on >pw ~* +@read -@write). Ships as a PyPI package, a GitHub install via uvx, and an official mcp/redis Docker image; stdio transport only.

Local📘
🗄️

Supabase MCP Server

Supabase MCP Server connects Cursor, Claude Code, Claude Desktop, Windsurf and other MCP clients to a Supabase project, and the first thing to know is that the personal access token setup most guides still describe is gone. Supabase now runs a hosted server at https://mcp.supabase.com/mcp using OAuth 2.1 with dynamic client registration — you add the URL, your client opens a browser, you pick the organization, and there is no PAT to mint or rotate. For Claude Code that is `claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"` followed by `/mcp` in a plain terminal (not the IDE extension) to run the auth flow. Three URL query parameters do the real configuration work: `read_only=true` runs every statement as a read-only Postgres role, `project_ref=<id>` scopes the server to one project and drops the account-management tools entirely, and `features=` selects the tool groups. Those groups are database (list_tables, list_extensions, list_migrations, apply_migration, execute_sql), debugging (get_logs across API/Postgres/Edge Functions/Auth/Storage/Realtime, plus get_advisors for security and performance findings), development (get_project_url, get_publishable_keys, generate_typescript_types), Edge Functions (list, get, deploy), account management, docs search, experimental branching on paid plans, and storage — storage is the one group disabled by default. Running Supabase locally with the CLI exposes a reduced server at http://localhost:54321/mcp with no OAuth; self-hosted installs are similar. The npm package `@supabase/mcp-server-supabase` still exists for stdio clients and also exports `createToolSchemas()` so Vercel AI SDK users get typed tool inputs and outputs. Read Supabase's security best-practices page before pointing this at anything with production data — the mutating tools are real.

Auth required📘
🗄️

Neon MCP Server

The Neon MCP Server (neondatabase/mcp-server-neon) is Neon's official, open-source bridge between natural language and the Neon serverless Postgres platform. It translates conversational requests into Neon API and SQL calls, letting Claude, Cursor, VS Code, and other MCP clients create projects and branches, run queries, inspect schemas, and perform database migrations without hand-writing SQL or hitting the API directly. A standout capability is migration support built on Neon's branching: the server can spin up a branch, apply and test a schema change there, and only then merge it — so an assistant can safely run "add a created_at column to the users table" against an isolated copy first. The easiest setup is the remote hosted server at https://mcp.neon.tech/mcp, which supports both OAuth (no API key to manage) and API-key auth via the Authorization header; run `npx neon@latest init` for one-command configuration of Cursor, VS Code (Copilot), and Claude Code, or `npx add-mcp https://mcp.neon.tech/mcp` to register it across all detected editors. Requires Node.js 18+ and a free Neon account; if IP Allow is enabled, whitelist the mcp.neon.tech static IPs. Neon explicitly scopes this server to local development and IDE workflows — its README warns against production use since natural-language commands can execute powerful, irreversible database operations, so always review actions before authorizing them.

Auth required📘
🗄️

ClickHouse MCP Server

ClickHouse MCP Server is ClickHouse's official MCP server (ClickHouse/mcp-clickhouse) that connects Claude, Cursor, and other MCP clients to a ClickHouse cluster for fast analytical querying over natural language. Its primary tool, run_query, executes arbitrary SQL against your cluster in read-only mode by default (CLICKHOUSE_ALLOW_WRITE_ACCESS=false) so an AI assistant can explore tables, aggregate billions of rows, and answer analytics questions without risk of mutating data — writes can be enabled explicitly when needed. Companion tools list databases and tables and return schema metadata (including the full create_table_query, with an option to omit per-column detail for lighter responses). A second tool set embeds chDB, ClickHouse's in-process engine, via run_chdb_select_query, letting the assistant query files, URLs, and external databases directly without an ETL step (enabled with the optional mcp-clickhouse[chdb] extra). Destructive statements are gated a second time: even with writes enabled, DROP and TRUNCATE require CLICKHOUSE_ALLOW_DROP=true as well. The server supports both stdio and HTTP/SSE transports; on HTTP/SSE authentication is required rather than optional — startup fails unless a static bearer token (CLICKHOUSE_MCP_AUTH_TOKEN), a FastMCP OAuth/OIDC provider (Azure Entra, Google, GitHub, WorkOS via FASTMCP_SERVER_AUTH), or an explicit local-development opt-out (CLICKHOUSE_MCP_AUTH_DISABLED) is configured. Connection is configured through CLICKHOUSE_HOST, CLICKHOUSE_PORT, CLICKHOUSE_USER, and CLICKHOUSE_PASSWORD, with ClickHouse Cloud, self-hosted, and the public SQL playground all supported.

Local📘
🗄️

DuckDB Cloud

Serverless analytical database MCP for MotherDuck (cloud DuckDB). Run OLAP queries on large datasets, query Parquet and CSV files, and share data workspaces.

Local
🗄️

Amazon Redshift

Petabyte-scale data warehouse MCP for Amazon Redshift. Execute SQL queries, analyze query plans, manage clusters, and monitor Redshift Serverless workloads.

Local

📚 More from the Blog