Skip to content

postgres-mcp-server

A Model Context Protocol (MCP) server that provides comprehensive PostgreSQL database management capabilities for AI assistants

5,890
Weekly Downloads
build.protocol_tooling.mcp#postgresql#postgres#mcp#database#model-context-protocol#ai#claude#database-management#sql#ai-assistant

Install postgres-mcp-server in your MCP client

postgres-mcp-server is a Model Context Protocol server. Add it to your MCP client config once, restart, and the server's tools become available to your AI assistant. The same JSON snippet below works across all four major clients — only the config file path differs.

  1. Locate your client's MCP config file.
    • Cursor: ~/.cursor/mcp.json
    • Claude Desktop (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json
    • Claude Desktop (Windows): %APPDATA%\Claude\claude_desktop_config.json
    • VS Code: Settings → Extensions → MCP
    • Windsurf: Settings → MCP Servers
  2. Add postgres-mcp-server to the mcpServers map — paste the snippet below into your config file. If you already have other MCP servers, merge the entry into the existing mcpServers object.
  3. Restart your client so it picks up the new server.
  4. Verify — ask the assistant to list available tools; postgres-mcp-server's tools should appear.
{
  "mcpServers": {
    "postgres-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@henkey/postgres-mcp-server"
      ]
    }
  }
}

Install postgres-mcp-server in Cursor

Open ~/.cursor/mcp.json in your editor, paste the snippet above into mcpServers, save, and restart Cursor. postgres-mcp-server will show up in the assistant's tool list on next launch.

Install postgres-mcp-server in Claude Desktop (macOS)

Open ~/Library/Application Support/Claude/claude_desktop_config.json in your editor, paste the snippet above into mcpServers, save, and restart Claude Desktop (macOS). postgres-mcp-server will show up in the assistant's tool list on next launch.

Install postgres-mcp-server in Claude Desktop (Windows)

Open %APPDATA%\Claude\claude_desktop_config.json in your editor, paste the snippet above into mcpServers, save, and restart Claude Desktop (Windows). postgres-mcp-server will show up in the assistant's tool list on next launch.

Install postgres-mcp-server in VS Code

Open Settings → Extensions → MCP in your editor, paste the snippet above into mcpServers, save, and restart VS Code. postgres-mcp-server will show up in the assistant's tool list on next launch.

npm package: @henkey/postgres-mcp-server

Transport

postgres-mcp-server supports the following MCP transports. Most AI clients use stdio by default for locally-installed servers.

stdio

From the postgres-mcp-server README

# PostgreSQL MCP Server [![smithery badge](https://smithery.ai/badge/@HenkDz/postgresql-mcp-server)](https://smithery.ai/server/@HenkDz/postgresql-mcp-server) A Model Context Protocol (MCP) server that provides comprehensive PostgreSQL database management capabilities for AI assistants. **🚀 What's New**: This server has been completely redesigned from 46 individual tools to 18 intelligent tools through consolidation (34→8 meta-tools) and enhancement (+4 new tools), providing better AI discovery while adding powerful data manipulation and comment management capabilities. ## Quick Start ### Option 1: npm (Recommended) ```bash # Install globally npm install -g @henkey/postgres-mcp-server # Or run directly with npx (no installation) npx @henkey/postgres-mcp-server --connection-string "po

Other Model Context Protocol servers in the same space as postgres-mcp-server. Each one adds different capabilities to your AI assistant — pick based on the data sources or workflows you need.

Browse the full MCP server directory or use Stork's one-line install to let your agent pick the right server automatically.