Postgres Mcp
@crystaldba
Postgres Mcp について
Postgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": [
"pull",
"crystaldba/postgres-mcp"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Postgres Mcp?
Postgres Mcp is an open-source Model Context Protocol (MCP) server for PostgreSQL that provides database health analysis, index tuning, query plan explanations, schema intelligence, and safe SQL execution. It supports both stdio and SSE transports and is designed for developers and AI agents throughout the development lifecycle.
How to use Postgres Mcp?
Install Postgres Mcp via Docker (docker pull crystaldba/postgres-mcp) or Python (pipx install postgres-mcp or uv pip install postgres-mcp). Configure your MCP client (e.g., Claude Desktop, Cursor) by editing the mcpServers configuration with a DATABASE_URI and optionally the --access-mode flag (unrestricted or restricted). For full index tuning and performance analysis, optionally install the pg_stat_statements and hypopg Postgres extensions.
Key features of Postgres Mcp
- Database health monitoring (index health, connections, buffer cache, replication lag, etc.)
- Index tuning using workload analysis and industrial-strength algorithms
- Query plan validation and hypothetical index simulation
- Schema intelligence for context-aware SQL generation
- Safe SQL execution with read-only and restricted access modes
- Support for both stdio and SSE MCP transports
Use cases of Postgres Mcp
- Analyze database health and identify degradation or risk areas
- Find and fix slow queries with index recommendations
- Optimize ORM-generated SQL for production performance
- Generate and validate schema-aware SQL during development
- Safely execute database operations with configurable access controls
FAQ from Postgres Mcp
How do I configure Postgres Mcp with Claude Desktop?
Edit the claude_desktop_config.json file, adding a mcpServers entry with the Docker command or Python runner, the --access-mode flag, and the DATABASE_URI environment variable.
What access modes are available?
Postgres Mcp supports unrestricted mode (full read/write access for development) and restricted mode (read-only transactions with execution time limits, suitable for production).
Do I need to install Postgres extensions?
Installing pg_stat_statements and hypopg is optional but recommended to enable index tuning and comprehensive performance analysis.
Does Postgres Mcp support SSE transport?
Yes. Use the --transport=sse option when starting the server, then configure your MCP client to connect via URL (e.g., http://localhost:8000/sse).
Is there a read-only mode?
Yes. Restricted mode limits operations to read-only transactions and enforces execution time limits, making it safe for production use.
「データベース」の他のコンテンツ
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
MCP Server for Milvus
zilliztechModel Context Protocol Servers for Milvus
Neon MCP Server
neondatabase-labsMCP server for interacting with Neon Management API and databases

PostgreSQL
modelcontextprotocolModel Context Protocol Servers
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
コメント