技能潮 SkillTide 提交收录
官方说明3 个来源MCP 服务3 天前
ahmedmustahid/postgres-mcp-server

ahmedmustahid/postgres-mcp-server

MCP server for PostgreSQL
在 GitHub 查看 ↗直链 · 无中转页
来源明细
收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-14 · 最近见到 2026-10-16 · 共见到 4 次 · 被 3 个来源列出
评分构成
综合分 303 · 3 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-10-14;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

MCP PostgreSQL Server (Stateful and Dual Transport)

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

A Model Context Protocol (MCP) server that provides both HTTP and Stdio transports for interacting with PostgreSQL databases. This server exposes database resources and tools through both transport methods, allowing for flexible integration in different environments.
Features
- **Dual Transport Support**: Both HTTP (StreamableHTTPServerTransport) and Stdio (StdioServerTransport)
- **Database Resources**: List tables and retrieve schema information
- **Query Tool**: Execute read-only SQL queries
- **Stateful Sessions**: HTTP transport supports session management
- **Docker Support**: Containerized deployments for both transports
- **Production Ready**: Graceful shutdown, error handling, and logging
Quick Start
Environment Setup
The database credentials must be passed as:
1. Either environment variables
2. Or in the working directory (directory where npx command will be run):
create a .env file (the package uses dotenv package)
Run using npx
1. Download node.js and npm from here
2. Run the package. By default, it will run streamable http on port 3000:
3. For stdio transport:
Environment Setup
Copy environment template
Edit your database credentials
Podman(or Docker) Usage
1. Install podman from here
2. Install uv from here
3. Install podman compose package: uv add podman-compose (or uv sync to sync packages in pyproject.toml)
Test using Claude Desktop
First, install node.js and npm, build the project following the above instructions.
Edit your claude_desktop_config.json
Check if MCP Server has been enabled
Verify from Claude Desktop Window
Using MCP Server from Claude Desktop
Prompt: Show sales table from last year.
Test using MCP Inspector
First, install node.js and npm, build the project following the above instructions.
Install MCP Inspector: instructions: here
Check Stdio MCP Server
Check Streamable HTTP MCP Server
First, run the server (shell where environment has been configured):
Run the mcp inspector from another terminal
After selecting Streamable HTTP from drop down menu, insert http://localhost:3000/mcp(default) into URL.
MCP tools:
MCP Resource:
Configuration
Environment Variables
You have to specify these inside the .env file.
| Variable | Description | Default | Required |
|----------|-------------|---------|----------|
| POSTGRES_USERNAME | PostgreSQL username | - | Yes |
| POSTGRES_PASSWORD | PostgreSQL password | - | Yes |
| POSTGRES_HOST | PostgreSQL host | - | Yes |
| POSTGRES_DATABASE | PostgreSQL database name | - | Yes |
| PORT | HTTP server port | 3000 | No |
| HOST | HTTP server host | 0.0.0.0 | No |
| CORS_ORIGIN | Allowed CORS origins (comma-separated) | localhost:8080,localhost:3000 | No |
| NODE_ENV | Environment mode | development | No |
Resources
Hello World (hello://world)
A simple greeting message for testing.
Database Tables (database://tables)
Lists all tables in the public schema with their schema URIs.
Database Schema (database://tables/{tableName}/schema)
来源
awesome · https://github.com/ahmedmustahid/postgres-mcp-server
按领域浏览
MCP 服务
收录于
昨天

更多MCP 服务

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

所属领域与标签

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

浏览全部领域 →

← 返回索引