PostgreSQL
stdioRead-only database access with schema inspection and query execution for PostgreSQL databases
Author
Anthropic
Runtime
node
Package
@modelcontextprotocol/server-postgres
Command
npx -y @modelcontextprotocol/server-postgres
Categories
databasesql
Required Environment Variables
POSTGRES_CONNECTION_STRING
Install with the CLI:
npx @getmcp/cli add postgresConfiguration
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json
JSON
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres"
],
"env": {
"POSTGRES_CONNECTION_STRING": ""
}
}
}
}