Supabase
MCP server for interacting with the Supabase platform
Descripción del creador (original en inglés)
PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.
Estos tres nunca se combinan en una sola puntuación: las opiniones, las mediciones y la popularidad son cosas distintas.
Todavía no escribimos un resumen sencillo para este. Abajo están los datos que leímos del registro.
Elige la app de IA que usas y copia la configuración.
MCP_KEY_HOST, MCP_KEY_PORT, MCP_KEY_NAME, MCP_KEY_USER, MCP_KEY_PASS, MCP_KEY_SSLMODENecesitas
¿Qué app usas?
Elige tu app arriba. La recordamos, así que la próxima vez el botón dirá “Instalar en …”.
Abre Claude Desktop → Settings → Developer → Edit Config y pega esto en claude_desktop_config.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@edelciomolina/postgres-mcp"
],
"env": {
"MCP_KEY_HOST": "your-value",
"MCP_KEY_PORT": "your-value",
"MCP_KEY_NAME": "your-value",
"MCP_KEY_USER": "your-value",
"MCP_KEY_PASS": "your-value",
"MCP_KEY_SSLMODE": "your-value"
}
}
}
}Ejecuta esto en tu terminal
claude mcp add postgres --env MCP_KEY_HOST=your-value --env MCP_KEY_PORT=your-value --env MCP_KEY_NAME=your-value --env MCP_KEY_USER=your-value --env MCP_KEY_PASS=your-value --env MCP_KEY_SSLMODE=your-value -- npx -y @edelciomolina/postgres-mcpCompleta los valores vacíos antes de ejecutarlo.
Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@edelciomolina/postgres-mcp"
],
"env": {
"MCP_KEY_HOST": "your-value",
"MCP_KEY_PORT": "your-value",
"MCP_KEY_NAME": "your-value",
"MCP_KEY_USER": "your-value",
"MCP_KEY_PASS": "your-value",
"MCP_KEY_SSLMODE": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
Pégalo en .vscode/mcp.json de tu proyecto
{
"servers": {
"postgres": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@edelciomolina/postgres-mcp"
],
"env": {
"MCP_KEY_HOST": "your-value",
"MCP_KEY_PORT": "your-value",
"MCP_KEY_NAME": "your-value",
"MCP_KEY_USER": "your-value",
"MCP_KEY_PASS": "your-value",
"MCP_KEY_SSLMODE": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
Este se ejecuta en tu computadora, y ChatGPT solo puede conectarse a servidores en internet. Elige otra app.
Tu elección se guarda en una cookie en este dispositivo; no necesitas cuenta.
MCP_KEY_HOST envMCP_KEY_PORT envMCP_KEY_NAME envMCP_KEY_USER envMCP_KEY_PASS envMCP_KEY_SSLMODE envEsta configuración se genera a partir de la ficha del creador en el registro. Si el README dice otra cosa, sigue el README.
Se ejecuta en tu computadora; la lista de herramientas aparece en tu app de IA después de instalarlo.
Revisamos información que cualquiera puede ver; no hemos leído el código. Las revisiones que no aplican no se cuentan. · Revisado el 7 nov 2026
El nombre en el registro se verificó con la cuenta de GitHub edelciomolina, dueña del repo
Todavía no hemos leído este repo en GitHub
Todavía no hemos leído este repo en GitHub
Este se ejecuta en tu computadora; no hay endpoint en internet
Se ejecuta en tu computadora y usa ajustes locales en su lugar
Se ejecuta en tu computadora; solo podemos leer listas de herramientas de endpoints en internet
Comparado con todos los servidores activos de esta categoría en el registro. Las estrellas solo cuentan cuando quien lo publica es dueño del repo.
Superó 1 de 1 revisiones básicas aplicables. No hemos leído el código. Antes de agregar una clave o un token, revisa qué acceso pide el servidor y usa una clave que tenga solo los permisos que necesitas.
El registro no indica ninguna clave obligatoria, aunque algunos servidores te piden iniciar sesión la primera vez que los usas.
Se ejecuta en tu computadora. Tu app de IA lo inicia cuando hace falta, y los datos no pasan por los servidores del creador (a menos que el propio servidor llame a un servicio en línea).
El repo de GitHub cambió por última vez –, y la última versión (1.7.0) llegó al registro hace 5 meses.
Las apps compatibles con MCP, como Claude Desktop, Claude Code, Cursor y VS Code. También necesitas Node.js en tu computadora.
En la misma categoría: Supabase, MongoDB MCP Server, Elasticsearch MCP Server
Servidores de la misma categoría hechos por otros creadores, ordenados por estrellas.
Cómo leer una tarjeta:★ Estrellas de GitHubiTres pilares: reseñas · revisiones · usoiActualizado = fecha en que se publicó la última versión en el registroi
MCP server for interacting with the Supabase platform
MongoDB Model Context Protocol Server
MCP server for interacting with Elasticsearch
Copiado tal cual del repo del creador. PopNx MCP no lo ha revisado ni lo respalda. Se quitaron HTML, imágenes y scripts. Los enlaces llevan fuera de este sitio.
English | 🌐 Português
Postgres MCP 🔌 Native MCP server for PostgreSQL - reads credentials from .env at runtime with flexible key mapping, configurable tool selection, and read-only mode by default .
Most LLMs interact with databases by guessing - assuming table names, inventing column names, and writing queries that may fail or expose sensitive data. Postgres MCP solves this by giving the LLM a structured, safe interface to actually understand the database before touching it.
Built with @modelcontextprotocol/sdk and pg, it provides:
pg_classify_query_risk lets the LLM check a query's safety before running it.env at startup; nothing sensitive lives in mcp.jsontool= args, so the LLM only sees what you choose to expose.env file with database credentials (anywhere in the project tree - see .env Discovery)There are two ways to use this package. Choose the one that best fits your workflow.
npx, recommended for quick start)No installation needed. npx downloads and runs the package on demand. Add -y as the first argument to skip the confirmation prompt.
{
"servers": { "Postgres Tools": { "type": "stdio", "command": "npx", "args": [ "-y", "@edelciomolina/postgres-mcp" ], "env": { "MCP_KEY_HOST": "DB_HOST", "MCP_KEY_PORT": "DB_PORT", "MCP_KEY_NAME": "DB_NAME", "MCP_KEY_SSLMODE": "DB_SSLMODE", "MCP_KEY_USER": "DB_USER", "MCP_KEY_PASS": "DB_PASS" } } } }
This starts the server with the default read-only tool set - no tool= arguments needed. To enable write-capable tools, see Write-capable tools.
💡 Using Supabase, Neon, Railway or another platform that only provides a connection string? Use
MCP_KEY_URLpointing toDATABASE_URL(or whatever variable name the platform uses). The server will prioritize the URL and ignore the individual variables. See Connection via URL.
VS Code supports discovering and installing MCP servers directly in the editor, without using the terminal.
mcp.json automatically💡 You can also open the MCP Servers panel via Copilot chat icon → Manage MCP Servers to browse, enable, or disable servers at any time.
After installing, edit the generated entry in .vscode/mcp.json to add your tool= arguments and env key mappings as shown in the Usage section below.
mcp.json)Read-only (default - no `tool=` arguments needed):
{
"servers": { "Postgres Tools": { "type": "stdio", "command": "npx", "args": ["@edelciomolina/postgres-mcp"], "env": { "MCP_KEY_HOST": "DB_HOST", "MCP_KEY_PORT": "DB_PORT", "MCP_KEY_NAME": "DB_NAME", "MCP_KEY_SSLMODE": "DB_SSLMODE", "MCP_KEY_USER": "DB_USER", "MCP_KEY_PASS": "DB_PASS" } } } }
With write tools (explicit opt-in required):
{
"servers": { "Postgres Tools": { "type": "stdio", "command": "npx", "args": [ "@edelciomolina/postgres-mcp", "tool=pg_manage_schema", "tool=pg_manage_indexes" ], "env": { "POSTGRES_MCP_ALLOW_WRITE": "true", "MCP_KEY_HOST": "DB_HOST", "MCP_KEY_PORT": "DB_PORT", "MCP_KEY_NAME": "DB_NAME", "MCP_KEY_SSLMODE": "DB_SSLMODE", "MCP_KEY_USER": "DB_USER", "MCP_KEY_PASS": "DB_PASS" } } } }
⚠️ Write-capable tools require
POSTGRES_MCP_ALLOW_WRITE=trueinenv. Without it, the server exits at startup.
The corresponding .env file at the root of your project:
DB_HOST=db.your-project.supabase.co
DB_PORT=5432 DB_NAME=postgres DB_SSLMODE=require DB_USER=readonly_user DB_PASS=your_password
mcp.json configuration worksenv - credential key mappingThe env block does not contain the actual credentials. It maps each MCP_KEY_* to the variable name in your .env file.
Key in env | Points to .env variable | Example value |
|---|---|---|
MCP_KEY_URL | DATABASE_URL | postgresql://user:pass@host:5432/db?sslmode=require |
MCP_KEY_HOST | DB_HOST | db.example.supabase.co |
MCP_KEY_PORT | DB_PORT | 5432 |
MCP_KEY_NAME | DB_NAME | postgres |
MCP_KEY_SSLMODE | DB_SSLMODE | require |
MCP_KEY_USER | DB_USER | readonly_user |
MCP_KEY_PASS | DB_PASS | secret |
Priority: when
MCP_KEY_URL(orDATABASE_URL) is present, the server uses the URL directly and ignores the individual credential keys.
This indirection lets you use any variable name in your .env - useful when sharing a .env across multiple services with different naming conventions.
args - tool selection via tool= prefixEach enabled MCP tool is declared as a separate argument in the format tool= :
"args": [
"-y", "@edelciomolina/postgres-mcp", "tool=pg_manage_schema", "tool=pg_manage_indexes" ]
This makes the tool list explicit and auditable directly in mcp.json - no hidden configuration files. 🔍
DATABASE_URL)In addition to individual credentials, you can provide a full connection string - the standard format on platforms like Supabase, Neon, and Railway.
`.env`:
DATABASE_URL=postgresql://user:password@host:5432/database?sslmode=require
`mcp.json`:
{
"servers": { "Postgres Tools": { "type": "stdio", "command": "npx", "args": ["-y", "@edelciomolina/postgres-mcp"], "env": { "MCP_KEY_URL": "DATABASE_URL" } } } }
The variable mapped by MCP_KEY_URL has priority over the other keys (MCP_KEY_HOST, MCP_KEY_PORT, etc.). If the URL is present, the other variables are ignored.
If the platform uses a different name (e.g. DB_URL), just adjust the mapping:
"MCP_KEY_URL": "DB_URL"
If you omit all tool= arguments, the server starts with a curated read-only set - all tools that can retrieve, analyze, or explain data, but nothing that can modify it.
✅ Included in defaults (read-only):
pg_execute_query pg_manage_query pg_inspect_schema
pg_get_setup_instructions pg_analyze_database pg_monitor_database pg_debug_database pg_inspect_database_graph pg_describe_table_semantics pg_find_related_tables pg_classify_query_risk
💡
pg_execute_queryrejectsINSERT,UPDATE,DELETE, DDL,ANALYZE,VACUUM,EXPLAIN ANALYZEand other write/maintenance commands before the database is queried.
💡
pg_inspect_schemaprovides read-only schema introspection (get_info,get_enums). For DDL operations, usepg_manage_schemawith explicit opt-in.
⚠️ Excluded from defaults - require `tool=` argument AND `POSTGRES_MCP_ALLOW_WRITE=true`:
| Tool | Operations |
|---|---|
pg_manage_schema | CREATE TABLE, ALTER TABLE, CREATE TYPE |
pg_manage_indexes | CREATE INDEX, DROP INDEX, REINDEX |
pg_manage_constraints | ADD CONSTRAINT, DROP CONSTRAINT |
pg_manage_functions | CREATE FUNCTION, DROP FUNCTION |
pg_manage_triggers | CREATE TRIGGER, DROP TRIGGER, enable/disable |
pg_manage_rls | ENABLE/DISABLE RLS, CREATE/ALTER/DROP POLICY |
pg_manage_users | CREATE/DROP/ALTER USER, GRANT, REVOKE |
pg_execute_mutation | INSERT / UPDATE / DELETE / UPSERT |
pg_execute_sql | Arbitrary SQL with transaction support |
.env file discoveryThe server resolves the .env file in this order:
cwd; takes priority over everythingcwd, searches each parent directory until a .env is found or the filesystem root is reachedIf no .env is found, the server exits with a clear error message.
When VS Code starts the MCP process, cwd is typically the workspace root. If your .env is in a subfolder (e.g. functions/.env), use env-file= to point to it explicitly:
{
"servers": { "Postgres Tools": { "type": "stdio", "command": "npx", "args": [ "-y", "@edelciomolina/postgres-mcp", "env-file=functions/.env" ], "env": { "MCP_KEY_HOST": "DB_HOST", "MCP_KEY_PORT": "DB_PORT", "MCP_KEY_NAME": "DB_NAME", "MCP_KEY_SSLMODE": "DB_SSLMODE", "MCP_KEY_USER": "DB_USER", "MCP_KEY_PASS": "DB_PASS" } } } }
💡 The upward search behavior handles the common case automatically. Use
env-file=when you need explicit control (CI, monorepos, Docker bind-mounts).
| Tool | Description |
|---|---|
pg_execute_query | SELECT / COUNT / EXISTS with write and multi-statement guards |
pg_manage_query | EXPLAIN plans, slow query analysis, pg_stat_statements |
pg_inspect_schema | Schema info and ENUM types (read-only introspection) |
pg_get_setup_instructions | Setup instructions per platform |
pg_analyze_database | Performance, configuration, and storage analysis |
pg_monitor_database | Real-time monitoring of connections, queries, locks, and replication |
| pg_debug_database | Diagnose connections, locks, performance, a
Solo se muestra el principio; lee el resto en el repo