# PostgreSQL

> Use this tool when you need to interact with PostgreSQL databases through a secure and resource-oriented architecture, enabling AI agents to discover, connect, and query databases without exposing sensitive connection details. It solves problems related to database access and analysis, providing inputs such as SQL queries and database credentials, and outputs including query results and database schema information. Ideal for use cases where developers and data analysts require AI-assisted database interactions with robust security and connection management.

Canonical page: https://skillsregistry.net/skills/stuzero-pg  
JSON: https://api.skillsregistry.net/v1/skills/stuzero-pg

## Description

PG-MCP is a PostgreSQL Model Context Protocol server that enables AI agents to discover, connect to, query, and understand PostgreSQL databases through a resource-oriented architecture. It extends the reference Postgres MCP implementation with multi-database support, rich catalog information extraction, extension context for PostGIS and pgVector, query execution plan analysis, and robust connection management. The server exposes database schema resources, data access capabilities, and specialized tools for executing read-only SQL queries, all while maintaining security through connection ID abstraction and read-only transaction enforcement. Built with Python 3.13 and asyncpg, it's particularly valuable for developers and data analysts who need AI assistants to interact with PostgreSQL databases without exposing sensitive connection details.

## Trust

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

## Facts

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

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/stuzero-pg)
- **Repository:** <https://github.com/stuzero/pg-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": "stuzero-pg"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/stuzero-pg` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/stuzero-pg/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
