{"by":"spennant","descendants":79,"id":43520953,"kids":[43523157,43521610,43522259,43522312,43525406,43524072,43522927,43524982,43521027,43524696,43525685,43521840],"score":167,"text":"Hey HN,<p>I built pg-mcp, a Model Context Protocol (MCP) server for PostgreSQL that provides structured schema inspection and query execution for LLMs and agents. It&#x27;s multi-tenant and runs over HTTP&#x2F;SSE (not stdio)<p>Features\n - Supports multiple database connections from multiple agents<p>- Schema Introspection: Returns table structures, types, indexes and constraints; enriched with descriptions from pg_catalog. (for well documented databases)<p>- Read-Only Queries: Controlled execution of queries via MCP.<p>- EXPLAIN Tool: Helps smart agents optimize queries before execution.<p>- Extension Plugins: YAML-based plugin system for Postgres extensions (supports pgvector and postgis out of the box).<p>- Server Mode: Spin up the container and it&#x27;s ready to accept connections at <a href=\"http:&#x2F;&#x2F;localhost:8000&#x2F;sse\" rel=\"nofollow\">http:&#x2F;&#x2F;localhost:8000&#x2F;sse</a>","time":1743304476,"title":"Show HN: Cloud-Ready Postgres MCP Server","type":"story","url":"https://github.com/stuzero/pg-mcp"}