Skip to main content
Glama
mathewsls

postgres-explorer

by mathewsls

🐘 Postgres-Explorer MCP Server

Servidor MCP que permite a Claude Code explorar y consultar una base de datos PostgreSQL de forma segura (solo lectura).

✅ Requisitos

  • 🐍 Python >= 3.12

  • 🗄️ PostgreSQL accesible

  • 🐳 Docker (opcional)

Related MCP server: MCP PostgreSQL Server

🔐 Variables de entorno

DB_HOST=localhost
DB_NAME=name_example
DB_USER=user_example
DB_PASSWORD=password_example
DB_PORT=5432

⚙️ Configuración para Claude Code

Agrega esto a tu .mcp.json en la raíz del proyecto:

🐳 Opción 1 — Docker (recomendado)

Primero construye la imagen desde la raíz del proyecto:

docker build -t mi-mcp-postgres .

Luego agrega esto a tu .mcp.json:

{
  "mcpServers": {
    "postgres-explorer": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--network",
        "host",
        "--env-file",
        "/ruta/absoluta/hacia/tu/proyecto/.env",
        "mi-mcp-postgres"
      ]
    }
  }
}

⚡ Opción 2 — Python directo

{
  "mcpServers": {
    "postgres-explorer": {
      "command": "uv",
      "args": ["run", "python", "main.py"]
    }
  }
}

🛠️ Herramientas disponibles

Herramienta

Descripción

get_schema

📋 Lista todas las tablas y sus columnas del esquema public

execute_query

🔍 Ejecuta una consulta SELECT y devuelve resultados

🔒 Seguridad: solo permite SELECT. Conexiones en modo read-only.

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mathewsls/mcp-postgresql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server