OpenViSTAI · Agents · Blockchain · Crypto
Menu
MCP & Tooling

Mcpg

Mcpg is a Python-based Model Context Protocol server that connects compatible AI clients to PostgreSQL databases and exposes tools for inspection, querying, search, query analysis, data movement and database operations.

Independent OpenViST project profile, based on linked sources.

Mcpg — OpenViST project profile in MCP & Tooling.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Mcpg when an MCP-compatible client needs structured access to PostgreSQL tools, from read-oriented data questions to explicitly enabled database operations.

Who it is for

  • Developers configuring an MCP client to work with PostgreSQL.
  • Database teams exploring agent-assisted schema inspection, query analysis or operational workflows.

Documented uses

  • Inspect database catalogs and summarize tables.
  • Ask an agent to translate a natural-language question into SQL.
  • Investigate query performance and review index recommendations.
  • Expose search, graph-query, data-movement and database-operation tools to an MCP client.
Before you choose

Requirements & limits

The README documents PyPI and Docker installation and a hosted read-only demo using throwaway data. A PostgreSQL connection URL is required for a database connection; natural-language-to-SQL requires a key for a supported model provider. The project is MIT-licensed open source.

  • Mcpg is a server/tooling layer; an MCP-compatible client supplies the agent interface and invokes its tools.
  • The default access mode is read-only; write and DBA capabilities depend on configured access modes and opt-in gates.
  • The documented transports are stdio, streamable HTTP and SSE.
  • The toolset extends beyond ordinary queries to include introspection, query intelligence, hybrid search, graph queries, data movement and live operations.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install MCPg and verify the CLI

Install MCPg from PyPI and check that its CLI is available.

Before you start

  • Python environment with access to PyPI.

Steps

  1. Install MCPg with the command below.

    Documented command
    pip install mcpg
  2. Run mcpg --version to verify the installation.

Expected outcome

The installed MCPg CLI reports its version.

Guide limitations

  • This covers installation and version verification only; it does not configure a PostgreSQL connection or connect an MCP client.
Source-based practical guide

Connect Claude Desktop to PostgreSQL with MCPg

Configure Claude Desktop to start MCPg over stdio with a PostgreSQL connection URL.

Before you start

  • Claude Desktop.
  • A PostgreSQL connection URL.

Steps

  1. Add an mcpg server entry to claude_desktop_config.json, using uvx as the command and mcpg as its argument.

  2. Set the entry's MCPG_DATABASE_URL environment variable to the PostgreSQL connection URL.

  3. Restart or otherwise start the configured MCP server through Claude Desktop.

Expected outcome

Claude Desktop is configured to launch MCPg over stdio and connect it to the specified PostgreSQL database.

Guide limitations

  • The source identifies the configuration file locations for macOS and Windows but does not provide a complete JSON configuration in the captured text.
  • The connection URL is required; remote PostgreSQL hosts require sslmode=require or stronger.
  • MCPg defaults to read-only access; write and DBA capabilities require additional configuration.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 October 2026
Original website title
devopam/MCPg · Official homepage title · retained in its source language