Supabase
MCP server for interacting with the Supabase platform
Descripción del creador (original en inglés)
Safe, audited PostgreSQL operations for AI agents: queries, migrations, EXPLAIN, containers
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.
PGOPS_DSN, PGOPS_READONLY_DSN, PGOPS_READ_ONLY, PGOPS_APPROVAL_MODE, PGOPS_AUDIT_LOG, PGOPS_DEFAULT_TIMEOUT_MS, PGOPS_MAX_TIMEOUT_MS, PGOPS_DEFAULT_ROW_LIMITLos 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": {
"pgops": {
"command": "uvx",
"args": [
"pgops-mcp"
],
"env": {
"PGOPS_DSN": "your-value",
"PGOPS_READONLY_DSN": "your-value",
"PGOPS_READ_ONLY": "your-value",
"PGOPS_APPROVAL_MODE": "your-value",
"PGOPS_AUDIT_LOG": "your-value",
"PGOPS_DEFAULT_TIMEOUT_MS": "your-value",
"PGOPS_MAX_TIMEOUT_MS": "your-value",
"PGOPS_DEFAULT_ROW_LIMIT": "your-value"
}
}
}
}Ejecuta esto en tu terminal
claude mcp add pgops --env PGOPS_DSN=your-value --env PGOPS_READONLY_DSN=your-value --env PGOPS_READ_ONLY=your-value --env PGOPS_APPROVAL_MODE=your-value --env PGOPS_AUDIT_LOG=your-value --env PGOPS_DEFAULT_TIMEOUT_MS=your-value --env PGOPS_MAX_TIMEOUT_MS=your-value --env PGOPS_DEFAULT_ROW_LIMIT=your-value -- uvx pgops-mcpCompleta los valores vacíos antes de ejecutarlo.
Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json
{
"mcpServers": {
"pgops": {
"command": "uvx",
"args": [
"pgops-mcp"
],
"env": {
"PGOPS_DSN": "your-value",
"PGOPS_READONLY_DSN": "your-value",
"PGOPS_READ_ONLY": "your-value",
"PGOPS_APPROVAL_MODE": "your-value",
"PGOPS_AUDIT_LOG": "your-value",
"PGOPS_DEFAULT_TIMEOUT_MS": "your-value",
"PGOPS_MAX_TIMEOUT_MS": "your-value",
"PGOPS_DEFAULT_ROW_LIMIT": "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": {
"pgops": {
"type": "stdio",
"command": "uvx",
"args": [
"pgops-mcp"
],
"env": {
"PGOPS_DSN": "your-value",
"PGOPS_READONLY_DSN": "your-value",
"PGOPS_READ_ONLY": "your-value",
"PGOPS_APPROVAL_MODE": "your-value",
"PGOPS_AUDIT_LOG": "your-value",
"PGOPS_DEFAULT_TIMEOUT_MS": "your-value",
"PGOPS_MAX_TIMEOUT_MS": "your-value",
"PGOPS_DEFAULT_ROW_LIMIT": "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.
PGOPS_READ_ONLY envPGOPS_APPROVAL_MODE envPGOPS_AUDIT_LOG envPGOPS_DEFAULT_TIMEOUT_MS envPGOPS_MAX_TIMEOUT_MS envPGOPS_DEFAULT_ROW_LIMIT 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 arzharch, 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: PGOPS_DSN, PGOPS_READONLY_DSN
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.1.9) llegó al registro hace 2 meses.
Las apps compatibles con MCP, como Claude Desktop, Claude Code, Cursor y VS Code. También necesitas Python (uv), Docker 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.
**Let an AI assistant operate your PostgreSQL database — without letting it wreck
anything.**
Point Claude, Cursor, or VS Code at a database and ask questions in plain English. Your assistant gets 18 tools for inspecting schemas, running queries, diagnosing slow ones, and planning migrations. What it does *not* get is a way to quietly destroy your data.
Every number below is real output from the demo database in this repo — 1.2M rows, 114 MB.
You: I want to index
orders.status
Assistant: *(calls
migration.plan)*
CREATE INDEX "idx_orders_status" ON "orders" (status)
risk=medium estimate=4000ms confidence=medium blocks: writes yes, reads no SAFER: CREATE INDEX CONCURRENTLY "idx_orders_status" ON "orders" (status)
Assistant: A plain index build blocks writes for roughly 4 seconds.
CONCURRENTLY
is slower overall but keeps writes working. Which do you want?
The tool didn't return a raw plan for the model to interpret — it returned a verdict, a duration estimate with an honest confidence level, and the safer alternative.
query.explain works the same way. Instead of handing back JSON, it says things like:
planner overestimated rows by 5833x (estimated 239,160, actual 40)
-> run ANALYZE; if it persists the columns may be correlated, consider CREATE STATISTICS
You: clear out the orders table
Assistant: *(calls
query.writewithDELETE FROM orders)*
CONFIRMATION_REQUIRED
DELETE has no WHERE clause and would affect every row in the table
Where your client supports it, the approval prompt goes to you — not to the assistant. Nothing runs until a human answers, and the refusal is written to the audit log whether or not you approve.
That last part is the point. The assistant cannot approve its own dangerous action, because it is not the one being asked. Where a client can't show a prompt, it degrades to a single-use token bound to that exact statement — never to "allowed".
Most Postgres MCP servers are thin query wrappers: introspect and SELECT. None handle migrations with lock-impact analysis, none diagnose performance from EXPLAIN and pg_stat_statements, and none understand the container the database runs in. Agents operating databases today are doing it blind, and without guardrails.
pgops-mcp is the operations brain: schema intelligence → guarded queries → migration engine → performance diagnosis → environment awareness, with a safety architecture that makes every action classifiable, confirmable, and auditable.
Native AI/ML Extension Support: Because pgops builds on core Postgres catalogs rather than brittle regex parsing, it inherits native support for custom types and extensions like pgvector. Tools like migration.plan and query.explain understand vector types (vector(384)) and hnsw indexes out of the box, with zero configuration.
New here? docs/GETTING_STARTED.md is a 15-minute guided tour that assumes no MCP knowledge.
| Group | Tools |
|---|---|
| Schema | schema.inspect |
| Queries | query.read, query.write (guarded), query.explain (parsed plan + verdict) |
| Performance | index.advise, db.health |
| Migrations | migration.plan (dry-run + lock analysis), migration.describe (plain English), migration.apply, migration.rollback, migration.history |
| Environment | env.topology, env.correlate, container.logs, container.stats |
| Gated | container.restart*, container.exec* |
\* Not registered at all unless the server runs with --approval-mode, and even then each call needs a confirmation token. container.exec additionally enforces a read-only diagnostic command allowlist — it does not offer a shell. The Docker socket is root-equivalent on the host, so the default is read-only access.
DELETE/UPDATE blocked| Primitive | What's here |
|---|---|
| Tools | 17 — schema, query, explain, advise, migrate, environment |
| Resources | pgops://schema, schema/summary, schema/{table}, health, migrations, audit/recent, config |
| Prompts | diagnose-slow-query, plan-safe-migration, incident-triage, review-index-health, explain-safety-model |
| Elicitation | Dangerous actions ask the user directly, not via the agent; confirmation tokens are the fallback |
| Sampling | migration.describe turns English into a plan using *your* model — this server ships no API key |
| Completions | Table-name autocomplete for pgops://schema/{table} |
| Progress / logging | Best-effort notifications during long operations |
stdio needs no auth — the server is a subprocess your client spawns, with no open port. HTTP does, so it refuses to start without a key:
pgops-mcp keygen # RS256 keypair
pgops-mcp issue-token --subject my-agent # read-only by default pgops-mcp issue-token --subject deploy-bot --scope pgops:read --scope pgops:write pgops-mcp scopes # which scope each tool needs
pgops-mcp --transport http --public-key ~/.pgops/keys/pgops_public.pem
The server holds only the public key, so it can verify tokens but never mint them. Scopes (pgops:read / pgops:write / pgops:admin) map to the same danger tiers as the guardrails, and a tool with no scope entry requires admin — deny by default. Binds loopback unless you say otherwise.
pgops-mcp is an MCP server, not a Python library — nothing in it is meant to be imported, and pgops.* carries no API-stability promise. You install it the way you install any MCP server: point your client at it.
Claude Desktop / Cursor / VS Code:
{
"mcpServers": { "pgops": { "command": "uvx", "args": ["pgops-mcp"], "env": { "PGOPS_DSN": "postgresql://user:pass@localhost:5432/mydb" } } } }
uvx fetches and runs it in a throwaway environment — nothing to install first, and nothing added to your own project's dependencies.
Or run the container, if you would rather not put a Python toolchain on the machine that talks to your database:
{
"mcpServers": { "pgops": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "PGOPS_DSN", "-v", "pgops-audit:/var/lib/pgops", "ghcr.io/arzharch/pgops-mcp:latest" ], "env": { "PGOPS_DSN": "postgresql://user:pass@host.docker.internal:5432/mydb" } } } }
Two things the container changes: mount a volume at /var/lib/pgops or the audit log dies with the container, and localhost inside a container is the container itself — use host.docker.internal or a compose service name.
Check the connection before wiring a client to it:
uvx pgops-mcp --selfcheck --dsn "postgresql://user:pass@localhost:5432/mydb"
Both paths install the same server and are listed together in the MCP Registry entry — they fail for different people. uvx needs nothing preinstalled but assumes the host may run Python; the container assumes only Docker.
See [SETUP.md](https://github.com/arzharch/pgops-mcp/blob/main/SETUP.md) for configuration, HTTP transport, agent tokens and troubleshooting, and CONTRIBUTING.md to run it from a source checkout.
Links are absolute so they resolve from the PyPI project page as well as from GitHub.
Using it
| Doc | What's in it |
|---|---|
| Getting started | First 15 minutes, no MCP knowledge assumed |
| Tool reference | All 18 tools: parameters, returns, error codes, scopes |
| Setup & configuration | Clients, HTTP auth, observability, troubleshooting |
| Environment variables | Every knob, documented |
| Security model | What it can do, what it refuses, known limits |
| Changelog | What changed per release |
How it works
| Doc | What's in it |
|---|---|
| Architecture | System design and trade-offs |
| System design | The safety pipeline, with diagrams |
| Decision records | Why each choice was made, and what it cost |
| Benchmarks | What is measured, and against what |
Contributing
| Doc | What's in it |
|---|---|
| Contributing | Source checkout, gates, release process |
| Module layout | What each module is for |
471 tests, and the ones that matter run against a real PostgreSQL 16 in a container — not mocks. That is a deliberate decision (ADR-005): a guardrail proven only against a fake has been proven against the wrong thing. The interesting failures — default_transaction_read_only, lock escalation, transactional DDL, relfilenode changes on rewrite — are behaviours of the real database.
| Suite | What it proves |
|---|---|
| Guardrails & classifier | Every refusal rule, against live Postgres |
| Property-based (Hypothesis) | The invariant itself, over inputs nobody thought to write |
| Red-team | 15 named attacks a hostile agent would try — each refused and audited |
| Live server | Real HTTP server, real JWTs, end to end |
| Benchmarks | Latency budgets as regression tripwires, published as CI artifacts |
The red-team suite has found real bugs, which is the argument for having it: it caught a confirmation token issued for a refused statement being redeemable against a different one, and a pgops:read token that could call query.write because the scope table was documentation rather than enforcement.
Stated here rather than left to be discovered:
CREATE INDEX.Sample of what migration.plan returns for a type change on the 1.2M-row orders:
ALTER TABLE "orders" ALTER COLUMN "total_cents" TYPE bigint
op=table_rewrite risk=high estimate=4800ms confidence=medium why: rewrites every row and rebuilds every
Solo se muestra el principio; lee el resto en el repo