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.
Official reference server with read-only default mode. Uses connection strings for authentication. Well-maintained.
4 files analyzed · 3 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"postgresql": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:password@localhost:5432/dbname"
],
"env": {}
}
}
}Be the first to review this server!
Added support for streaming responses and improved error handling for rate-limited requests.
Major release: new tool registration API, breaking changes to configuration format. See migration guide.
Added OAuth 2.0 support and improved connection pooling.
Initial stable release.