Postgres Explorer
FreeNot checkedEnables safe read-only exploration and querying of a PostgreSQL database, listing tables and executing SELECT statements.
About
Enables safe read-only exploration and querying of a PostgreSQL database, listing tables and executing SELECT statements.
README
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)
🔐 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.
Installing Postgres Explorer
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/mathewsls/mcp-postgresqlFAQ
Is Postgres Explorer MCP free?
Yes, Postgres Explorer MCP is free — one-click install via Unyly at no cost.
Does Postgres Explorer need an API key?
No, Postgres Explorer runs without API keys or environment variables.
Is Postgres Explorer hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Postgres Explorer in Claude Desktop, Claude Code or Cursor?
Open Postgres Explorer on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgres
Query your database in natural language
by AnthropicPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolCompare Postgres Explorer with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
