SkillTide Submit
Official description10 sourcesMCP servers8d ago
subnetmarco/pgmcp

subnetmarco/pgmcp

๐ŸŽ๏ธ ๐Ÿ  - Natural-language queries for any PostgreSQL database, with automatic streaming and read-only safety
View on GitHub โ†—Direct link ยท no redirect page
Config template (adjust for your client)
claude mcp add pgmcp -- npx -y pgmcp
A pasteable skeleton generated from the repository name. Check the project README for the exact package and arguments.
Star count
542 โ˜… ยท subnetmarco/pgmcp ยท read from the GitHub search API ยท (checked 2026-10-16 20:00:20)
Source
collected from the punkpeye/awesome-mcp-servers list ยท type: MCP server
Harvest history
first seen 2026-10-09 ยท last seen 2026-10-16 ยท seen 32ร— ยท listed by 10 sources
Score
score 1,003 ยท 542 โ˜… ยท 10 sources ยท mcp
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: MCP ๆœๅŠก. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository subnetmarco/pgmcp๏ผ›first catalogued 2026-10-09๏ผ›last seen 2026-10-16ใ€‚There is no official certification or quality rating here โ€” we record sources and dates only.
Third-party quality signals

PGMCP - PostgreSQL Model Context Protocol Server

ไปฅไธ‹ๆ‘˜ๅฝ•่‡ช่ฏฅไป“ๅบ“็š„ README๏ผˆ็‰‡ๆฎต๏ผ‰ ยท ๅœจ GitHub ่ฏปๅฎŒๆ•ด README โ†’

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.
**Works with**: Cursor, Claude Desktop, VS Code extensions, and any MCP-compatible client
Quick Start
PGMCP connects to **your existing PostgreSQL database** and makes it accessible to AI assistants through natural language queries.
Prerequisites
- PostgreSQL database (existing database with your schema)
- OpenAI API key (optional, for AI-powered SQL generation)
Basic Usage
Here is how it works:
Features
- **Natural Language to SQL**: Ask questions in plain English
- **Automatic Streaming**: Handles large result sets automatically
- **Safe Read-Only Access**: Prevents any write operations
- **Text Search**: Search across all text columns
- **Multiple Output Formats**: Table, JSON, and CSV
- **PostgreSQL Case Sensitivity**: Handles mixed-case table names correctly
- **Universal Compatibility**: Works with any PostgreSQL database
Environment Variables
**Required:**
- DATABASE_URL: PostgreSQL connection string to your existing database
**Optional:**
- OPENAI_API_KEY: OpenAI API key for AI-powered SQL generation
- OPENAI_MODEL: Model to use (default: "gpt-4o-mini")
- HTTP_ADDR: Server address (default: ":8080")
- HTTP_PATH: MCP endpoint path (default: "/mcp")
- AUTH_BEARER: Bearer token for authentication
Installation
Download Pre-compiled Binaries
1. Go to GitHub Releases
2. Download the binary for your platform (Linux, macOS, Windows)
3. Extract and run:
Alternative Options
Add -ldflags="-s -w -extldflags=-static" -trimpath if you want to get stripped executables (no debug info):
Docker/Kubernetes
Quick Start
Environment Variables
**Required:**
- DATABASE_URL: PostgreSQL connection string
**Optional:**
- OPENAI_API_KEY: OpenAI API key for SQL generation
- OPENAI_MODEL: Model to use (default: "gpt-4o-mini")
- HTTP_ADDR: Server address (default: ":8080")
- HTTP_PATH: MCP endpoint path (default: "/mcp")
- AUTH_BEARER: Bearer token for authentication
Usage Examples
Example Database
The project includes two schemas:
- **schema.sql**: Full Amazon-like marketplace with 5,000+ records
- **schema_minimal.sql**: Minimal test schema with mixed-case "Categories" table
**Key features:**
- **Mixed-case table names** ("Categories") for testing case sensitivity
- **Composite primary keys** (order_items) for testing AI assumptions
- **Realistic relationships** and data types
Use your own database:
AI Error Handling
When AI generates incorrect SQL, PGMCP handles it gracefully:
Instead of crashing, the system provides helpful feedback and continues operating.
MCP Integration
Cursor Integration
Add to Cursor settings:
Claude Desktop Integration
Source
awesome ยท https://github.com/subnetmarco/pgmcp
Browse by field
MCP servers
Traction
542 โ˜…
added
yesterday

More in MCP servers

All 5,525 in MCP servers โ†’

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields โ†’

โ† Back to index