Compared · Databases & SQL · Cursor
Best MCP servers for Databases & SQL in Cursor
6 entries in the AgentTask Atlas catalog fit databases & SQL and have Cursor setup instructions in their official README or docs. Database servers act on real data, so the setup choice that matters most is how little access you can give the agent. Supabase, Neon and MongoDB document a read-only mode, and Supabase and Neon can also be scoped to one project from the server URL; AWS's Aurora PostgreSQL server blocks write queries unless you enable them, and every AWS server acts with your IAM role; Prisma acts with whatever the workspace you approve allows. Elastic has deprecated its Elasticsearch MCP server: it is listed because the catalog still tracks it, but it is not recommended for new setups.
Based on official docs, not hands-on tested. Cursor steps checked 2026-10-23; catalog entries verified 2026-10-16 to 2026-10-21. Not ranked by a score: entries that document more clients come first.
- Hosted (remote URL) option: Prisma MCP Server, AWS MCP Servers, Neon MCP Server, Supabase MCP.
- Runs locally (npx, uvx, Docker, binary or CLI): MongoDB MCP Server, Elasticsearch MCP Server (deprecated).
- Credentials optional or depend on what you enable: none; every other entry needs an account login, OAuth grant, key or cloud identity.
| Name | Hosted | Credentials | License | Verdict |
|---|---|---|---|---|
| Prisma MCP Server Prisma | Yes | Required | Not stated (hosted service, no public source repository) | Pick it if you run Prisma Postgres or Prisma Compute and want the agent to query data, check backups or read deploy logs; review every destructive approval, it acts on live resources. |
| AWS MCP Servers AWS Labs | Yes | Required | Apache-2.0 | Pick the specific AWS server you need; the docs server needs no credentials, others use your IAM profile. |
| MongoDB MCP Server MongoDB | — | Required | Apache-2.0 | Pick it for MongoDB or Atlas queries; enable the documented read-only mode for exploration. |
| Neon MCP Server Neon | Yes | Required | MIT | Pick it to manage Neon branches and run SQL; it acts with your account's rights. |
| Elasticsearch MCP Server (deprecated) Elastic | — | Required | Apache-2.0 | Avoid for new setups: the official README marks it deprecated; use it only on existing installs. |
| Supabase MCP Supabase | Yes | Required | Apache-2.0 | Pick it for Supabase SQL and migrations; use the documented read-only and project-scoped modes. |
How to add them to Cursor
1. Pick project or global config
Project servers go in .cursor/mcp.json inside the repository, so the team points at the same database project. Global servers go in ~/.cursor/mcp.json and are available in every project. Supabase's and Prisma's Cursor instructions both cover the two locations.
2. Supabase: add the hosted server read-only and scoped to one project
Supabase's Cursor snippet only needs the URL; Cursor then opens a browser sign-in (OAuth, no personal access token), where you pick the organization that holds the project. Supabase recommends scoping and read-only mode: project_ref limits the server to one project (and disables account tools), read_only=true runs every query as a read-only Postgres user, and features limits the tool groups. Replace <project-ref> with your project's ref:
{ "mcpServers": { "supabase": { "url": "https://mcp.supabase.com/mcp?project_ref=<project-ref>&read_only=true&features=database,docs" } } }3. Neon: hosted server with a fixed read-only grant
Neon's README gives a one-command setup (npx neon@latest init, which configures Cursor with an API key it creates for you) or a remote entry for mcp.json that signs in with OAuth. Putting readonly and projectId on the URL fixes that grant at authorization, and roleName (optional) runs all SQL as a Postgres role you created with only the grants it needs. Example from the README's read-only, project-scoped config:
{ "mcpServers": { "Neon": { "url": "https://mcp.neon.tech/mcp?readonly=true&projectId=my-project-id" } } }4. MongoDB: local server with --readOnly and the connection string in your environment
MongoDB's README examples all include --readOnly (read, connect and metadata tools only) and recommend environment variables for connection strings rather than command-line arguments. Cursor resolves ${env:NAME} in env, so the string can come from your shell instead of the file. For Atlas, the README recommends the mongodb-atlas plugin from the Cursor Marketplace, which connects to the Atlas-hosted MCP server over OAuth.
{ "mcpServers": { "MongoDB": { "command": "npx", "args": [ "-y", "mongodb-mcp-server@latest", "--readOnly" ], "env": { "MDB_MCP_CONNECTION_STRING": "${env:MDB_MCP_CONNECTION_STRING}" } } } }5. Prisma Postgres: hosted server with Prisma Console sign-in
Prisma's docs give this Cursor entry (or a one-click install link); you sign in to the Prisma Console and approve a workspace. Its tools can create databases, run SQL and restore backups, and Prisma warns that tools that change or delete resources can cause data loss, so review each approval.
{ "mcpServers": { "Prisma": { "url": "https://mcp.prisma.io/mcp" } } }6. AWS databases: install only the server you need
awslabs/mcp is a collection of servers, one per AWS service (Aurora PostgreSQL and MySQL, DynamoDB, DocumentDB, Redshift and others); its Cursor section uses .cursor/mcp.json or ~/.cursor/mcp.json with uvx (install uv and configure AWS credentials first). The Aurora PostgreSQL server's README notes that its config example adds --allow_write_query only to show how to enable writes: leave it out and the server enforces a read-only policy, which the README calls best effort, so also connect with a read-only database role. Example without write queries, based on that README:
{ "mcpServers": { "awslabs.postgres-mcp-server": { "command": "uvx", "args": [ "awslabs.postgres-mcp-server@latest" ], "env": { "AWS_PROFILE": "your-aws-profile", "AWS_REGION": "us-east-1", "FASTMCP_LOG_LEVEL": "ERROR" } } } }7. Skip the deprecated Elasticsearch MCP server
Elastic's README says the Elasticsearch MCP server is deprecated and will only get critical security updates, and points to the MCP endpoint of Elastic Agent Builder (Elastic 9.2.0+ and Elasticsearch Serverless) instead. Keep it only on existing installs; don't add it to a new Cursor setup.
8. Keep tool approval on and debug connections
Cursor asks for approval before running MCP tools by default; click the arrow next to a tool name to see the SQL or query before you approve it. MCP tools follow the same Run Modes as terminal commands, so don't allowlist write tools for a production database. If a server fails, open the Output panel (Cmd+Shift+U) and select MCP Logs; toggle a server off from Customize without deleting its config.
- Supabase's security guide names prompt injection as the main risk: data in a table (a support ticket, for example) can contain instructions that make the agent run other queries. Keep manual approval on and connect to development projects or branches, not production, where you can.
- Supabase also says not to give the MCP server to your customers: it runs with your developer permissions.
- Neon's read-only mode still allows run_sql, but runs each query in a READ ONLY transaction; get_connection_string is withheld because the string carries a privileged role password.
- MongoDB's read-only mode doesn't register create, update or delete tools at all, and the server logs which tools it skipped.
- Supabase, Neon and MongoDB have a documented read-only switch, and AWS's Aurora PostgreSQL server is read-only unless you add --allow_write_query. Prisma's docs list no read-only mode, so limit access through the workspace you approve; for AWS, also through the IAM role and database role you connect with.
Full walkthrough for any server: How to add an MCP server to Cursor.
Install notes and account access
Servers that log in to a vendor account act on real data and resources. The permissions line is what the vendor says the server can do with your account.
- Prisma MCP Server · Prisma
- Connect to https://mcp.prisma.io/mcp (Streamable HTTP). Claude Code: `claude mcp add --transport http prisma https://mcp.prisma.io/mcp`; Gemini CLI: `gemini mcp add --transport http Prisma https://mcp.prisma.io/mcp --scope user` (see docs for other clients). official docs ↗Can do: Manages Prisma Postgres databases (create, run SQL, restore backups), Prisma Compute deployments (logs, environment variables), Object Storage buckets and access keys, and searches Prisma docs in the workspace you approve; Prisma warns that tools that change or delete resources can cause data loss.Credentials: Prisma Console account sign-in (OAuth), then pick a workspace and approve access. · Maintenance: Hosted remote server; official docs last updated 2026-09-22; the old prisma/mcp repo is archived; no GitHub release · Verified 2026-10-21
- AWS MCP Servers · AWS Labs
- Pick a server from the README table, e.g. `uvx awslabs.aws-documentation-mcp-server@latest`, or the remote AWS MCP Server (preview) via `mcp-proxy-for-aws`. official docs ↗Can do: Each server acts on AWS with your local credentials/profile; scope depends on the IAM role.Credentials: AWS credentials (profile / IAM) for servers that call AWS; docs server needs none. · Maintenance: Release 2026.10.20261015170211 on 2026-10-16; last commit 2026-10-16 · Verified 2026-10-16
- MongoDB MCP Server · MongoDB
- `npx -y mongodb-mcp-server` with env vars from README (supports --readOnly). official docs ↗Can do: Runs queries/admin ops on a MongoDB database or Atlas; read-only mode documented.Credentials: MongoDB connection string, or Atlas API client ID/secret. · Maintenance: Release v3.1.0 on 2026-10-15; last commit 2026-10-16 · Verified 2026-10-16
- Neon MCP Server · Neon
- `npx neon@latest init`, or add the remote server with `npx add-mcp https://mcp.neon.tech/mcp` (see README). official docs ↗Can do: Manages Neon projects, branches and runs SQL with your account's rights.Credentials: Neon OAuth (remote) or NEON_API_KEY. · Maintenance: No GitHub release; last commit 2026-10-15 · Verified 2026-10-16
- Elasticsearch MCP Server (deprecated) · Elastic
- README marks it deprecated (critical security fixes only) and points to Elastic Agent Builder's MCP endpoint. official docs ↗Can do: Queries Elasticsearch indices with your credentials.Credentials: ES_URL plus ES_API_KEY (or username/password). · Maintenance: Release v0.4.6 on 2025-10-24; last commit 2026-06-23 ; DEPRECATED per README · Verified 2026-10-16
- Supabase MCP · Supabase
- Remote https://mcp.supabase.com/mcp (see README for flags like read_only and project_ref). official docs ↗Can do: Manages Supabase projects: SQL, migrations, branches, edge functions; read-only and project-scoped modes documented.Credentials: Supabase OAuth (remote) or a personal access token. · Maintenance: Release mcp-server-supabase-v0.14.0 on 2026-10-14; last commit 2026-10-16 · Verified 2026-10-17
Sources
- Cursor docs: Model Context Protocol (MCP) ↗
- Supabase docs: Supabase MCP server (Cursor, configuration options, security risks) ↗
- Neon MCP Server README: setup, scopes and read-only mode ↗
- MongoDB MCP Server README: quick start and read-only mode ↗
- Prisma docs: MCP server (Cursor) ↗
- AWS MCP Servers README: Getting started with Cursor ↗
- Amazon Aurora PostgreSQL MCP Server README ↗
- Elasticsearch MCP Server README (deprecation notice) ↗
- Prisma MCP Server: official install docs ↗
- AWS MCP Servers: official install docs ↗
- MongoDB MCP Server: official install docs ↗
- Neon MCP Server: official install docs ↗
- Elasticsearch MCP Server (deprecated): official install docs ↗
- Supabase MCP: official install docs ↗
All databases & SQL entries, in every client: Best MCP servers for Databases & SQL · Databases & SQL explorer. Ask the catalog from inside Cursor with the free, read-only AgentTask Atlas MCP server.
Other comparisons: Best MCP servers for Infra & deploy in Cursor · Best MCP servers for Debugging & observability in Cursor · Best MCP servers & skills for Frontend & UI in Claude Code · Infra & deploy · Debugging & observability · Library docs & research · Web fetching & scraping · Frontend & UI · Local files · Docs & writing · Planning & reasoning · Utilities
⚠ No independent security audit: entries summarize official sources only. Review permissions and code before installing.