Socket
Book a DemoInstallSign in
Socket

@imazhar101/mcp-postgresql-server

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imazhar101/mcp-postgresql-server

PostgreSQL MCP server for database management and query execution

1.0.3
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

PostgreSQL MCP Server

This server provides tools and services for interacting with PostgreSQL databases through the Model Context Protocol (MCP).

Installation & Usage

# Install globally
npm install -g @imazhar101/mcp-postgresql-server

# Or run directly with npx
npx @imazhar101/mcp-postgresql-server

Option 2: Build from Source

  • Install dependencies:

    npm install
    
  • Build the server:

    npm run build
    
  • Start the server:

    npm start
    

Configuration

Set the following environment variable:

export POSTGRESQL_CONNECTION_STRING="postgresql://username:password@localhost:5432/database"

Cline MCP Configuration

To use this server with Cline (VS Code extension), add the following to your Cline MCP settings:

File Location:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Windows: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Configuration:

{
  "mcpServers": {
    "postgresql-db": {
      "command": "npx",
      "args": ["@imazhar101/mcp-postgresql-server"],
      "env": {
        "POSTGRESQL_CONNECTION_STRING": "postgresql://username:password@localhost:5432/database"
      },
      "disabled": false,
      "alwaysAllow": ["list_tables", "describe_table", "execute_query"]
    }
  }
}

Features

  • Execute SQL queries
  • Manage database connections
  • Retrieve table schemas
  • Perform CRUD operations
  • Transaction support

FAQs

Package last updated on 27 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.