Connections & Capabilities
Connects To
Capabilities
Quickstart
Config
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"crystaldba/postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "postgresql://username:password@localhost:5432/dbname"
}
}
}
}Exposed MCP Tools (5)
database_health_checkAnalyzes database health, including index health, connection utilization, and replication lag.
Read-only access to database statistics.
index_tuningExplores index options to optimize database performance.
Can modify database schema by creating new indexes.
query_plan_analysisReviews EXPLAIN plans to validate and optimize query performance.
Read-only access to query execution plans.
safe_sql_executionExecutes SQL queries with configurable access control.
Can modify data or schema depending on access mode.
schema_intelligenceProvides context-aware SQL generation based on the database schema.
Read-only access to database schema information.
Safety Assessment
Postgres MCP Pro offers configurable access controls, but unrestricted mode carries significant risks. It's safe for development with proper access controls. Production use requires restricted mode and careful monitoring to prevent unintended data modifications or performance impacts.
- Configurable access control (unrestricted/restricted modes)
- Safe SQL parsing
- Read-only mode available
- Can be used in development and production environments
- Supports the Model Context Protocol (MCP)
- Unrestricted mode allows full read/write access, posing a risk of unintended modifications.
- Requires careful configuration of access mode to prevent misuse.
- Potential for SQL injection if safe SQL parsing is not properly implemented or bypassed.
- Exposure of database credentials in configuration files if not handled securely.
- Index tuning and schema modifications can impact database stability if not carefully evaluated.
