Compared · Databases & SQL · VS Code
Best MCP servers for Databases & SQL in VS Code
10 entries in the AgentTask Atlas catalog fit databases & SQL and have VS Code setup instructions in their official README or docs. In VS Code these servers are used by GitHub Copilot's agent, and database servers act on real data, so the setup that matters most is how little access you give it. Neon, MongoDB, Upstash and Azure document a read-only switch; AWS's Aurora PostgreSQL server blocks write queries unless you enable them; Prisma, Sanity, Redis and Render act with whatever your account, token or connection allows. Several of these also need a secret, and VS Code's ${input:...} prompts keep it out of files you might commit. 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. VS Code steps checked 2026-11-09; catalog entries verified 2026-10-26 to 2026-11-25. Not ranked by a score: entries that document more clients come first.
- Hosted (remote URL) option: Prisma MCP Server, Sanity MCP Server (hosted), Render MCP Server (hosted), AWS MCP Servers, Upstash MCP Server, Neon MCP Server.
- Runs locally (npx, uvx, Docker, binary or CLI): MongoDB MCP Server, Redis MCP Server, Elasticsearch MCP Server (deprecated), Microsoft MCP (Azure MCP Server).
- 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. |
| Sanity MCP Server (hosted) Sanity | Yes | Required | Not stated (hosted service) | Pick it when the agent works on a Sanity-backed site and should query content, evolve schemas and draft documents itself; edits land as drafts, but use a token with a limited role if it should not publish or touch datasets. |
| Render MCP Server (hosted) Render | Yes | Required | Apache-2.0 (render-oss/render-mcp-server); hosted service under Render terms | Pick it to spin up Render services, check deploys and read logs or metrics from the agent; it can rewrite env vars and trigger deploys, so review those calls. |
| 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. |
| Upstash MCP Server Upstash | Yes | Required | MIT (upstash/mcp-server; hosted service under Upstash terms) | Pick it to inspect and debug Upstash Redis, QStash and Workflow from your editor; use the hosted server with a read-only grant first and scope it with ?features=. |
| 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. |
| Redis MCP Server Redis | — | Required | MIT | Pick it to let the agent inspect or cache data in Redis; connect it with a read-only ACL user unless writes are intended. |
| 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. |
| Microsoft MCP (Azure MCP Server) Microsoft | — | Required | MIT | Pick it for Azure resources from the agent; it acts with your signed-in identity and RBAC. |
How to add them to VS Code
1. Choose where the config lives
VS Code's docs steer new servers to the portable Copilot files: ~/.copilot/mcp-config.json for yourself, or a workspace-root .mcp.json to share with the team, both with a top-level mcpServers object. The older VS Code format (.vscode/mcp.json or your user-profile mcp.json, with a servers object) is still supported and is the one to use for ${input:...} prompts, which most database servers below need for a password, connection string or API key. Don't copy a config between the two formats without renaming that top-level key. MCP: Add Server walks you through either.
2. Neon: hosted server, read-only and scoped to one project
Neon's README says npx neon@latest init configures VS Code (GitHub Copilot) in one command, signing you in with OAuth and creating an API key for you. For a tighter grant, add the remote server yourself: with OAuth, readonly, projectId and roleName on the URL are a fixed grant confirmed at authorization. Read-only mode drops write tools and runs run_sql in a READ ONLY transaction; roleName makes all SQL log in as a Postgres role you created with only the grants it needs (without it, SQL runs as the database owner). Example in the VS Code format:
{ "servers": { "Neon": { "type": "http", "url": "https://mcp.neon.tech/mcp?readonly=true&projectId=my-project-id&roleName=app_reader" } } }3. MongoDB: --readOnly, connection string prompted once
MongoDB's README Install in VS Code button adds the local server with --readOnly and prompts for the connection string through an input variable, so the string is kept by VS Code instead of sitting in the file. Read-only mode registers only read, connect and metadata tools. This is that button's config written out (password: true is added here so the string is masked as you type it). For MongoDB Atlas, the README instead recommends the mongodb-atlas agent plugin: open the Extensions view, search @agentPlugins and install mongodb-atlas, which connects to the Atlas-hosted MCP server over OAuth.
{ "inputs": [ { "id": "connection_string", "type": "promptString", "description": "MongoDB connection string", "password": true } ], "servers": { "mongodb": { "type": "stdio", "command": "npx", "args": [ "-y", "mongodb-mcp-server@latest", "--readOnly" ], "env": { "MDB_MCP_CONNECTION_STRING": "${input:connection_string}" } } } }4. Upstash: email and API key from VS Code's secret storage
Upstash's README has an Install in VS Code button that prompts for your account email and API key and stores them in VS Code's secret storage, or this .vscode/mcp.json entry. It also documents read-only API keys: when the server starts with one, every tool that would modify state is disabled. Create a read-only key in the Upstash Console under Account, API Keys if you only need to inspect databases and logs.
{ "inputs": [ { "type": "promptString", "id": "email", "description": "Upstash email" }, { "type": "promptString", "id": "apiKey", "description": "Upstash API key", "password": true } ], "servers": { "upstash": { "type": "stdio", "command": "npx", "args": [ "-y", "@upstash/mcp-server@latest", "--email", "${input:email}", "--api-key", "${input:apiKey}" ] } } }5. Redis: local server via uvx
Redis's README VS Code section adds the server to mcp.json with uvx (add -qq before --from to silence uvx install messages) and notes that chat.agent.enabled must be on. Its tools can read and write strings, hashes, lists, sets, streams and JSON, and the README documents no read-only switch, so point it at a development instance or connect as a Redis user whose permissions you have limited. Mention #redis in a Copilot chat to steer it to these tools.
{ "servers": { "redis": { "type": "stdio", "command": "uvx", "args": [ "--from", "redis-mcp-server@latest", "redis-mcp-server", "--url", "redis://localhost:6379/0" ] } } }6. Prisma Postgres and Sanity: hosted servers with OAuth
Prisma's docs give an install link for VS Code or this .vscode/mcp.json entry; you sign in to the Prisma Console, pick a workspace and approve access, then ask "List my Prisma databases" to check it. Prisma warns that tools that change or delete resources can cause data loss or interrupt live traffic, and lists no read-only mode. Sanity's docs (its local @sanity/mcp-server is archived in favour of this hosted server) say to run MCP: Open User Configuration and add the entry below, or run npx sanity@latest mcp configure; VS Code then prompts you to sign in with OAuth. Sanity's tools query with GROQ but can also create, patch and publish documents.
{ "servers": { "Prisma": { "url": "https://mcp.prisma.io/mcp" }, "Sanity": { "type": "http", "url": "https://mcp.sanity.io" } } }7. Azure databases: the Azure MCP Server extension, read-only
Microsoft's README recommends VS Code: install GitHub Copilot Chat and the Azure MCP Server extension, then run Azure: Sign In. The extension's settings control what is exposed: azureMcp.readOnly prevents write operations (the README's example shows it set to false, so set it to true), and azureMcp.enabledServices filters which service namespaces load (the README's example lists storage and keyvault; list only the ones you use). The server acts with your Azure sign-in, so its reach is whatever your account's role assignments allow.
// VS Code settings.json "azureMcp.readOnly": true, "azureMcp.serverMode": "namespace"8. AWS: install only the database server you need, without write queries
awslabs/mcp has one server per AWS service; its VS Code section uses uvx in .vscode/mcp.json (its snippet uses an mcpServers key, which VS Code's own format calls servers). The Aurora PostgreSQL server's README says its config examples include --allow_write_query only to show how to enable writes: leave it out and the server enforces a read-only policy that the README calls best effort, so also connect with a role that has only CONNECT, USAGE and SELECT. The README's VS Code button uses --connection-string; the example below prompts for it instead of saving it in the file.
{ "inputs": [ { "type": "promptString", "id": "pg-connection", "description": "PostgreSQL connection string (read-only role)", "password": true } ], "servers": { "awslabs.postgres-mcp-server": { "type": "stdio", "command": "uvx", "args": [ "awslabs.postgres-mcp-server@latest", "--connection-string", "${input:pg-connection}" ], "env": { "FASTMCP_LOG_LEVEL": "ERROR" } } } }9. Render Postgres: hosted server, key from a prompt
Render's hosted server at https://mcp.render.com/mcp can list your Postgres databases and run read-only SQL queries against them, but it can also create databases, change a service's environment variables and trigger deploys. Render's docs list VS Code under other tools, and their API-key setups send the key as a Bearer header; in VS Code, prompt for it. After connecting, set the workspace with a prompt like "Set my Render workspace to ...".
{ "inputs": [ { "type": "promptString", "id": "render-api-key", "description": "Render API key", "password": true } ], "servers": { "render": { "type": "http", "url": "https://mcp.render.com/mcp", "headers": { "Authorization": "Bearer ${input:render-api-key}" } } } }10. 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 VS Code setup.
11. Keep tool approval on and verify a real tool call
VS Code's docs say to review startup, sign-in and tool approval requests and approve only actions you understand; for a database, expand the tool call and read the query before approving it. To trim what the agent can call, open Chat: Open Customizations > Tools in a Copilot session, or Configure Tools in the chat input for a Local session. MCP: List Servers shows each server and lets you start, stop or open its output. Then ask for a low-impact read that names the server (for example "Use the Neon MCP server to list the tables in my project. Do not change anything.") and check which server answered. A plausible answer alone isn't proof.
- Read-only switches documented by the vendors: Neon readonly=true (plus roleName), MongoDB --readOnly, Upstash read-only API keys, Azure azureMcp.readOnly, and AWS Aurora PostgreSQL without --allow_write_query (best effort). Prisma, Sanity, Redis and Render document none, so limit them through the workspace, token, database user or project you connect.
- Neon's read-only mode withholds get_connection_string, because the connection string carries a privileged role password, and hides run_sql_transaction.
- Data in a table can contain instructions aimed at the agent (prompt injection), so keep manual approval on and connect to development databases or branches rather than production where you can.
- VS Code's docs say servers that need ${input:...} variables aren't forwarded to Copilot harness sessions, and portable files have no input prompts; prefer OAuth sign-in (Neon, Prisma, Sanity, MongoDB Atlas plugin) for servers you share across harnesses.
- Sanity's OAuth sessions typically expire after 7 days; if VS Code gets stuck re-authenticating, Sanity's docs say to run Authentication: Remove Dynamic Authentication Providers, select Sanity and restart the server.
- Upstash's README suggests its skill plus @upstash/cli for most workflows, with the MCP server as the alternative; the server is the option covered here.
Full walkthrough for any server: How to add an MCP server to VS Code (GitHub Copilot).
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-11-24
- Sanity MCP Server (hosted) · Sanity
- Run `npx sanity@latest mcp configure` to set up detected editors, or add it manually: Claude Code `claude mcp add Sanity -t http https://mcp.sanity.io --scope user`, then authenticate with OAuth; in Cursor or VS Code add an http server with url https://mcp.sanity.io and sign in when prompted. official docs ↗Can do: Acts on your Sanity organization within your role: runs GROQ queries, reads and deploys schemas, creates, patches, publishes and unpublishes documents and release versions, uploads assets, manages datasets, projects and CORS origins, deploys a managed Studio, runs a limited subset of Sanity CLI commands, and searches Sanity docs. generate_image and transform_image spend AI credits.Credentials: Sanity account via OAuth (default) or a Sanity API token in an `Authorization: Bearer` header, limited to that token's role. · Maintenance: Hosted remote server https://mcp.sanity.io (GA since v2.6.0, 2025-12-11); changelog v2.44.0 on 2026-10-27. The old open-source sanity-io/sanity-mcp-server repo is archived and points to the hosted server. · Verified 2026-10-28
- Render MCP Server (hosted) · Render
- Connect to https://mcp.render.com/mcp. Claude Code: `/plugin install render@claude-plugins-official`, or `claude mcp add --transport http render https://mcp.render.com/mcp --header "Authorization: Bearer <YOUR_API_KEY>"`; Codex: `codex mcp add render --url https://mcp.render.com/mcp --oauth-client-id codex`; Cursor: `/add-plugin render`. Then tell the agent which Render workspace to use. official docs ↗Can do: Acts on the selected Render workspace: creates web services, static sites, cron jobs, Render Postgres and Key Value; lists services; updates all environment variables of a service; triggers deploys; reads logs and metrics; runs read-only SQL on Render Postgres. No deletes or scaling changes.Credentials: Render account via OAuth (official plugins for Claude Code, Codex, Cursor; Claude Desktop connector), or a Render API key as an Authorization: Bearer header. Render's docs say the AI tool can access only the workspace and permissions you grant the key. · Maintenance: Hosted server at https://mcp.render.com/mcp, auto-updated by Render; open-source code render-oss/render-mcp-server (Apache-2.0), last commit 2026-11-18; last GitHub release v0.3.0 on 2026-01-14 (for local runs, which Render discourages) · Verified 2026-11-25
- 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.11.20261119223057 on 2026-11-20; last commit 2026-11-23 · Verified 2026-11-24
- Upstash MCP Server · Upstash
- Connect to https://mcp.upstash.com/mcp (Streamable HTTP, OAuth). Claude Code: `claude mcp add --scope user --transport http upstash https://mcp.upstash.com/mcp`, then `/mcp` → Authenticate. Cursor: `{"mcpServers":{"upstash":{"url":"https://mcp.upstash.com/mcp"}}}`. Scope tools with e.g. `?features=redis,qstash_workflow`. official docs ↗Can do: Manages your Upstash account across Redis, QStash, Workflow, Vector, Search, Box and Blob: lists and creates databases and indexes, runs Redis commands, reads stats, logs and the DLQ, and can change plans, budgets, reset credentials or delete resources (74 tools on the hosted server). A read-only OAuth grant or read-only API key disables every write/destructive tool; `?features=` limits which product tools load. Plan and budget tools change billing.Credentials: Upstash account via OAuth on the hosted server (choose personal/team scope and read-only at consent), or a Developer API key as `Authorization: Bearer email:API_KEY` for headless use; the legacy local server takes --email and --api-key. · Maintenance: Hosted remote server at https://mcp.upstash.com/mcp is the recommended option; official repo upstash/mcp-server, release v0.4.0 on 2026-10-23. The README says the local stdio package @upstash/mcp-server is no longer maintained. · Verified 2026-10-26
- 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-23 · Verified 2026-10-26
- 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-21 · Verified 2026-10-26
- Redis MCP Server · Redis
- Run `uvx --from redis-mcp-server@latest redis-mcp-server --url redis://localhost:6379/0` from your client's MCP config (see README). official docs ↗Can do: Reads and writes Redis data (strings, hashes, lists, sets, streams, JSON, vector search) with the connection's ACL rights; the README shows how to use a read-only ACL user.Credentials: Redis connection URL or REDIS_HOST/REDIS_PORT plus REDIS_USERNAME/REDIS_PWD when auth is enabled; Entra ID for Azure Managed Redis. · Maintenance: Release 0.5.1 on 2026-08-05 (PyPI redis-mcp-server 0.5.1); last commit 2026-11-23 (main adds MCP_REDIS_ALLOWED_TOOLS tool allowlist, not yet in a release) · Verified 2026-11-24
- Elasticsearch MCP Server (deprecated) · Elastic
- README marks it deprecated (critical security fixes only) and points to the Elastic Agent Builder MCP endpoint ({KIBANA_URL}/api/agent_builder/mcp; Elastic 9.2+ and Serverless, GA since 9.3), which takes an API key or, on Serverless, OAuth. 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 (critical security fixes only) · Verified 2026-11-25
- Microsoft MCP (Azure MCP Server) · Microsoft
- See the repo README for the Azure MCP Server package and VS Code extension. official docs ↗Can do: Acts on Azure resources with your signed-in identity/RBAC.Credentials: Azure identity (az login / Entra ID). · Maintenance: Latest stable release Azure.Mcp.Server-3.0.0 on 2026-10-12; 4.0.0-beta.3 pre-release on 2026-10-23; last commit 2026-10-23 · Verified 2026-10-26
Sources
- VS Code docs: Add MCP servers ↗
- VS Code docs: MCP configuration reference ↗
- Neon MCP Server README: setup, scopes and read-only mode ↗
- MongoDB MCP Server README: quick start and read-only mode ↗
- Upstash MCP Server README (VS Code, read-only API keys) ↗
- Redis MCP Server README: VS Code with GitHub Copilot ↗
- Prisma docs: MCP server (VS Code) ↗
- Sanity docs: Sanity MCP server (VS Code) ↗
- Azure MCP Server README (VS Code) ↗
- AWS MCP Servers README: Getting started with VS Code ↗
- Amazon Aurora PostgreSQL MCP Server README ↗
- Render docs: Render MCP server ↗
- Elasticsearch MCP Server README (deprecation notice) ↗
- Prisma MCP Server: official install docs ↗
- Sanity MCP Server (hosted): official install docs ↗
- AWS MCP Servers: official install docs ↗
- Upstash MCP Server: official install docs ↗
- MongoDB MCP Server: official install docs ↗
- Neon MCP Server: official install docs ↗
- Redis MCP Server: official install docs ↗
- Elasticsearch MCP Server (deprecated): official install docs ↗
- Microsoft MCP (Azure MCP Server): official install docs ↗
All databases & SQL entries, in every client: Best MCP servers for Databases & SQL · Databases & SQL explorer. Ask the catalog from inside VS Code 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 · Best MCP servers for Databases & SQL in Cursor · Best MCP servers for Infra & deploy in Claude Code · Best MCP servers for Library docs & research in VS Code · Best MCP servers for Infra & deploy in VS Code · Best MCP servers for Debugging & observability in VS Code · Best MCP servers for Frontend & UI in Cursor · Best MCP servers for Frontend & UI in VS Code · Best MCP servers for Library docs & research in Cursor · Best MCP servers for Library docs & research in Claude Code · Best MCP servers for Debugging & observability in Claude Code · Best MCP servers for Databases & SQL in Claude Code · Best MCP servers for Library docs & research in Claude Desktop · Best MCP servers for Infra & deploy in Claude Desktop · Best MCP servers & skills for Docs & writing in Claude Code · Best MCP servers for Utilities in VS Code · Best MCP servers for Databases & SQL in Claude Desktop · Best MCP servers for Debugging & observability in Claude Desktop · Best MCP servers for Planning & reasoning in VS Code · Best MCP servers for Planning & reasoning in Cursor · Best MCP servers for Utilities in Claude Desktop · Best MCP servers for Utilities in Claude Code · Best MCP servers for Utilities in Cursor · Best MCP servers for CI/CD in Cursor · Git & GitHub repos · Code review · CI/CD · Infra & deploy · Debugging & observability · Library docs & research · Web fetching & scraping · Frontend & UI · Local files · Docs & writing · Build AI apps · Planning & reasoning · Utilities
How much context does each one cost? See the MCP tool budget: measured tools and tokens per server.
⚠ No independent security audit: entries summarize official sources only. Review permissions and code before installing.