postgres-mcp

YawLabs/postgres-mcp
★ 0 stars TypeScript 🗄️ Database Updated today
Read-only-by-default MCP server for PostgreSQL. Query, introspect schemas, explain plans, health checks.
View on GitHub →

Quick Install

Copy the config for your editor. Some servers may need additional setup — check the README.

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "postgres-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "YawLabs/postgres-mcp"
      ]
    }
  }
}

README Excerpt

**Query a PostgreSQL database from Claude Code, Cursor, and any MCP client.** Read-only by default — writes opt in via a single env var — so an agent can't silently drop your tables. Built and maintained by [Yaw Labs](https://yaw.sh). Anthropic's reference Postgres MCP server, `@modelcontextprotocol/server-postgres`, was [archived in May 2025](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres) and [marked deprecated on npm](https://www.npmjs.com/package/@modelcontex

Tools (20)

ALLOW_WRITESDATABASE_URLPOSTGRES_CONNECTION_TIMEOUT_MSPOSTGRES_MAX_ROWSPOSTGRES_POOL_MAXPOSTGRES_SSL_REJECT_UNAUTHORIZEDPOSTGRES_STATEMENT_TIMEOUT_MSpg_advisorpg_describe_tablepg_explainpg_healthpg_inspect_lockspg_killpg_list_extensionspg_list_functionspg_list_rolespg_list_schemaspg_list_tablespg_list_viewspg_query