PostgreSQL MCP 服务器
@cynhardchuengc
PostgreSQL MCP 服务器 について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"pg-mcp-server-cynhardchuengc": {
"command": "node",
"args": [
"dist/index.js",
"postgresql://用户名:密码@数据库地址:端口/数据库名"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is PostgreSQL MCP 服务器?
PostgreSQL MCP 服务器 is a database access server built on the Model Context Protocol (MCP) that enables AI assistants to safely execute PostgreSQL operations. It supports read-only SQL queries, data modification statements (INSERT, UPDATE, DELETE), table listing, and schema inspection through a standardized MCP tool interface. Designed for developers and AI agents, it acts as a secure bridge between an MCP-compatible client (e.g., Cursor) and a PostgreSQL database.
How to use PostgreSQL MCP 服务器?
Install Node.js 18+, clone the repository, run npm install and npm run build, then configure the MCP client with a connection string like postgresql://user:password@host:port/dbname. Start the server via node dist/index.js <connection_string> or through a Cursor mcp.json configuration. Environment variables control behavior such as transaction timeout, max concurrent transactions, and pool size.
Key features of PostgreSQL MCP 服务器
- Execute read-only SQL queries (SELECT statements)
- Perform data modifications with explicit commit or rollback
- List all tables in the connected database
- Describe table structure (columns, types, constraints)
- Manage database transactions with configurable timeout
- Configure connection pooling and statement timeouts via environment variables
Use cases of PostgreSQL MCP 服务器
- Let an AI assistant query production data for analysis without granting full SQL access
- Enable natural-language database exploration and schema discovery
- Automate data entry or updates under human review and confirmation
- Integrate PostgreSQL operations into AI-driven workflow automation tools
FAQ from PostgreSQL MCP 服务器
How do read-only queries differ from data modification operations?
Read-only queries (SELECT) execute immediately. DML operations (INSERT, UPDATE, DELETE) are wrapped in a transaction and require the user to reply "yes" to commit or "no" to rollback. Unconfirmed or timed-out transactions are automatically rolled back.
What are the runtime requirements?
Node.js 18.x or later and a running PostgreSQL database instance. The server uses npm and TypeScript and requires the @modelcontextprotocol/sdk package.
Where does the server store data or state?
It does not store any data locally. All data remains in the connected PostgreSQL database. Transaction state is tracked in memory and released after commit, rollback, or timeout.
What transport protocol is supported?
The server connects to the MCP client via stdio (StdioServerTransport). There is no HTTP or WebSocket transport described.
Are there any security or production deployment warnings?
The README advises against using production credentials in configuration files and recommends using read-only query capabilities instead of direct modifications on production databases. Sensible timeout and connection pool limits should be configured for production use.
「データベース」の他のコンテンツ
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
PostgreSQL Model Context Protocol (PG-MCP) Server
stuzeromcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
コメント