PostgreSQL MCP Server
Proporciona acceso de solo lectura a bases de datos PostgreSQL mediante Model Context Protocol. Permite a los agentes de IA inspeccionar esquemas, ejecutar consultas SELECT y explorar estructuras de tablas. Utiliza aislamiento de transacciones de solo lectura para evitar modificaciones accidentales. Formaba parte de los servidores de referencia y ahora está archivado y disponible en servers-archived.
Esta descripción se ha traducido automáticamente y todavía no ha sido revisada.
Conectar
Añade esta configuración a .claude/mcp.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
],
"env": {
"POSTGRES_CONNECTION_STRING": "<YOUR_POSTGRES_CONNECTION_STRING>"
}
}
}
}Herramientas (3)
query
Execute a read-only SQL query against the connected PostgreSQL database and return results.
{
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "SQL query to execute (SELECT statements only)"
}
}
}list_tables
List all tables in the connected PostgreSQL database with their schemas.
{
"type": "object",
"properties": {
"schema": {
"type": "string",
"description": "Schema name to filter tables (defaults to public)"
}
}
}describe_table
Get the column definitions, types, and constraints for a specific table.
{
"type": "object",
"required": [
"table_name"
],
"properties": {
"schema": {
"type": "string",
"description": "Schema name (defaults to public)"
},
"table_name": {
"type": "string",
"description": "Name of the table to describe"
}
}
}Recursos (1)
postgres://{host}/{database}/schemaAccess to the database schema information including tables, columns, and relationships.
Prompts
Este servidor no expone ningún prompt.
Información del servidor
- Licencia
- MIT
- Versión
- 0.6.2
- Estrellas
- 265
- Última actualización
- 27 de enero de 2026