Query PostgreSQL databases with schema inspection and read-only safety
The PostgreSQL MCP Server gives your AI assistant the ability to query PostgreSQL databases with schema inspection and read-only safety. It connects to any PostgreSQL database, inspects table schemas, and executes SQL queries.
Part of the official MCP reference servers, this server provides a safe interface for database exploration. By default it operates in read-only mode, making it safe for production database inspection without risk of accidental modifications.
Perfect for developers and data analysts who want to explore database schemas, run analytical queries, and investigate data issues through natural language.
Add this to your MCP configuration file:
{
"mcpServers": {
"postgresql": {
"env": {},
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:password@localhost:5432/dbname"
],
"command": "npx"
}
}
}Be the first to review this server!