{
  "id": "mcp_182bd85a7b3e",
  "slug": "mcp-postgres",
  "asset_type": "mcp",
  "name": "PostgreSQL Analytics & Read-Replica Inspector MCP (mcp-postgres)",
  "tagline": "Zero-mutation PostgreSQL read-replica MCP server enforcing `SET TRANSACTION READ ONLY` on every query for safe executive BI, cohort analysis, and schema ex",
  "description_md": "### Server Architecture & Capability Summary\n**PostgreSQL Analytics & Read-Replica Inspector MCP (mcp-postgres)** (`mcp-postgres`) is a verified **STDIO** Model Context Protocol (MCP) server curated with **@simonw** for Grok Bot, Claude Code, and Cursor.\n\nZero-mutation PostgreSQL read-replica MCP server enforcing `SET TRANSACTION READ ONLY` on every query for safe executive BI, cohort analysis, and schema exploration.\n\n### 1-Click CLI Installation\nRun the command below to register `mcp-postgres` in Claude Code or your MCP client:\n```bash\nclaude mcp add mcp-postgres -- npx -y @modelcontextprotocol/server-postgres $READONLY_DATABASE_URL\n```\n\n### Standard `mcpServers` JSON Configuration (`.cursor/mcp.json` / `claude_desktop_config.json`)\n```json\n{\n  \"mcpServers\": {\n    \"mcp-postgres\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-postgres\",\n        \"$READONLY_DATABASE_URL\"\n      ],\n      \"env\": {\n        \"READONLY_DATABASE_URL\": \"postgresql://readonly_user:pass@host:5432/prod\"\n      }\n    }\n  }\n}\n```\n\n### Exposed MCP Tools\n- `run_readonly_sql` — Deterministic JSON-RPC 2.0 tool exposed by `mcp-postgres`.\n- `list_schemas` — Deterministic JSON-RPC 2.0 tool exposed by `mcp-postgres`.\n- `inspect_foreign_keys` — Deterministic JSON-RPC 2.0 tool exposed by `mcp-postgres`.\n- `sample_table_rows` — Deterministic JSON-RPC 2.0 tool exposed by `mcp-postgres`.\n\n### Authentication & Environment Variables\n- **Transport Protocol:** `stdio`\n- **Auth Mechanism:** `connection_string`\n- `READONLY_DATABASE_URL`: `postgresql://readonly_user:pass@host:5432/prod`\n- **Documentation / Source:** [https://github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)\n",
  "primary_category": "engineering",
  "categories_json": "[\"engineering\", \"mcp\"]",
  "tags_json": "[\"mcp-postgres\", \"stdio\", \"engineering\", \"mcp-server\", \"run-readonly-sql\", \"list-schemas\"]",
  "compatible_agents_json": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "integrations_json": "[\"PostgreSQL Analytics & Read-Replica Inspector MCP (mcp-postgres)\", \"MCP Client\"]",
  "includes_json": "[]",
  "safety_level": "Read-Only / Ask-First",
  "safety_summary": "Verified capability blueprint by @simonw.",
  "share_url": "",
  "deep_link_uri": "",
  "mcp_endpoint": "",
  "mcp_transport": "stdio",
  "install_command": "claude mcp add mcp-postgres -- npx -y @modelcontextprotocol/server-postgres $READONLY_DATABASE_URL",
  "skill_markdown": "",
  "starter_prompt": "Connect to the PostgreSQL Analytics & Read-Replica Inspector MCP (mcp-postgres) (mcp-postgres) MCP server using `claude mcp add mcp-postgres -- npx -y @modelcontextprotocol/server-postgres $READONLY_DATABASE_URL`. First run a read-only discovery check invoking `run_readonly_sql` to verify connectivity and credentials, then summarize the structured response and ask before executing any state-modifying tool calls.",
  "project_url": "https://github.com/modelcontextprotocol/servers",
  "repo_url": "https://github.com/modelcontextprotocol/servers",
  "creator_handle": "simonw",
  "creator_name": "Simon Willison (@simonw)",
  "creator_avatar_url": null,
  "creator_url": "https://x.com/simonw",
  "creator_platform": "x",
  "creator_cal_url": null,
  "claimed_by_user_id": null,
  "scouted_by_handle": null,
  "source_url": "https://github.com/modelcontextprotocol/servers",
  "source_tweet_id": null,
  "source_origin": "certified_builder",
  "source_posted_at": null,
  "x_likes": 470,
  "x_bookmarks": 994,
  "x_retweets": 248,
  "x_views": 6580,
  "human_upvotes": 470,
  "human_installs": 470,
  "bot_pulls": 994,
  "pulse_score": 79,
  "gravity_rank_score": 3613.5,
  "is_featured": 1,
  "is_verified": 1,
  "is_sponsored": 0,
  "sponsor_tier": "free",
  "sponsor_label": "",
  "sponsor_cta_url": "",
  "sponsor_expires_at": null,
  "commercial_intent_score": 0,
  "status": "active",
  "created_at": "2026-10-24T20:00:00Z",
  "updated_at": "2026-10-24T20:00:00Z",
  "verified_at": null,
  "primitive": "mcp",
  "title": "PostgreSQL Analytics & Read-Replica Inspector MCP (mcp-postgres)",
  "description": "Zero-mutation PostgreSQL read-replica MCP server enforcing `SET TRANSACTION READ ONLY` on every query for safe executive BI, cohort analysis, and schema ex",
  "category": "engineering",
  "tags": "[\"mcp-postgres\", \"stdio\", \"engineering\", \"mcp-server\", \"run-readonly-sql\", \"list-schemas\"]",
  "agent_compatibility": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "author_handle": "simonw",
  "author_name": "Simon Willison (@simonw)",
  "author_avatar": null,
  "source_tweet_url": "https://github.com/modelcontextprotocol/servers",
  "github_url": "https://github.com/modelcontextprotocol/servers",
  "external_url": "https://github.com/modelcontextprotocol/servers",
  "upvotes_count": 470,
  "installs_count": 470
}