Skip to content

subnetmarco/pgmcp

MCP Data & Storage

A PostgreSQL Model Context Protocol (MCP) server that lets AI assistants query any existing PostgreSQL database using natural language, returning structured results with streaming and safety features.

Go Latest v0.3.0 · 8mo ago Security brief →

Features

  • Natural Language to SQL translation
  • Automatic streaming for large result sets
  • Read‑only access ensuring safe queries
  • Full‑text search across all columns
  • Multiple output formats (table, JSON, CSV)
  • Cross‑platform support via binaries, Docker, or Homebrew

Recent releases

View all 1 releases →
v0.3.0 New feature
Notable features
  • Pre-compiled binaries for Linux x86_64, ARM64, macOS Intel, Apple Silicon, Windows x86_64, ARM64
  • Installation via Homebrew, apt, rpm
  • Docker container support
Full changelog

PGMCP v0.3.0

PostgreSQL Model Context Protocol Server - Pre-compiled binaries for multiple platforms.

Quick Start

  1. Download the appropriate binary for your platform below
  2. Extract the archive
  3. Set up your environment variables:
    export DATABASE_URL="postgres://user:password@localhost:5432/mydb"
    export OPENAI_API_KEY="your-api-key"  # Optional
    
  4. Run the server: ./pgmcp-server
  5. Test with the client: ./pgmcp-client -ask "What tables do I have?" -format table

Platform Support

  • Linux: x86_64 and ARM64
  • macOS: Intel and Apple Silicon (M1/M2/M3)
  • Windows: x86_64 and ARM64

Changelog

Installation via Package Managers

# Homebrew (macOS/Linux)
brew tap subnetmarco/homebrew-tap
brew install pgmcp

# Linux packages
sudo apt install ./pgmcp_0.3.0_linux_amd64.deb  # Debian/Ubuntu
sudo rpm -i pgmcp_0.3.0_linux_amd64.rpm         # RedHat/CentOS

Docker

# Server
docker run -e DATABASE_URL=your_db_url -e OPENAI_API_KEY=your_key ghcr.io/subnetmarco/pgmcp:v0.3.0

Full Changelog: https://github.com/subnetmarco/pgmcp/compare/0.2...v0.3.0

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

About

Stars
530
Forks
61
Languages
Go Shell Dockerfile

Install & Platforms

Install via
binary brew docker go
Platforms
linux macos windows

Beta — feedback welcome: [email protected]