postgres

Query and inspect a local PostgreSQL database through an MCP server.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/pi-2r/copilot-cli-docker --skill postgres-pi-2r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres
Source: https://github.com/pi-2r/copilot-cli-docker/tree/main/.copilot/skills/postgres
Command: npx skills add https://github.com/pi-2r/copilot-cli-docker --skill postgres-pi-2r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Access to a local PostgreSQL database through an MCP server, avoiding direct psql installs while enabling queries, schema inspection, and analytics.

Core Features & Use Cases

  • Query database tables and views
  • Inspect database schema and structure
  • List databases and tables
  • Execute SELECT queries for data analysis
  • Database overview and statistics

Quick Start

Use the #postgres tag to connect to the MCP-backed local PostgreSQL instance and start issuing queries.

Frequently Asked Questions about postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query a local PostgreSQL database without installing psql directly?

To query a local PostgreSQL database via MCP, you need the toolbox utility, proper MCP server configuration, and environment variables defined in your .copilot/.env file. Once configured, you can run read-only queries and schema inspections securely.

Can I inspect my PostgreSQL schema and list databases through an MCP server?

Yes, inspecting your PostgreSQL schema and listing databases is supported. The MCP server connection allows you to retrieve database overviews, inspect structural schemas, and list available tables for local data analysis.

What do I need to configure before running PostgreSQL queries via MCP?

Configuring PostgreSQL queries via MCP requires the toolbox utility, a configured MCP server, and environment variables set in .copilot/.env. These components establish the secure connection needed for read-only data analysis and schema inspection.

Are write operations supported when querying PostgreSQL through an MCP server?

No, write operations are not supported. The MCP server connection restricts access to secure, read-only SELECT queries, schema inspection, and data analysis, ensuring your local PostgreSQL database remains protected from unauthorized modifications.

How do I start analyzing local PostgreSQL data using the #postgres tag?

Start analyzing local PostgreSQL data by using the #postgres tag to connect to the MCP-backed instance. This triggers the server connection, enabling you to issue read-only SELECT queries, inspect database schemas, and retrieve statistical overviews.