Configurable read/write Postgres access plus performance analysis, index tuning and health checks for agents.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add postgres-pro --env DATABASE_URI='<DATABASE_URI>' -- uv run postgres-mcp --access-mode=unrestricted~/.codex/config.toml
[mcp_servers.postgres-pro]
command = "uv"
args = ["run", "postgres-mcp", "--access-mode=unrestricted"]
env = { DATABASE_URI = "<DATABASE_URI>" }
# codex mcp add postgres-pro --env DATABASE_URI='<DATABASE_URI>' -- uv run postgres-mcp --access-mode=unrestricted~/.cursor/mcp.json
{
"mcpServers": {
"postgres-pro": {
"command": "uv",
"args": [
"run",
"postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"postgres-pro": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"postgres-pro": {
"command": "uv",
"args": [
"run",
"postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"postgres-pro": {
"command": "uv",
"args": [
"run",
"postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"postgres-pro": {
"command": "uv",
"args": [
"run",
"postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}Environment variables
DATABASE_URI
Replace the placeholders with your own credentials and keep them out of version control.