PostgreSQL MCP Server (Enhanced)
@GarethCott
PostgreSQL MCP Server (Enhanced) について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"enhanced-postgres-mcp-server": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/postgres",
"-f",
"Dockerfile",
"."
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is PostgreSQL MCP Server (Enhanced)?
A Model Context Protocol server that provides both read and write access to PostgreSQL databases. It enables LLMs to inspect database schemas, execute queries, modify data, and create or modify database schema objects. This is an enhanced version of the original read-only PostgreSQL MCP server by Anthropic, adding write capabilities and schema management.
How to use PostgreSQL MCP Server (Enhanced)?
Configure it in the "mcpServers" section of your claude_desktop_config.json. Use either Docker (run docker run -i --rm mcp/postgres) or NPX (run npx -y @modelcontextprotocol/server-postgres), providing a PostgreSQL connection URL such as postgresql://host:port/db-name. Then invoke tools like /query, /insert, /update, /createTable, /createFunction, /createTrigger with the required arguments.
Key features of PostgreSQL MCP Server (Enhanced)
- Execute read-only SQL queries with prepared statements
- Insert, update, and delete records in tables
- Create and alter tables, indexes, functions, and triggers
- Automatic schema discovery as MCP resources
- Parameterized queries for SQL injection prevention
- Transactional handling with proper COMMIT/ROLLBACK
Use cases of PostgreSQL MCP Server (Enhanced)
- LLM-driven inspection of database schemas and data
- Automated data entry and record updates via natural language commands
- Schema evolution, such as adding columns or creating indexes
- Setting up database functions and triggers through conversational AI
FAQ from PostgreSQL MCP Server (Enhanced)
How does this version differ from the original PostgreSQL MCP server?
The original server provides read-only access. This enhanced version adds write capabilities (INSERT, UPDATE, DELETE) and schema management tools like create table, function, trigger, index, and alter table.
What security measures are implemented?
All data modification operations use transactions with COMMIT/ROLLBACK handling. Insert/update operations use parameterized queries to prevent SQL injection. The read-only query tool uses prepared statements to block multi‑statement injection attacks.
How do I connect to a PostgreSQL database?
Provide a PostgreSQL connection URL in the server configuration (e.g., postgresql://user:password@host:port/db-name). For Docker on macOS, use host.docker.internal if the server runs on the host network. Add ?sslmode=no-verify to bypass SSL verification if needed.
Can I create functions and triggers with this server?
Yes. Tools /createFunction and /createTrigger allow creating PostgreSQL functions (specifying language, parameters, body) and triggers (defining when, events, forEach, optional condition).
Does the server use transactions for modifications?
Yes. Each execution of the execute tool is performed within a transaction with proper COMMIT or ROLLBACK handling. Insert, update, and delete tools also run inside a transaction context.
「データベース」の他のコンテンツ
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Elasticsearch MCP Server
elasticNeon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
コメント