Back to MCP Servers

Postgres

PostgreSQL MCP server with 14 tools for querying, schema exploration, and table analysis. Features security-first design with SQL injection prevention and read-only by default.

databasespostgressecurity

Installation

npx -y postgres_mcp

Configuration

{
  "mcpServers": {
    "postgres_mcp": {
      "command": "npx",
      "args": ["-y", "postgres_mcp"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes
View source on GitHub