# Simple PostgreSQL

> Use this tool when you need to execute SQL queries against PostgreSQL databases, either for data analysis, retrieval, or administrative tasks, with optional safety modes to restrict operations to read-only queries. It provides a single execute_query tool that supports both read and write operations, with inputs including SQL queries and database connection strings, and outputs including query results. This tool is ideal for AI assistants requiring direct database interaction, with configurable safety modes for production environments.

Canonical page: https://skillsregistry.net/skills/perrypixel-simple-postgresql  
JSON: https://api.skillsregistry.net/v1/skills/perrypixel-simple-postgresql

## Description

This PostgreSQL MCP server provides direct SQL query execution against PostgreSQL databases through a single execute_query tool that supports both read-only and write operations with configurable safety modes. The implementation uses a singleton connection pattern with connection pooling via the pg library, includes built-in query validation to enforce read-only restrictions when enabled, and supports command-line configuration for database connection strings and operational modes. It's particularly useful for AI assistants that need to perform database analysis, data retrieval, or administrative tasks against PostgreSQL instances, with the flexibility to restrict operations to SELECT-only queries for safety in production environments.

## Trust

- **Trust score (0–1):** 1.00
- **Verification tier:** verified
- **Last scanned:** 2026-09-19

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** database
- **Updated:** 2026-09-19

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/perrypixel-simple-postgresql)
- **Repository:** <https://github.com/perrypixel/easy-postgres-mcp>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "perrypixel-simple-postgresql"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/perrypixel-simple-postgresql` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/perrypixel-simple-postgresql/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
