TC
ToolCompared
MCP ServerFeatured

Postgres MCP MCP Server

by Anthropic

Run read-only SQL queries against a Postgres database.

archived. Moved to modelcontextprotocol/servers-archived: no longer maintained by the MCP project.
OfficialTypeScriptDatabases

About Postgres MCP

Read-only Postgres MCP server with schema introspection and parameterized SQL. Useful for letting agents inspect tables and run analytical queries safely.

Tags

SQLdatabaseread-only

How to install Postgres MCP

Package
@modelcontextprotocol/server-postgres (npm)
Transport
Local (stdio)

Client configuration

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://localhost/mydb"
      ]
    }
  }
}

Copied from the official README — . Replace placeholder keys with your own credentials.

Client setup documented by the maintainer

ClientSetup steps in README
Claude DesktopYes
Claude CodeNot documented
CursorNot documented
VS CodeYes
WindsurfNot documented

“Not documented” means the README has no client-specific steps — most MCP clients can still run a local stdio server from the configuration above.

Related MCP servers in Databases