
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets clients query a Postgres database, introspect tables, and switch between databases with permission-aware handling.
Postgres MCP server for querying PostgreSQL databases is cataloged as an MCP server attributed to freakynit. A Model Context Protocol server that lets clients query a Postgres database, introspect tables, and switch between databases with permission-aware handling. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Postgres MCP server for querying PostgreSQL databases are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Read-only queries are automatically approved, read-write queries require user confirmation, and admin or DDL queries require elevated permission.
Yes, a dry-run mode allows validating queries without executing them.
README.md · 478da8abc36a · Fetched 2026-11-13 11:53:31 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A lightweight MCP (Model Context Protocol) server built to query Postgres database using SQL or plain English commands. It provides comprehensive tools for database operations, table introspection, and query execution with smart permission handling.
| Tool | Description |
|---|---|
execute_raw_query | Execute SQL queries with permission validation and dry-run support |
list_tables | List all non-system tables |
describe_tables | Get comprehensive table information including columns, indexes, triggers, and constraints |
switch_database | Switch the active database connection |
POSTGRES_HOSTPOSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_DATABASEPOSTGRES_PORTPOSTGRES_SSL (boolean)POSTGRES_VERIFY (boolean)POSTGRES_SEND_RECEIVE_TIMEOUT (in seconds)POSTGRES_CONNECT_TIMEOUT (in seconds)mcpServers jsonFor Mac and Linux
{
"mcpServers": {
"postgres-mcp": {
"command": "npx",
"args": ["-y", "@freakynit/postgres-mcp@latest"],
"env": {
"POSTGRES_HOST": "<POSTGRES HOST>",
"POSTGRES_USER": "<POSTGRES USER>",
"POSTGRES_PASSWORD": "<POSTGRES PASSWORD>",
"POSTGRES_DATABASE": "<POSTGRES DATABASE>"
}
}
}
}
For Windows
{
"mcpServers": {
"postgres-mcp": {
"command": "cmd",
"args": ["/k", "npx", "-y", "@freakynit/postgres-mcp@latest"],
"env": {
"POSTGRES_HOST": "<POSTGRES HOST>",
"POSTGRES_USER": "<POSTGRES USER>",
"POSTGRES_PASSWORD": "<POSTGRES PASSWORD>",
"POSTGRES_DATABASE": "<POSTGRES DATABASE>"
}
}
}
}
npm i -g @freakynit/postgres-mcp
OR
git clone https://github.com/freakynit/postgres-mcp.git
cd postgres-mcp
npm install
Create a .env file in the project root with the following variables:
# PostgreSQL
POSTGRES_HOST=your-db-host
POSTGRES_PORT=5432 # Optional, default 5432
POSTGRES_USER=your-username
POSTGRES_PASSWORD=your-password
POSTGRES_DATABASE=your-database
# SSL settings (optional)
POSTGRES_SSL=false # Or true
POSTGRES_VERIFY=false # Verify server cert if SSL true
# Timeouts (optional, seconds)
POSTGRES_SEND_RECEIVE_TIMEOUT=60 # Query timeout
POSTGRES_CONNECT_TIMEOUT=60 # Connection timeout
Start the server (Starts in stdio mode):
node src/index.js
For debugging and development:
npx @modelcontextprotocol/inspector node src/index.js
npx @modelcontextprotocol/inspector node src/index.js
This project is licensed under the MIT License. See LICENSE for details.
![]()
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Postgres MCP server for querying PostgreSQL databases from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/postgres-mcp-freakynit)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.