技能潮 SkillTide 提交收录
官方说明10 个来源MCP 服务8 天前
subnetmarco/pgmcp

subnetmarco/pgmcp

🏎️ 🏠 - Natural-language queries for any PostgreSQL database, with automatic streaming and read-only safety
在 GitHub 查看 ↗直链 · 无中转页
配置模板(请按你的客户端调整)
claude mcp add pgmcp -- npx -y pgmcp
这是根据仓库名生成的可粘贴骨架,命令行参数与包名请以该项目 README 为准。
★ 数取值
542 ★ · subnetmarco/pgmcp · 取自 GitHub 搜索 API · (2026-10-16 20:00:20 核对)
来源明细
收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-09 · 最近见到 2026-10-16 · 共见到 32 次 · 被 10 个来源列出
评分构成
综合分 1,003 · 542 ★ · 10 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 subnetmarco/pgmcp;我们收录于 2026-10-09;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

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
来源
awesome · https://github.com/subnetmarco/pgmcp
按领域浏览
MCP 服务
Traction
542 ★
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引