Basic information
About MCPg : Production Grade Postgresql Mcp Server
A safe-by-default PostgreSQL Model Context Protocol server for AI agents.
MCPg : Production Grade Postgresql Mcp Server is a MCP server in the Data & Analytics category listed in the AddMCP.net directory, published by devopam. Supported transport: stdio. License: MIT License. Source code is hosted on github.com. Related topics: mcp, postgresql, server.
Setup
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
],
"env": {
"MCPG_DATABASE_URL": "postgresql://neondb_owner:npg_HDY3yUCx5mhw@ep-falling-cherry-atplmubj-pooler.c-9.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
}
}
}
}
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
],
"env": {
"MCPG_DATABASE_URL": "postgresql://neondb_owner:npg_HDY3yUCx5mhw@ep-falling-cherry-atplmubj-pooler.c-9.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
}
}
}
}
{
"servers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
],
"env": {
"MCPG_DATABASE_URL": "postgresql://neondb_owner:npg_HDY3yUCx5mhw@ep-falling-cherry-atplmubj-pooler.c-9.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
}
}
}
}
MCPg : Production Grade Postgresql Mcp Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
],
"env": {
"MCPG_DATABASE_URL": "postgresql://neondb_owner:npg_HDY3yUCx5mhw@ep-falling-cherry-atplmubj-pooler.c-9.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require"
}
}
}
}
MCPg : Production Grade Postgresql Mcp Server tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCPg : Production Grade Postgresql Mcp Server?
MCPg is a production-grade MCP server for PostgreSQL that provides AI agents with over 100 tools for schema introspection, natural-language-to-SQL, query optimization, index tuning, performance analysis, multi-tenancy operations, and DBA tasks, prioritizing safety.
How to use MCPg : Production Grade Postgresql Mcp Server?
Install via pip install mcpg or Docker. Configure connection settings and choose a transport: stdio for Claude Desktop, or HTTP/SSE/Streamable HTTP. Connect any MCP client to start using the tools.
Key features of MCPg : Production Grade Postgresql Mcp Server
- Safety-first design: read-only by default, AST validation, strict sanitization
- Broad PostgreSQL support: pgvector, TimescaleDB, PostGIS, Apache AGE
- Production ready: connection pooling, SET ROLE multi-tenancy, read-replica routing
- Prometheus metrics and structured audit logging with redaction
- Multiple transports: stdio, HTTP, SSE, Streamable HTTP
- Easy install: pip or Docker with OIDC + static auth and rate limiting
Use cases of MCPg : Production Grade Postgresql Mcp Server
- AI-assisted schema exploration and database introspection
- Natural language to SQL query generation and optimization
- Automated index tuning and performance analysis
- Multi-tenant database operations with role isolation
- Production DBA tasks with safety guards
Frequently asked questions
1 What tools does MCPg provide?
Over 100 tools covering schema introspection, natural-language-to-SQL, query optimization, index tuning, performance analysis, multi-tenancy operations, and DBA tasks.
2 How does MCPg ensure safety?
It is read-only by default, performs AST validation on all SQL, strictly sanitizes identifiers, and requires opt-in gates for DDL, shell commands, and LISTEN operations.
3 What transports are supported?
MCPg supports stdio (for Claude Desktop), HTTP, Server-Sent Events (SSE), and Streamable HTTP.
4 Is MCPg production ready?
Yes, it includes connection pooling, SET ROLE multi-tenancy, read-replica routing, Prometheus metrics, structured audit logging, OIDC + static authentication, and rate limiting.
5 What are the runtime requirements?
Python (psycopg3 driver), a PostgreSQL database, and optional extensions like pg_stat_statements for performance features.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In