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.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables secure read-only access to PostgreSQL databases through SELECT queries only, with tools for exploring schemas, listing tables, and executing common queries while preventing any data modification operations.
    Last updated
    853
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    Enables secure read-only access to PostgreSQL databases, allowing users to list tables, query schemas, execute SELECT statements, and inspect table structures through natural language interactions.
    Last updated
    576
    4
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Provides secure, read-only access to PostgreSQL databases for schema inspection and data querying. It enables users to list tables, describe structures, and execute SELECT statements while strictly blocking destructive operations.
    Last updated
    26
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • Comprehensive PostgreSQL documentation and best practices, including ecosystem tools

  • Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…

View all MCP Connectors

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