Back to MCP directory

PostgreSQL MCP Server

Official

Official PostgreSQL server offering read-only database access and schema inspection, letting AI query relational data safely.

PostgreSQL MCP Server is an MCP server for Database work. Official PostgreSQL server offering read-only database access and schema inspection, letting AI query relational data safely. Tags: postgres · postgresql · 数据库 · database · 关系型 · sql.

DatabasestdioAuthor: Anthropic45.0k starsVisit

What is PostgreSQL MCP Server

PostgreSQL MCP Server exposes Database capabilities to MCP clients. Official PostgreSQL server offering read-only database access and schema inspection, letting AI query relational data safely.

Install PostgreSQL MCP Server in Cursor / Claude / Codex

Cursor Open Cursor MCP settings (or user/project mcp.json) and add the server config on this page. If only a start command exists, put command/args into a Cursor MCP entry.

Claude Desktop Add the config to claude_desktop_config.json and restart Claude Desktop.

Codex Add the same command/args or JSON snippet to Codex MCP config. File location depends on your Codex version.

Install & Run

Run the following command in your terminal to start the server:

npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb

Claude Desktop Configuration

Add the following to Claude Desktop’s claude_desktop_config.json:

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

Tags

postgrespostgresql数据库database关系型sql官方

Similar recommendations

FAQ

What problem does PostgreSQL MCP Server solve?

PostgreSQL MCP Server focuses on Database. Official PostgreSQL server offering read-only database access and schema inspection, letting AI query relational data safely.

How do I connect PostgreSQL MCP Server to my editor?

Use the command or JSON in the install section. If none is listed, follow the project home. Do not paste config from unknown sources.

What similar MCP servers exist?

The related list comes from the same Database group so you can compare scope.