Pgmcp

Databases

An MCP server to query any Postgres database in natural language.

Your AI app calls the Pgmcp MCP server, which does the databases work and sends the result back to the chat.

About Pgmcp

Pgmcp is a community MCP server from subnetmarco, filed in our directory under databases. An MCP server to query any Postgres database in natural language.

The README for Pgmcp lists tools such as ask, search and stream, which your AI app can call once the server is connected.

At a glance

Publisher
subnetmarco (community)
Runs
See the README for setup
Written in
Go
GitHub stars
544

Tools Pgmcp gives your AI app

  • ask
  • search
  • stream

Tool names as the Pgmcp README lists them. Your AI app shows the live list once Pgmcp is connected.

How to set up Pgmcp

  1. Follow the install steps in the Pgmcp README; it is written in Go, so have that toolchain ready.
  2. Check the Pgmcp README for keys or settings; the registry lists none that Pgmcp requires.
  3. Add Pgmcp to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Pgmcp tools to confirm the connection.
  5. Run one read-only task with Pgmcp first, such as a call to ask, before you allow anything that writes or sends.

Pgmcp compared with similar servers

  • FreePeak DB by FreePeak has fewer GitHub stars than Pgmcp (488 against 544); both are community servers, and both run locally.
  • PerformanceMonitor by erikdarlingdata has more GitHub stars than Pgmcp (545 against 544); both are community servers, and both run locally.
  • Atlas by cyanheads has fewer GitHub stars than Pgmcp (481 against 544); both are community servers, and both run locally.

Before you connect Pgmcp

  • Give Pgmcp its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Pgmcp tool call until you trust what it does with them.
  • Treat text that Pgmcp fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Pgmcp on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Pgmcp

How marketing and sales teams put Pgmcp to work, by company size. Pick the size closest to yours and start Pgmcp on one use case.

Small business

  • A small business with its own app can ask Pgmcp plain questions about customers and orders, without writing SQL.
  • Owners can use Pgmcp to pull a list of customers who haven't bought in 90 days and plan a win-back email.
  • Pgmcp runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing analysts can connect Pgmcp to answer campaign questions from the warehouse directly, instead of waiting on the data team's queue.
  • Lifecycle teams can use Pgmcp to build audience lists from product data and check counts before a send.
  • Start with ask and search, the tools Pgmcp lists first, and add more once the team trusts the results.

Enterprise

  • Enterprises should point Pgmcp at a read replica with a read-only role, so agents query freely without risk to production data.
  • Data teams can expose curated views through Pgmcp, so marketing gets self-serve answers without access to raw customer tables.
  • Pgmcp is a community server, so have security review the code and pin a version before Pgmcp touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Pgmcp README

Pgmcp's repository lists no open license, so we don't copy its README. Read it on GitHub at subnetmarco/pgmcp.

Questions about Pgmcp

What is the Pgmcp MCP server?

An MCP server to query any Postgres database in natural language. Pgmcp is maintained by subnetmarco on GitHub at subnetmarco/pgmcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Pgmcp MCP server?

Pgmcp doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (subnetmarco/pgmcp). Like most servers, Pgmcp ends with a command or URL you paste into your AI app's MCP config.

Does Pgmcp need an API key?

The registry lists no required keys for Pgmcp. Check the Pgmcp README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Pgmcp an official MCP server?

No. Pgmcp is a community server maintained by subnetmarco. Community servers can be excellent; read the code and the open issues before you give Pgmcp access to company data.