Query Postgres databases through read-only MCP workflows with PGMCP
Connect an MCP-compatible assistant to an existing PostgreSQL database for safe natural-language querying, schema-aware SQL, and streamed results.
npx skills add agentskillexchange/skills --skill query-postgres-databases-through-read-only-mcp-workflows-with-pgmcp
Use PGMCP when an agent needs to answer questions against an existing PostgreSQL database without giving it an unrestricted database client. The server exposes read-only natural-language query, search, schema, streaming, and output-format workflows that work from Cursor, Claude Desktop, VS Code extensions, or another MCP client. The scope is safe PostgreSQL question answering and inspection over a configured database, not general database administration, migration management, or a generic SQL library listing.
What this skill actually does
Inputs and prerequisites: PostgreSQL, DATABASE_URL, optional OpenAI API key, MCP-compatible client.
Setup notes: Download a release binary or build with go build -o pgmcp-server ./server, set DATABASE_URL for the target PostgreSQL database, optionally set OPENAI_API_KEY, then run ./pgmcp-server and connect it from an MCP-compatible client.
Source and verification boundary: use https://github.com/subnetmarco/pgmcp as the canonical reference before running the workflow; keep commands, API calls, CLI usage, and generated outputs reviewable against that upstream source.
Framework fit: publish this as a MCP workflow only when the operator can invoke the documented toolchain directly, rather than treating the upstream project as a generic product listing.