kapyn
MCP serversDatabases ยท MCP server

PostgreSQL MCP server

Query a Postgres database in natural language. A reference server that connects an assistant to Postgres, letting it inspect schemas and run read queries. Useful for letting a model answer questions about your data.

Category
Databases
Maintained by
Official
Protocol
Model Context Protocol
Source
modelcontextprotocol/servers-archived
View on GitHubBrowse all MCP servers

Installing PostgreSQL

Runs on demand via npx. Nothing to install globally.

The upstream reference server is archived. It still installs and runs, but is no longer maintained.

Claude Code
claude mcp add postgresql -- npx -y @modelcontextprotocol/server-postgres
Claude Desktop ยท Cursor ยท VS Code ยท Windsurf
{
  "mcpServers": {
    "postgresql": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres"
      ]
    }
  }
}

Not sure where the config file lives, or it isn't picking the server up? Config paths for every client.

What it does

A reference server that connects an assistant to Postgres, letting it inspect schemas and run read queries. Useful for letting a model answer questions about your data.

Like any MCP server, PostgreSQL plugs into MCP-compatible assistants (such as Claude and other clients) so the model can use it as a tool , no custom integration code required.

Related Databases MCP servers