Enterprise DNA Enterprise DNA
M MCP Servers Developer low

antonorlov/mcp-postgres-server

by Various

MCP server for PostgreSQL. Works with VS Code, Cursor, Claude Code, Codex, and Windsurf.

MCP

antonorlov/mcp-postgres-server

Added 16 Sept 2026

#ai-agents #anthropic #claude #claude-code #cursor #database #llm #mcp

Overview

An MCP server that connects PostgreSQL databases to MCP-compatible AI coding tools. Works with VS Code, Cursor, Claude Code, Codex, and Windsurf.

Best for

Best for
Developers using AI coding tools who need direct PostgreSQL access

Use cases

  • Query PostgreSQL from Claude Code
  • Give Cursor access to database schema
  • Run database operations inside VS Code

How to use

Install

npx mcp-postgres-server

Tools exposed

  • connect_db
  • DATABASE_URL
  • PG_HOST
  • PG_PORT
  • PG_USER
  • PG_PASSWORD
  • PG_DATABASE
  • PG_ALLOW_WRITE
  • PG_SSLMODE
  • PG_SSL_CA
  • PG_ENABLE_RUNTIME_CONNECT
  • PG_MAX_RESULT_BYTES
  • PG_STATEMENT_TIMEOUT
  • PG_CONNECT_TIMEOUT
  • PG_SSH_HOST
  • PG_SSH_PORT
  • PG_SSH_USER
  • PG_SSH_PRIVATE_KEY
  • PG_SSH_PASSPHRASE
  • PG_SSH_AGENT

Tested with

Claude Code, Cursor, Windsurf, VS Code

Example client config

{\n  "mcpServers": {\n    "postgres": {\n      "type": "stdio",\n      "command": "npx",\n      "args": ["-y", "mcp-postgres-server"],\n      "env": {\n        "DATABASE_URL": "postgres://user:password@localhost:5432/mydb",\n        "PG_ALLOW_WRITE": "false"\n      }\n    }\n  }\n}

Notes

An MCP server that connects PostgreSQL databases to MCP-compatible AI coding tools. Works with VS Code, Cursor, Claude Code, Codex, and Windsurf.

20 stars on GitHub. Last updated 2026-09-16. Licensed MIT.

Use cases

  • Query PostgreSQL from Claude Code
  • Give Cursor access to database schema
  • Run database operations inside VS Code

Pros

  • Supports multiple popular AI tools
  • Written in TypeScript
  • Straightforward MCP integration for PostgreSQL

Cons

  • Small project with limited community traction
  • No detailed feature or usage documentation cited
  • Requires manual MCP client configuration

Indexed from awesome-mcp-servers-punkpeye and enriched against its public facts.

Pros

  • Supports multiple popular AI tools
  • Written in TypeScript
  • Straightforward MCP integration for PostgreSQL

Cons

  • Small project with limited community traction
  • No detailed feature or usage documentation cited
  • Requires manual MCP client configuration
Free 27-page guide

Get the free Developer’s Field Guide

A 27-page field guide to the AI coding workflow with Claude. Claude Code, MCP servers, the prompt patterns that work, and what to delegate. Free.

Enter your work email. We send it straight over, plus a few short notes worth knowing. Unsubscribe any time.

No spam. Unsubscribe any time.

Running a business, not writing the code? See the MCP servers picked for operators, and get your first one wired up with us.

Operator picks