cosmic-mcp

All servers

PostgreSQL

io.github.antonorlov/mcp-postgres-server ยท version 0.3.1

Community listing. Not installed or verified by cosmic-mcp. Read the source and its permissions before you run it.

MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.

https://github.com/antonorlov/mcp-postgres-server

Quick facts

  • Listing: Community
  • Published Sep 14, 20:23 UTC
  • Transport: stdio
  • Package: npm mcp-postgres-server 0.3.1
  • Listed by cosmic-mcp: Nov 8, 18:59 UTC

Databases DevOps and infrastructure

Setup snippets

Generated from the registry entry. cosmic-mcp has not run or reviewed this server; values in angle brackets are yours to fill in.

Run it locally (npm)

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "mcp-postgres-server": {
      "args": [
        "-y",
        "[email protected]"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "<your database url>",
        "PG_ALLOW_WRITE": "<your pg allow write>",
        "PG_CONNECT_TIMEOUT": "<your pg connect timeout>",
        "PG_DATABASE": "<your pg database>",
        "PG_ENABLE_RUNTIME_CONNECT": "<your pg enable runtime connect>",
        "PG_HOST": "<your pg host>",
        "PG_MAX_RESULT_BYTES": "<your pg max result bytes>",
        "PG_PASSWORD": "<your pg password>",
        "PG_PORT": "<your pg port>",
        "PG_SSH_AGENT": "<your pg ssh agent>",
        "PG_SSH_FINGERPRINT": "<your pg ssh fingerprint>",
        "PG_SSH_HOST": "<your pg ssh host>",
        "PG_SSH_KEEPALIVE_INTERVAL": "<your pg ssh keepalive interval>",
        "PG_SSH_PASSPHRASE": "<your pg ssh passphrase>",
        "PG_SSH_PASSWORD": "<your pg ssh password>",
        "PG_SSH_PORT": "<your pg ssh port>",
        "PG_SSH_PRIVATE_KEY": "<your pg ssh private key>",
        "PG_SSH_USER": "<your pg ssh user>",
        "PG_SSLMODE": "<your pg sslmode>",
        "PG_SSL_CA": "<your pg ssl ca>",
        "PG_STATEMENT_TIMEOUT": "<your pg statement timeout>",
        "PG_USER": "<your pg user>"
      }
    }
  }
}

Claude Code

claude mcp add 'mcp-postgres-server' -- npx -y '[email protected]'

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "mcp-postgres-server": {
      "args": [
        "-y",
        "[email protected]"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "<your database url>",
        "PG_ALLOW_WRITE": "<your pg allow write>",
        "PG_CONNECT_TIMEOUT": "<your pg connect timeout>",
        "PG_DATABASE": "<your pg database>",
        "PG_ENABLE_RUNTIME_CONNECT": "<your pg enable runtime connect>",
        "PG_HOST": "<your pg host>",
        "PG_MAX_RESULT_BYTES": "<your pg max result bytes>",
        "PG_PASSWORD": "<your pg password>",
        "PG_PORT": "<your pg port>",
        "PG_SSH_AGENT": "<your pg ssh agent>",
        "PG_SSH_FINGERPRINT": "<your pg ssh fingerprint>",
        "PG_SSH_HOST": "<your pg ssh host>",
        "PG_SSH_KEEPALIVE_INTERVAL": "<your pg ssh keepalive interval>",
        "PG_SSH_PASSPHRASE": "<your pg ssh passphrase>",
        "PG_SSH_PASSWORD": "<your pg ssh password>",
        "PG_SSH_PORT": "<your pg ssh port>",
        "PG_SSH_PRIVATE_KEY": "<your pg ssh private key>",
        "PG_SSH_USER": "<your pg ssh user>",
        "PG_SSLMODE": "<your pg sslmode>",
        "PG_SSL_CA": "<your pg ssl ca>",
        "PG_STATEMENT_TIMEOUT": "<your pg statement timeout>",
        "PG_USER": "<your pg user>"
      }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "mcp-postgres-server": {
      "args": [
        "-y",
        "[email protected]"
      ],
      "command": "npx",
      "env": {
        "DATABASE_URL": "<your database url>",
        "PG_ALLOW_WRITE": "<your pg allow write>",
        "PG_CONNECT_TIMEOUT": "<your pg connect timeout>",
        "PG_DATABASE": "<your pg database>",
        "PG_ENABLE_RUNTIME_CONNECT": "<your pg enable runtime connect>",
        "PG_HOST": "<your pg host>",
        "PG_MAX_RESULT_BYTES": "<your pg max result bytes>",
        "PG_PASSWORD": "<your pg password>",
        "PG_PORT": "<your pg port>",
        "PG_SSH_AGENT": "<your pg ssh agent>",
        "PG_SSH_FINGERPRINT": "<your pg ssh fingerprint>",
        "PG_SSH_HOST": "<your pg ssh host>",
        "PG_SSH_KEEPALIVE_INTERVAL": "<your pg ssh keepalive interval>",
        "PG_SSH_PASSPHRASE": "<your pg ssh passphrase>",
        "PG_SSH_PASSWORD": "<your pg ssh password>",
        "PG_SSH_PORT": "<your pg ssh port>",
        "PG_SSH_PRIVATE_KEY": "<your pg ssh private key>",
        "PG_SSH_USER": "<your pg ssh user>",
        "PG_SSLMODE": "<your pg sslmode>",
        "PG_SSL_CA": "<your pg ssl ca>",
        "PG_STATEMENT_TIMEOUT": "<your pg statement timeout>",
        "PG_USER": "<your pg user>"
      },
      "type": "stdio"
    }
  }
}

Related servers

  • AI for Database Verified domain
    Ask your databases questions in plain English, run read-only SQL and set up data alerts.
  • AI2SQL Verified domain
    Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
  • AICasePredict Verified domain
    Search a large legal database of 325M+ US court records: cases, attorneys, judges and courts.
  • AIUseCaseHub
    Source-linked enterprise AI deployment search. Free preview; API keys unlock full results.
  • APC Security Reference Server
    Reference MCP server for synthetic APC action-security evaluation and local SQLite sandbox testin...
  • API Key Case
    Local MCP tools for secret status and guarded deployment. Values never reach the agent.