Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsMay 14, 2026·2 min de lectura

pg-mcp-server — Postgres MCP Server (Read-Only)

Connect LLMs to PostgreSQL via MCP with pg-mcp-server: run via npx, default stdio transport, and keep writes disabled unless explicitly enabled.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 94/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp
Instalación
Npx
Confianza
Confianza: Established
Entrada
npx --yes pg-mcp-server --transport stdio
Comando CLI universal
npx tokrepo install 251c0dd6-bd54-5c52-932a-42bf25b34b3e
Introducción

Connect LLMs to PostgreSQL via MCP with pg-mcp-server: run via npx, default stdio transport, and keep writes disabled unless explicitly enabled.

Best for: Developers who want controlled Postgres access for agents (read-only by default)

Works with: Any MCP client that can run stdio or streamable HTTP; requires DATABASE_URL

Setup time: 6-15 minutes

Key facts (verified)

  • GitHub: 176 stars · 15 forks · pushed 2025-11-03.
  • License: MIT · owner avatar + repo URL verified via GitHub API.
  • README-backed entrypoint: npx --yes pg-mcp-server --transport stdio.

Main

  • Keep writes off: README documents DANGEROUSLY_ALLOW_WRITE_OPS=false by default; start with read-only query + schema inspection.

  • Pick the transport your client supports: stdio is the default; HTTP mode serves a Streamable HTTP endpoint at /mcp (PORT defaults to 3000).

  • Use the provided resources (postgres://tables, postgres://table/{schema}/{table}) to keep prompts short and structured.

Source-backed notes

  • README provides an MCP client config snippet that runs npx --yes pg-mcp-server --transport stdio with DATABASE_URL set.
  • README lists env vars: DATABASE_URL, DANGEROUSLY_ALLOW_WRITE_OPS (default false), DEBUG, and PG_SSL_ROOT_CERT.
  • README documents tools/resources including query plus postgres://tables and postgres://table/{schema}/{table}.

FAQ

  • Can it connect over HTTP?: Yes. README says HTTP mode serves /mcp on PORT (default 3000).
  • Is it safe to enable writes?: Only if you understand the risk. Keep writes disabled until you have guardrails and allowlists.
  • Do I need a global install?: No. README supports running via npx --yes ... without installing globally.
🙏

Fuente y agradecimientos

Source: https://github.com/ericzakariasson/pg-mcp-server > License: MIT > GitHub stars: 176 · forks: 15

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados