My Postgres MCP Server

MCP server for interacting with PostgreSQL databases

Local serverstdio

What is the My Postgres MCP Server?

MCP server for interacting with PostgreSQL databases

The short version

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
queryExecute read-only SQL queries against the connected database

How to install the My Postgres MCP Server

{
  "mcpServers": {
    "postgres": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/postgres",
        "postgresql://host.docker.internal:5432/mydb"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use My Postgres MCP to query.”
  • “Use My Postgres MCP to Input.”
  • “Use My Postgres MCP to Tools.”

Frequently asked questions

MCP server for interacting with PostgreSQL databases Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.