Mcpg MCP Server

A production-grade PostgreSQL Model Context Protocol (MCP) server.

Remote serverstreamable-http

What is the Mcpg MCP Server?

A production-grade PostgreSQL Model Context Protocol (MCP) server.

What you get

Pull the pre-built image from the GitHub Container Registry (published on every tagged release — :latest tracks the newest, or pin a version like :0.6.5):

  • Safe by default. — Read-only access mode. Every user-supplied SQL
  • One server, broad surface. — Application data access (queries, search,
  • PostgreSQL-native everything. — No ORM, no abstraction tax — uses
  • Production-shaped, not demo-shaped. — Connection pooling, per-request
  • Observability built in. — Prometheus /metrics endpoint on the
  • Test-driven, multi-version. — 2,500+ unit tests plus an integration

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Mcpg MCP Server

{
  "mcpServers": {
    "mcpg": {
      "command": "uvx",
      "args": [
        "mcpg"
      ],
      "env": {
        "MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
MCPG_DATABASE_URLDeclared in the maintainer’s client configuration.Yes

Example prompts to try

  • “Use Mcpg to Variable.”
  • “Use Mcpg to MCPG ALLOW DDL.”
  • “Use Mcpg to MCPG ALLOW SHELL.”

Frequently asked questions

A production-grade PostgreSQL Model Context Protocol (MCP) server. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.