
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.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
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 · 采集于 2026-11-13 11:53:31 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
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.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
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.