Database
PostgreSQL
Official PostgreSQL MCP server for read/write SQL queries, schema exploration, and table inspection.
Install
npx -y @modelcontextprotocol/server-postgresOfficial PostgreSQL MCP server for read/write SQL queries, schema exploration, and table inspection.
npx -y @modelcontextprotocol/server-postgresThe PostgreSQL MCP server is part of the official Model Context Protocol servers monorepo. It connects LLMs to PostgreSQL databases for read/write SQL queries, schema exploration, and table inspection.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"POSTGRES_CONNECTION_STRING": "postgresql://user:password@localhost:5432/dbname"
}
}
}
}