{
  "id": "mcp_606b9989ce74",
  "slug": "postgres-mcp",
  "asset_type": "mcp",
  "name": "PostgreSQL Read/Write & Schema Introspection MCP Server",
  "tagline": "Connect AI agents directly to PostgreSQL databases for live table schema inspection, `EXPLAIN ANALYZE` query benchmarking, and safe read-only or transactio",
  "description_md": "### Server Architecture & Capability Summary\n**PostgreSQL Read/Write & Schema Introspection MCP Server** (`postgres-mcp`) is a verified **STDIO** Model Context Protocol (MCP) server curated with **@simonw** for Grok Bot, Claude Code, and Cursor.\n\nConnect AI agents directly to PostgreSQL databases for live table schema inspection, `EXPLAIN ANALYZE` query benchmarking, and safe read-only or transactional queries.\n\n### 1-Click CLI Installation\nRun the command below to register `postgres-mcp` in Claude Code or your MCP client:\n```bash\nclaude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb\n```\n\n### Standard `mcpServers` JSON Configuration (`.cursor/mcp.json` / `claude_desktop_config.json`)\n```json\n{\n  \"mcpServers\": {\n    \"postgres-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-postgres\",\n        \"postgresql://localhost/mydb\"\n      ],\n      \"env\": {\n        \"DATABASE_URL\": \"postgresql://user:pass@host:5432/dbname\"\n      }\n    }\n  }\n}\n```\n\n### Exposed MCP Tools\n- `query_sql` — Deterministic JSON-RPC 2.0 tool exposed by `postgres-mcp`.\n- `describe_table_schema` — Deterministic JSON-RPC 2.0 tool exposed by `postgres-mcp`.\n- `list_indexes` — Deterministic JSON-RPC 2.0 tool exposed by `postgres-mcp`.\n- `explain_query_plan` — Deterministic JSON-RPC 2.0 tool exposed by `postgres-mcp`.\n\n### Authentication & Environment Variables\n- **Transport Protocol:** `stdio`\n- **Auth Mechanism:** `connection_string`\n- `DATABASE_URL`: `postgresql://user:pass@host:5432/dbname`\n- **Documentation / Source:** [https://github.com/modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)\n",
  "primary_category": "engineering",
  "categories_json": "[\"engineering\", \"mcp\"]",
  "tags_json": "[\"postgres-mcp\", \"stdio\", \"engineering\", \"mcp-server\", \"query-sql\", \"describe-table-schema\"]",
  "compatible_agents_json": "[\"grok-bot\", \"claude-code\", \"cursor\"]",
  "integrations_json": "[\"PostgreSQL Read/Write & Schema Introspection MCP Server\", \"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 postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb",
  "skill_markdown": "",
  "starter_prompt": "Connect to the PostgreSQL Read/Write & Schema Introspection MCP Server (postgres-mcp) MCP server using `claude mcp add postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb`. First run a read-only discovery check invoking `query_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": 475,
  "x_bookmarks": 1003,
  "x_retweets": 250,
  "x_views": 6650,
  "human_upvotes": 475,
  "human_installs": 475,
  "bot_pulls": 1003,
  "pulse_score": 80,
  "gravity_rank_score": 3649.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 Read/Write & Schema Introspection MCP Server",
  "description": "Connect AI agents directly to PostgreSQL databases for live table schema inspection, `EXPLAIN ANALYZE` query benchmarking, and safe read-only or transactio",
  "category": "engineering",
  "tags": "[\"postgres-mcp\", \"stdio\", \"engineering\", \"mcp-server\", \"query-sql\", \"describe-table-schema\"]",
  "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": 475,
  "installs_count": 475
}