MCP.so
登录

Postgresql MCP

@sarmadparvez

关于 Postgresql MCP

A general-purpose PostgreSQL MCP server with full read-write support, atomic transactions, and schema inspection. Connect Claude, Cursor, Windsurf, or any MCP-compatible AI client to any PostgreSQL database — local, Supabase, AWS RDS, or self-hosted. No cloud lock-in, no Azure de

基本信息

分类

数据库

传输方式

stdio

发布者

sarmadparvez

提交者

Sarmad Parvez

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@sarmadparvez/postgresql-mcp",
        "postgresql://user:pass@localhost:5432/mydb"
      ]
    }
  }
}

工具

5

Execute a read-only SQL SELECT query and return results as JSON

Execute a write SQL statement (INSERT, UPDATE, DELETE, TRUNCATE, CREATE, DROP). Returns rows affected.

List all tables with their columns, types, and constraints for a given schema (default: public)

List all tables in the database with row counts

Execute multiple SQL statements as a single atomic transaction. Rolls back all on any error.

概览

What is Postgresql MCP?

Postgresql MCP is a general-purpose MCP server for PostgreSQL databases that provides full read-write support, atomic transactions, and schema inspection. It connects MCP-compatible AI clients such as Claude, Cursor, and Windsurf to any PostgreSQL database—local, Supabase, AWS RDS, or self-hosted—without cloud lock-in or Azure dependency.

How to use Postgresql MCP?

Configure the server by providing a connection string to your PostgreSQL database. An optional read-only mode can be enabled via a flag in the connection string. Once connected, you can execute SELECT, INSERT, UPDATE, DELETE, DDL statements, and multi-statement transactions with automatic rollback on failure.

Key features of Postgresql MCP

  • Full read-write support for PostgreSQL databases
  • Atomic transactions with automatic rollback
  • Schema inspection capabilities
  • Optional read-only mode via connection string flag
  • Supports SELECT, INSERT, UPDATE, DELETE, and DDL
  • Compatible with any MCP AI client (Claude, Cursor, Windsurf)

Use cases of Postgresql MCP

  • Allow AI assistants to run database queries and retrieve live data
  • Enable AI agents to perform schema analysis and table creation
  • Facilitate automated data entry and updates through natural language
  • Support safe read-only exploration of production databases

FAQ from Postgresql MCP

What database operations does Postgresql MCP support?

It supports SELECT, INSERT, UPDATE, DELETE, DDL statements, and multi-statement transactions with automatic rollback.

Can I use Postgresql MCP in read-only mode?

Yes, an optional read-only mode can be enabled via the connection string flag.

What kinds of PostgreSQL databases can I connect to?

Any PostgreSQL database—local instances, Supabase, AWS RDS, or self-hosted setups.

Is Postgresql MCP tied to any cloud provider?

No. It has no cloud lock-in and no dependency on Azure or any other provider.

Which AI clients are compatible with Postgresql MCP?

It works with any MCP-compatible AI client, including Claude, Cursor, and Windsurf.

评论

数据库 分类下的更多 MCP 服务器