Supabase
MCP server for interacting with the Supabase platform
Descripción del creador (original en inglés)
MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.
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.
DATABASE_URL, PG_HOST, PG_PORT, PG_USER, PG_PASSWORD, PG_DATABASE, PG_ALLOW_WRITE, PG_SSLMODE, PG_SSL_CA, PG_ENABLE_RUNTIME_CONNECT, PG_MAX_RESULT_BYTES, PG_STATEMENT_TIMEOUT, PG_CONNECT_TIMEOUT, PG_SSH_HOST, PG_SSH_PORT, PG_SSH_USER, PG_SSH_PRIVATE_KEY, PG_SSH_PASSPHRASE, PG_SSH_AGENT, PG_SSH_PASSWORD, PG_SSH_FINGERPRINT, PG_SSH_KEEPALIVE_INTERVALLos valores marcados como secretos son llaves de tu cuenta. Nunca los compartas ni los pegues en un chat.
Necesitas
¿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",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "your-value",
"PG_HOST": "your-value",
"PG_PORT": "your-value",
"PG_USER": "your-value",
"PG_PASSWORD": "your-value",
"PG_DATABASE": "your-value",
"PG_ALLOW_WRITE": "your-value",
"PG_SSLMODE": "your-value",
"PG_SSL_CA": "your-value",
"PG_ENABLE_RUNTIME_CONNECT": "your-value",
"PG_MAX_RESULT_BYTES": "your-value",
"PG_STATEMENT_TIMEOUT": "your-value",
"PG_CONNECT_TIMEOUT": "your-value",
"PG_SSH_HOST": "your-value",
"PG_SSH_PORT": "your-value",
"PG_SSH_USER": "your-value",
"PG_SSH_PRIVATE_KEY": "your-value",
"PG_SSH_PASSPHRASE": "your-value",
"PG_SSH_AGENT": "your-value",
"PG_SSH_PASSWORD": "your-value",
"PG_SSH_FINGERPRINT": "your-value",
"PG_SSH_KEEPALIVE_INTERVAL": "your-value"
}
}
}
}Ejecuta esto en tu terminal
claude mcp add postgres --env DATABASE_URL=your-value --env PG_HOST=your-value --env PG_PORT=your-value --env PG_USER=your-value --env PG_PASSWORD=your-value --env PG_DATABASE=your-value --env PG_ALLOW_WRITE=your-value --env PG_SSLMODE=your-value --env PG_SSL_CA=your-value --env PG_ENABLE_RUNTIME_CONNECT=your-value --env PG_MAX_RESULT_BYTES=your-value --env PG_STATEMENT_TIMEOUT=your-value --env PG_CONNECT_TIMEOUT=your-value --env PG_SSH_HOST=your-value --env PG_SSH_PORT=your-value --env PG_SSH_USER=your-value --env PG_SSH_PRIVATE_KEY=your-value --env PG_SSH_PASSPHRASE=your-value --env PG_SSH_AGENT=your-value --env PG_SSH_PASSWORD=your-value --env PG_SSH_FINGERPRINT=your-value --env PG_SSH_KEEPALIVE_INTERVAL=your-value -- npx -y mcp-postgres-serverCompleta 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",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "your-value",
"PG_HOST": "your-value",
"PG_PORT": "your-value",
"PG_USER": "your-value",
"PG_PASSWORD": "your-value",
"PG_DATABASE": "your-value",
"PG_ALLOW_WRITE": "your-value",
"PG_SSLMODE": "your-value",
"PG_SSL_CA": "your-value",
"PG_ENABLE_RUNTIME_CONNECT": "your-value",
"PG_MAX_RESULT_BYTES": "your-value",
"PG_STATEMENT_TIMEOUT": "your-value",
"PG_CONNECT_TIMEOUT": "your-value",
"PG_SSH_HOST": "your-value",
"PG_SSH_PORT": "your-value",
"PG_SSH_USER": "your-value",
"PG_SSH_PRIVATE_KEY": "your-value",
"PG_SSH_PASSPHRASE": "your-value",
"PG_SSH_AGENT": "your-value",
"PG_SSH_PASSWORD": "your-value",
"PG_SSH_FINGERPRINT": "your-value",
"PG_SSH_KEEPALIVE_INTERVAL": "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",
"mcp-postgres-server"
],
"env": {
"DATABASE_URL": "your-value",
"PG_HOST": "your-value",
"PG_PORT": "your-value",
"PG_USER": "your-value",
"PG_PASSWORD": "your-value",
"PG_DATABASE": "your-value",
"PG_ALLOW_WRITE": "your-value",
"PG_SSLMODE": "your-value",
"PG_SSL_CA": "your-value",
"PG_ENABLE_RUNTIME_CONNECT": "your-value",
"PG_MAX_RESULT_BYTES": "your-value",
"PG_STATEMENT_TIMEOUT": "your-value",
"PG_CONNECT_TIMEOUT": "your-value",
"PG_SSH_HOST": "your-value",
"PG_SSH_PORT": "your-value",
"PG_SSH_USER": "your-value",
"PG_SSH_PRIVATE_KEY": "your-value",
"PG_SSH_PASSPHRASE": "your-value",
"PG_SSH_AGENT": "your-value",
"PG_SSH_PASSWORD": "your-value",
"PG_SSH_FINGERPRINT": "your-value",
"PG_SSH_KEEPALIVE_INTERVAL": "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.
PG_HOST envPG_PORT envPG_USER envPG_DATABASE envPG_ALLOW_WRITE envPG_SSLMODE envPG_SSL_CA envPG_ENABLE_RUNTIME_CONNECT envPG_MAX_RESULT_BYTES envPG_STATEMENT_TIMEOUT envPG_CONNECT_TIMEOUT envPG_SSH_HOST envPG_SSH_PORT envPG_SSH_USER envPG_SSH_PRIVATE_KEY envPG_SSH_AGENT envPG_SSH_FINGERPRINT envPG_SSH_KEEPALIVE_INTERVAL 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 6 nov 2026
El nombre en el registro se verificó con la cuenta de GitHub antonorlov, 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.
Debes completar: DATABASE_URL, PG_PASSWORD, PG_SSH_PASSPHRASE, PG_SSH_PASSWORD
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 (0.3.1) llegó al registro hace 2 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.
A Model Context Protocol (MCP) server for PostgreSQL: local, Docker, RDS, Neon, and Supabase databases.
The server is small and auditable, with four runtime dependencies: the MCP SDK, pg, pg-connection-string, and zod (plus ssh2, an optional dependency used only for SSH tunneling).
Requires Node.js 20 or newer.
The preferred way to configure the server is a single DATABASE_URL:
{
"mcpServers": { "postgres": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-postgres-server"], "env": { "DATABASE_URL": "postgres://user:password@localhost:5432/mydb", "PG_ALLOW_WRITE": "false" } } } }
With PG_ALLOW_WRITE set to "false" the server has read-only access to the database. This is the default; set it to "true" only if the model must write.
The same JSON works in any MCP client that speaks stdio: VS Code, Cursor, Claude Code, Codex, Windsurf.
Alternatively, set the individual PG_* variables; they are used when DATABASE_URL is not set:
{
"mcpServers": { "postgres": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-postgres-server"], "env": { "PG_HOST": "your_host", "PG_PORT": "5432", "PG_USER": "your_user", "PG_PASSWORD": "your_password", "PG_DATABASE": "your_database", "PG_ALLOW_WRITE": "false" } } } }
npm install mcp-postgres-server
Or run directly with:
npx mcp-postgres-server
Local Postgres:
DATABASE_URL=postgres://mcp_readonly:secret@localhost:5432/mydb
Postgres in Docker: if the database runs in a container with a published port, connect to localhost: as usual. If the *MCP server itself* runs inside a container and the database runs on your host machine, use host.docker.internal instead of localhost:
DATABASE_URL=postgres://mcp_readonly:secret@host.docker.internal:5432/mydb
Amazon RDS:
DATABASE_URL=postgres://mcp_readonly:secret@mydb.xxxxxx.us-east-1.rds.amazonaws.com:5432/mydb?sslmode=require
Neon:
DATABASE_URL=postgres://mcp_readonly:secret@ep-xxx-xxx.us-east-2.aws.neon.tech/mydb?sslmode=require
Supabase:
DATABASE_URL=postgres://postgres.xxxxxxxx:secret@aws-0-us-east-1.pooler.supabase.com:5432/postgres?sslmode=require
Tool availability depends on configuration:
| Tool | Available |
|---|---|
query, list_schemas, list_tables, describe_table | Always |
execute | Always (refuses writes unless PG_ALLOW_WRITE=true) |
connect_db | Only when PG_ENABLE_RUNTIME_CONNECT=true |
Execute a read-only SQL statement. Accepts SELECT, WITH ... SELECT, EXPLAIN, and SHOW. One statement per call - multi-statement input is rejected by the extended query protocol. In read-only mode (the default) the statement runs as BEGIN READ ONLY, the query, and ROLLBACK - three commands, roughly two network round trips with pipelining - so the database itself refuses any write. With PG_ALLOW_WRITE=true the statement is sent directly, without that wrapper, so a write run through query would execute - use execute for writes. Supports PostgreSQL-style $1, $2 prepared-statement parameters; values are bound by the driver and never spliced into the SQL text.
use_mcp_tool({
server_name: "postgres", tool_name: "query", arguments: { sql: "SELECT * FROM users WHERE id = $1", params: [1] } });
Returns compact JSON: {"rows": [...], "rowCount": n, "returnedRows": n, "truncated": false}. When the serialized rows exceed PG_MAX_RESULT_BYTES, only the rows that fit are returned (returnedRows < rowCount), truncated is true, and a hint suggests adding LIMIT/WHERE or selecting fewer columns.
List all schemas in the connected database.
use_mcp_tool({
server_name: "postgres", tool_name: "list_schemas", arguments: {} });
List tables in the connected database. Accepts an optional schema parameter (defaults to 'public').
// List tables in the 'public' schema (default)
use_mcp_tool({ server_name: "postgres", tool_name: "list_tables", arguments: {} });
// List tables in a specific schema use_mcp_tool({ server_name: "postgres", tool_name: "list_tables", arguments: { schema: "my_schema" } });
Get the structure of a specific table (columns, types, nullability, defaults, primary keys). Accepts an optional schema parameter (defaults to 'public').
use_mcp_tool({
server_name: "postgres", tool_name: "describe_table", arguments: { table: "users", schema: "my_schema" // optional } });
PG_ALLOW_WRITE=trueExecute an INSERT, UPDATE, DELETE, or DDL statement. Always registered, but in read-only mode (the default) it refuses with an error naming PG_ALLOW_WRITE and changes nothing - the statement never reaches the database. With PG_ALLOW_WRITE=true it runs: same $1, $2 parameter handling as query, one complete statement per call, and the connecting role governs what it may do. Returns {"rowCount": n, "command": "INSERT"}.
use_mcp_tool({
server_name: "postgres", tool_name: "execute", arguments: { sql: "INSERT INTO users (name, email) VALUES ($1, $2)", params: ["John Doe", "john@example.com"] } });
PG_ENABLE_RUNTIME_CONNECT=trueConnect to a different PostgreSQL database at runtime using provided credentials. Not registered by default - prefer configuring credentials through the environment so they never pass through model-visible arguments. Session limits (statement_timeout, idle_in_transaction_session_timeout) are re-applied after every reconnect; read-only reads enforce read-only in their own BEGIN READ ONLY transaction.
use_mcp_tool({
server_name: "postgres", tool_name: "connect_db", arguments: { host: "localhost", port: 5432, user: "your_user", password: "your_password", database: "your_database" } });
| Variable | Default | Description | |||||
|---|---|---|---|---|---|---|---|
DATABASE_URL | - | Full connection string (preferred). Supports ?sslmode= in the URL. | |||||
PG_HOST | - | Database host (fallback when DATABASE_URL is not set) | |||||
PG_PORT | 5432 | Database port | |||||
PG_USER | - | Database user | |||||
PG_PASSWORD | - | Database password | |||||
PG_DATABASE | - | Database name | |||||
PG_ALLOW_WRITE | false | When true, execute performs writes and reads are sent directly. Off (default) is read-only: execute refuses writes and each read runs in a READ ONLY transaction | |||||
PG_SSLMODE | - | disable \ | allow \ | prefer \ | require \ | verify-ca \ | verify-full. require/allow/prefer encrypt without verifying the certificate; verify-ca/verify-full verify (supply a CA via PG_SSL_CA). Unrecognized values fail at startup. Limitation: unlike libpq, allow/prefer do not fall back to plaintext (node-postgres has no opportunistic SSL), so a server without TLS needs disable. |
PG_SSL_CA | - | Path to a CA certificate file. Setting it by itself implies verify-full | |||||
PG_ENABLE_RUNTIME_CONNECT | false | Register the connect_db tool (runtime credential switching) | |||||
PG_MAX_RESULT_BYTES | 32768 | Byte budget for a query result sent to the model. Whole rows are kept while they fit; over the budget returnedRows < rowCount and truncated: true (if not even the first row fits, returnedRows is 0 with a hint). ~32 KiB ≈ 8k tokens; lower it for strict clients, raise it if your client allows more. | |||||
PG_STATEMENT_TIMEOUT | 30000 | Statement timeout in milliseconds, applied to every session | |||||
PG_CONNECT_TIMEOUT | 10000 | Timeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels) |
To reach a database only accessible through a bastion, see SSH tunneling (adds PG_SSH_* variables).
PG_ALLOW_WRITE=true)BEGIN READ ONLY), never by client-side SQL parsingpg driver never leaks past itDATABASE_URL support with SSL (sslmode=disable|allow|prefer|require|verify-ca|verify-full, custom CA)$1-style placeholders, bound by the drivertruncated flag instead of flooding the model's contextPG_SSH_*) with mandatory host-key verification, loaded only when configuredFull details, including the threat model and disclosure process, are in SECURITY.md. The short version:
CREATE ROLE mcp_readonly LOGIN PASSWORD 'change-me';
GRANT CONNECT ON DATABASE your_database TO mcp_readonly; GRANT pg_read_all_data TO mcp_readonly; -- adds read privileges ALTER ROLE mcp_readonly SET default_transaction_read_only = on; -- read-only by default
(On PostgreSQL 13 or older, grant SELECT explicitly instead of pg_read_all_data - see SECURITY.md.) The server warns on stderr if you connect as a superuser. Read grants do not revoke existing privileges, and defaults remain mutable; available functions, ownership and inherited privileges also matter.
BEGIN READ ONLY transaction, so PostgreSQL itself - which alone knows what a function, view, or rule does - refuses any write with SQLSTATE 25006 and reverts any session change the statement made. The extended protocol rejects multi-command strings.Honest framing: the read-only transaction is defense-in-depth on top of the role, not a replacement for it. Read-only mode stops a confused or prompt-injected model from *writing* to your database; it does not stop prompt injection carried in the row data a query returns. Don't point this server at production - use a replica, a snapshot, or a tightly scoped role. See SECURITY.md.
Set PG_SSH_HOST (plus auth and host-key verification) to reach a database that is only accessible through a bastion (an SSH jump host). The connection string / PG_* fields then describe the database as seen from the bastion:
{
"mcpServers": { "postgres": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-postgres-server"], "env": { "DATABASE_URL": "postgres://mcp_readonly:secret@db.internal:5432/mydb?sslmode=verify-full",
Solo se muestra el principio; lee el resto en el repo