MCP Cursor

Enhance your development workflow with AI-powered MCP tools and extensions for Cursor IDE.

Product

  • MCP Servers
  • Getting Started
  • Documentation
  • Open Source

Resources

  • MCP Specification
  • Cursor IDE
  • MCP GitHub
  • Contributing

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
Made withfor the developer community
© 2025 MCP Cursor. All rights reserved.
MCP Logo
MCP Cursor
IntroductionMCPs
IntroductionMCPs
3D MCP Cursor Visualization
  1. Home
  2. Servers
  3. PostgreSQL MCP
PostgreSQL MCP Logo - AI-Powered Development Tool for Cursor IDE

PostgreSQL MCP

Model Context Protocol Integration

Overview

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

View Repository

PostgreSQL Features

  • •Execute read-only SQL queries
  • •Automatic schema discovery
  • •Table schema information in JSON format
  • •Safe read-only transactions
  • •Database metadata inspection

PostgreSQL Setup & Configuration

Requirements

  • •PostgreSQL database
  • •Docker or Node.js
  • •Database connection URL

Installation Instructions

# Docker Installation
docker build -t mcp/postgres -f src/postgres/Dockerfile .
docker run -i --rm mcp/postgres postgresql://host:port/db-name

# NPX Installation
npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Configuration

# Docker Configuration (macOS)
{
  "mcpServers": {
    "postgres": {
      "command": "docker",
      "args": [
        "run", 
        "-i", 
        "--rm", 
        "mcp/postgres", 
        "postgresql://host.docker.internal:5432/mydb"
      ]
    }
  }
}

# NPX Configuration
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://localhost/mydb"
      ]
    }
  }
}

PostgreSQL Available Tools

  • •query

PostgreSQL Required Inputs

sql

Type
string
Description
The SQL query to execute (read-only)
Required
Yes

PostgreSQL Use Cases

  • •Database schema inspection
  • •Data analysis and reporting
  • •Read-only database operations
  • •Schema documentation generation
  • •Database exploration via natural language

Frequently Asked Questions

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
PostgreSQL database, Docker or Node.js, Database connection URLView detailed requirements
Follow the installation instructions in the setup section above.View installation guide

PostgreSQL MCP provides the following tools:

  • •query

Featured MCPs

Github MCP - Model Context Protocol for Cursor IDE

Github

This server provides integration with Github's issue tracking system through MCP, allowing LLMs to interact with Github issues.

Sequential Thinking MCP - Model Context Protocol for Cursor IDE

Sequential Thinking

An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process. Break down complex problems into manageable steps, revise and refine thoughts as understanding deepens, and branch into alternative paths of reasoning.

Puppeteer MCP - Model Context Protocol for Cursor IDE

Puppeteer

A Model Context Protocol server that provides browser automation capabilities using Puppeteer. This server enables LLMs to interact with web pages, take screenshots, execute JavaScript, and perform various browser-based operations in a real browser environment.