Skip to content
MCP-Bridge
Databases

PostgreSQL (MCP) Claude Desktop Config

Add the PostgreSQL (MCP) MCP server to Claude Desktop with this ready-to-use configuration.

Setup Instructions

  1. Open Claude Desktop
  2. Go to Settings → Developer → Edit Config → claude_desktop_config.json
  3. Paste the JSON below into the file
  4. Set your Database Credentials in the env section
  5. Restart Claude Desktop

Configuration JSON

Copy the entire block into your claude_desktop_config.json

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres"
      ],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@host:5432/db"
      }
    }
  }
}

Environment Variables

DATABASE_URL

Replace postgresql://user:pass@host:5432/db with your actual database url

Endpoints

POST/query

Execute SQL query

GET/schema

Get database schema