# PostgreSQL

> Use this tool when you need to execute database queries, perform data analysis, or manage PostgreSQL databases through conversational interactions. It solves problems related to database administration, data retrieval, and manipulation by providing a single interface for SELECT, INSERT, UPDATE, and DELETE operations with automatic transaction management. It accepts SQL queries as input and returns fetched rows with metadata or execution results, making it suitable for AI-assisted database tasks and educational purposes.

Canonical page: https://skillsregistry.net/skills/logesh-001-postgres  
JSON: https://api.skillsregistry.net/v1/skills/logesh-001-postgres

## Description

This PostgreSQL MCP server implementation by Logesh provides AI assistants with direct database query execution capabilities for PostgreSQL databases. Built with Python using psycopg2, loguru, and FastMCP, it offers a single query_data tool that handles both SELECT queries (returning fetched rows with metadata) and write operations (INSERT, UPDATE, DELETE) with automatic transaction management. The implementation supports both stdio and HTTP transport modes, includes comprehensive error handling and logging, and is preconfigured to connect to a 'litellm' database with standard PostgreSQL credentials, making it suitable for AI-assisted database administration, data analysis workflows, and educational purposes where conversational database interaction is needed.

## Trust

- **Trust score (0–1):** 0.97
- **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/logesh-001-postgres)
- **Repository:** <https://github.com/logesh-001/postgresmcp>

## 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": "logesh-001-postgres"
    }
  }
}
```

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