PostgreSQL

Level ACuratedOfficialLocal

官方数据库连接器:自然语言查表、看结构、跑 SQL,建议配只读账号保平安

Overview

Official PostgreSQL connector for natural-language queries, schema inspection, and SQL—prefer a read-only account for safety.

⭐ 6.4kDatabaseTypeScriptRepo ↗

Installation

MCP client config (paste into mcp.json)

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:pass@host/db"
      ]
    }
  }
}

Agent install prompt

Copy and paste into Cursor / Claude / other agents to install this MCP for you

Please read this MCP repository and install it into my current environment:
https://github.com/modelcontextprotocol/servers

Known working client config (can write into mcp.json):
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:pass@host/db"
      ]
    }
  }
}

Please: 1) check README for deps and env vars; 2) write config for my client; 3) if secrets are missing, tell me what to fill — do not invent values.

Related servers