mcp-postgres-server
Active·★ 24·MIT·Updated 2026-09-16
This project is an MCP server designed to provide secure and structured access to PostgreSQL databases for models. It supports various PostgreSQL environments, including local, Docker, and cloud-based instances, with robust security features like read-only enforcement and SSH tunneling.
#PostgreSQL#Database Access#LLM Tooling#Node.js#Data Integration#Read-only#SSH Tunneling
01
Features
01Read-only access by default, with explicit opt-in for writes.
02Supports DATABASE_URL with comprehensive SSL options.
03Prepared-statement parameters for secure SQL execution.
04Result size capping to prevent model context flooding.
05Detailed error handling with SQLSTATE hints for model self-correction.
02
Compatibility
Node.js
Runtime
Verified via docs
PostgreSQL
Database
Verified via docs
Docker
Deployment
Verified via docs
Cloud Databases
Platforms
Verified via docs
MCP Clients
Integration
Verified via docs
03
Quick start
1
$ npm install mcp-postgres-server
04
Use cases
↳Enabling AI agents to safely query and interact with PostgreSQL databases.
↳Integrating PostgreSQL databases into LLM applications with controlled read/write access.
↳Connecting to PostgreSQL instances across diverse environments including local, Docker, and various cloud providers (RDS, Neon, Supabase).
↳Facilitating database context for MCP-compatible AI clients like VS Code and Cursor.
05
Alternatives
⚡Top VS:
us-census-bureau-data-api-mcp★ 105
The U.S. Census Bureau Data API MCP connects AI Assistants with official Census Bureau statistics.
agent-harness-generator★ 713
🛠️ The meta-harness for AI agents — scaffold your own focused, branded agent harness with its own npx CLI, MCP server, memory, learning loop, and witness-signed releases. Works with Claude Code, Codex, pi.dev, Hermes, OpenClaw, and RVM (hardware-isolated sandbox).
agy-bridge★ 60
MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.
run402★ 24
MCP server for Run402 — AI-native Postgres + REST + auth + storage + static sites. Pay with x402 USDC on Base. No signups.
mcp-compress-router★ 21
Compress all connected MCP into a single router MCP and save up to 99% on tokens
deepseek-mcp-server★ 26
MCP server for DeepSeek V4 (v4-flash, v4-pro, 1M context): chat, reasoning, function calling, thinking mode, cost tracking. deepseek-chat/reasoner aliases supported.
Comments
Log in to leave a comment
No comments yet. Be the first!