postgres-mcp-server
Allows executing read-only SELECT queries against a PostgreSQL database.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@postgres-mcp-servershow me the first 10 rows of the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
postgres-mcp-server
Servidor MCP (Model Context Protocol) para consultar bases PostgreSQL en modo solo
lectura. Expone una tool que ejecuta consultas SELECT y las devuelve al agente.
Origen y por qué existe este repo. Es una copia del componente original
@modelcontextprotocol/server-postgresde Anthropic, publicado bajo licencia MIT. Ese paquete fue deprecado por sus autores ("no longer supported"). Como lo usamos en la POC, lo conservamos acá para no depender de que siga publicado en npm y tener el código bajo nuestro control. Se mantiene la licencia y la atribución originales (ver LICENSE).
Requisitos
Node.js >= 18
Una base PostgreSQL accesible
Related MCP server: mcp-postgres
Instalación
git clone https://github.com/negrip/postgres-mcp-server.git
cd postgres-mcp-server
npm installnpm install baja las dependencias (pg y @modelcontextprotocol/sdk), que no
están deprecadas y siguen mantenidas.
Uso
Se ejecuta con node, pasando el connection string de PostgreSQL como argumento:
node dist/index.js "postgresql://usuario:password@host:5432/basededatos"Integración con el proxy GEAI (GLOB.AI OS)
En el archivo de configuración de MCP servers del proxy:
{
"mcpServers": {
"PostgresReportes": {
"command": "node",
"args": [
"C:/ruta/a/postgres-mcp-server/dist/index.js",
"postgresql://usuario:password@localhost:5432/basededatos"
]
}
}
}La tool queda registrada como PostgresReportes__query (nombre del server + __query).
Nota de mantenimiento
Este componente ya no recibe actualizaciones de su autor original. Funciona para uso de solo lectura acotado. Si a futuro se necesita un conector PostgreSQL MCP con mantenimiento activo, evaluar alternativas mantenidas por la comunidad o vendors.
Licencia
MIT — ver LICENSE. Se conserva la licencia y el copyright del proyecto original de Anthropic, PBC.
This server cannot be deployed
Maintenance
Related MCP Connectors
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA read-only PostgreSQL MCP server that enables AI agents to perform schema introspection and execute SELECT-only queries. It supports secure database connections through SSL and SSH tunnels while offering a structure-only mode to restrict query access.10 npmMIT
- AlicenseNot gradedqualityDmaintenanceRead-only PostgreSQL MCP server that enables running SELECT queries, listing tables and schemas, and describing columns, with built-in protection against writes and malicious SQL attacks.442 npmMIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for SQL databases (SQLite/PostgreSQL) that enables listing tables, describing schemas, and executing SELECT queries with safety guardrails.MIT
- AlicenseNot gradedqualityCmaintenanceA read-only natural-language database agent that exposes PostgreSQL schema-discovery and SELECT tools via MCP, enabling users to query databases in plain English.MIT