.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/subnetmarco/pgmcp
home/mcp-servers/subnetmarco/pgmcp
subnetmarco avatar

pgmcp

bysubnetmarco· 1 MCP server

Stars

540

Forks

61

Category

Data Science & Analytics

View on GitHub

TL;DR

PGMCP connects AI assistants to any PostgreSQL database through natural language queries. Ask questions in plain English and get structured SQL results with automatic streaming and robust error handling.

How to install pgmcp?

subnetmarco/pgmcp
$git clone https://github.com/subnetmarco/pgmcp

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install pgmcp by running `git clone https://github.com/subnetmarco/pgmcp`, then use it for the current task and follow its documentation at https://github.com/subnetmarco/pgmcp.

Files · 1

View on GitHub
README.md
1[![ci](https://github.com/subnetmarco/pgmcp/actions/workflows/ci.yml/badge.svg)](https://github.com/subnetmarco/pgmcp/actions/workflows/ci.yml)
2[![Go Report Card](https://goreportcard.com/badge/github.com/subnetmarco/pgmcp)](https://goreportcard.com/report/github.com/subnetmarco/pgmcp)
3[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4 
5# PGMCP - PostgreSQL Model Context Protocol Server
6 
7PGMCP connects AI assistants to **any PostgreSQL database** through natural language queries. Ask questions in plain English and get structured SQL results with automatic streaming and robust error handling.
8 
9**Works with**: Cursor, Claude Desktop, VS Code extensions, and any [MCP-compatible client](https://modelcontextprotocol.io/)
10 
11## Quick Start
12 
13PGMCP connects to **your existing PostgreSQL database** and makes it accessible to AI assistants through natural language queries.
14 
15### Prerequisites
16- PostgreSQL database (existing database with your schema)
17- OpenAI API key (optional, for AI-powered SQL generation)
18 
19### Basic Usage
20 
21```bash
22# Set up environment variables
23export DATABASE_URL="postgres://user:password@localhost:5432/your-existing-db"
24export OPENAI_API_KEY="your-api-key" # Optional
25 
26# Run server (using pre-compiled binary)
27./pgmcp-server
28 
29# Test with client in another terminal
30./pgmcp-client -ask "What tables do I have?" -format table
31./pgmcp-client -ask "Who is the customer that has placed the most orders?" -format table
32./pgmcp-client -search "john" -format table
33```
34 
35Here is how it works:
36 
37```
38👤 User / AI Assistant
39 │
40 │ "Who are the top customers?"
41 ▼
42┌─────────────────────────────────────────────────────────────┐
43│ Any MCP Client │
44│ │
45│ PGMCP CLI │ Cursor │ Claude Desktop │ VS Code │ ... │
46│ JSON/CSV │ Chat │ AI Assistant │ Editor │ │
47└─────────────────────────────────────────────────────────────┘
48 │
49 │ Streamable HTTP / MCP Protocol
50 ▼
51┌─────────────────────────────────────────────────────────────┐
52│ PGMCP Server │
53│ │
54│ 🔒 Security 🧠 AI Engine 🌊 Streaming │
55│ • Input Valid • Schema Cache • Auto-Pagination │
56│ • Audit Log • OpenAI API • Memory Management │
57│ • SQL Guard • Error Recovery • Connection Pool │
58└─────────────────────────────────────────────────────────────┘
59 │
60 │ Read-Only SQL Queries
61 ▼
62┌─────────────────────────────────────────────────────────────┐
63│ Your PostgreSQL Database │
64│ │
65│ Any Schema: E-commerce, Analytics, CRM, etc. │
66│ Tables • Views • Indexes • Functions │
67└─────────────────────────────────────────────────────────────┘
68 
69External AI Services:
70OpenAI API • Anthropic • Local LLMs (Ollama, etc.)
71 
72Key Benefits:
73✅ Works with ANY PostgreSQL database (no assumptions about schema)
74✅ No schema modifications required
75✅ Read-only access (100% safe)
76✅ Automatic streaming for large results
77✅ Intelligent query understanding (singular vs plural)
78✅ Robust error handling (graceful AI failure recovery)
79✅ PostgreSQL case sensitivity support (mixed-case tables)
80✅ Production-ready security and performance
81✅ Universal database compatibility
82✅ Multiple output formats (table, JSON, CSV)
83✅ Free-text search across all columns
84✅ Authentication support
85✅ Comprehensive testing suite
86```
87 
88## Features
89 
90- **Natural Language to SQL**: Ask questions in plain English
91- **Automatic Streaming**: Handles large result sets automatically
92- **Safe Read-Only Access**: Prevents any write operations
93- **Text Search**: Search across all text columns
94- **Multiple Output Format

Preview

subnetmarco/pgmcpsubnetmarco/pgmcp

[![ci](https://github.com/subnetmarco/pgmcp/actions/workflows/ci.yml/badge.svg)](https://github.com/subnetmarco/pgmcp/actions/workflows/ci.yml)

[![Go Report Card](https://goreportcard.com/badge/github.com/subnetmarco/pgmcp)](https://goreportcard.com/report/github.com/subnetmarco/pgmcp)

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

# PGMCP - PostgreSQL Model Context Protocol Server

Reposubnetmarco/pgmcp
TypeMCP Servers
CategoryData Science & Analytics
UpdatedMay 2026
LicenseNOASSERTION
First seenJul 27, 2026

Tags

MCPagentagentic-ai

Related

6 picks
Type
  1. dbt-labs avatardbt-mcpA MCP (Model Context Protocol) server for interacting with dbt resources.MCP ServersJul 2026105k595
  2. antvis avatarmcp-server-chartA Model Context Protocol server for generating charts using AntV.MCP ServersMay 202693k4.3k
  3. datalayer avatarjupyter-mcp-server🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.MCP ServersJul 202681k1.2k
  4. tableau avatartableau-mcpHelping agents see and understand data.MCP ServersJul 202646k314
  5. oxylabs avataroxylabs-mcpFetch and process content from specified URLs & sources using the Oxylabs Web Scraper API.MCP ServersJun 202639k101
  6. apconw avataraix-dbAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。MCP ServersJun 202638k2.2k