Skip to content
MCP-BridgeMCP-Bridge
DatabasesDatabase CredentialsOfficial MCPScore: 70Verified by owner

PostgreSQL (MCP) MCP Server

Query and manage PostgreSQL databases directly from your AI agent. Read schemas, run queries, and manage data.

Quick Answer

  1. 1. The PostgreSQL (MCP) MCP server lets Claude, Cursor, and VS Code interact with the PostgreSQL (MCP) API through natural language.
  2. 2. Setup: Add the config to claude_desktop_config.json, set your Database Credentials variables, and restart.
  3. 3. 2 operations available including Execute SQL query, Get database schema.
  4. 4. Quality score: 70/99fair source quality and documentation coverage.

Overview

Category: Databases

Auth: Database Credentials

Endpoints: 2

Transport: STDIO

Command: npx -y @modelcontextprotocol/server-postgres

Spec: v16

Setup time: ~2 min (auth required)

Environment Variables

DATABASE_URL

Example: postgresql://user:pass@host:5432/db

One-Click Install

Copy the snippet for your MCP client and paste it in — zero editing required.

Claude Desktop

Add to claude_desktop_config.json

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

Cursor

Settings → MCP Servers → Add

{
  "mcpServers": {
    "postgres": {
      "url": "https://mcpbridge.org/config/postgres.json"
    }
  }
}

Saves as .cursor/mcp.json in the download. Move it to your project root.

Deep link install →

VS Code

Use with MCP extension

{
  "mcpServers": {
    "postgres": {
      "url": "https://mcpbridge.org/config/postgres.json"
    }
  }
}

MCP Server Configuration

Add this to your claude_desktop_config.json or Cursor MCP settings.

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

What You Can Build

With the PostgreSQL (MCP) MCP server, your AI assistant can:

  • Access 2 API operations through natural language
  • Read, create, and modify databases resources without writing HTTP requests
  • Chain multiple operations in a single conversation for complex workflows
  • Combine with other MCP servers for cross-tool automation

Endpoints

POST/query

Execute SQL query

GET/schema

Get database schema

Authentication

This API requires Database Credentials authentication.

Set the required environment variables in your MCP client before using this server. Refer to the PostgreSQL (MCP) API documentation to obtain credentials.

Required environment variables:

  • DATABASE_URL

Spec Version

Version: 16

Spec version published with the OpenAPI document. Config auto-updates when the spec changes.

Page last updated: June 13, 2026

Quality Score

70/99Fair
  • +Official source (+30)
  • +Has documentation (+12)
  • +GitHub repo (+12)
  • +Auth type defined (+8)
  • +2 endpoints (+8)

Read the Guide

Step-by-step walkthrough for setting up and using the PostgreSQL (MCP) MCP server.

PostgreSQL (MCP)MCP Setup Guide →

This listing is verified by the API owner.