LocalFree

PostgreSQL MCP server

musaddiq-dev/postgresql-mcp-server

Python MCP server for PostgreSQL database inspection and querying

1 GitHub stars

Install PostgreSQL in Claude Code

Claude Code
claude mcp add musaddiq-dev-postgresql -e POSTGRES_HOST=... -e POSTGRES_PORT=... -e POSTGRES_USER=... -e POSTGRES_DB=... -- uvx mdev-postgresql-mcp-server
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
{
  "mcpServers": {
    "musaddiq-dev-postgresql": {
      "command": "uvx",
      "args": [
        "mdev-postgresql-mcp-server"
      ],
      "env": {
        "POSTGRES_HOST": "...",
        "POSTGRES_PORT": "...",
        "POSTGRES_USER": "...",
        "POSTGRES_DB": "..."
      }
    }
  }
}

Replace each ... with your own value.

Frequently asked questions

What does the PostgreSQL MCP server do?

Python MCP server for PostgreSQL database inspection and querying

Is the PostgreSQL MCP server free?

Yes, most likely. Open source and no paid account or API key is mentioned in the listing. Check the provider for current pricing.

Does PostgreSQL run locally or remotely?

Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.

How do I add PostgreSQL to Claude Code?

Run: claude mcp add musaddiq-dev-postgresql -e POSTGRES_HOST=... -e POSTGRES_PORT=... -e POSTGRES_USER=... -e POSTGRES_DB=... -- uvx mdev-postgresql-mcp-server

More databases MCP servers

View all