PostgreSQL MCP Server

MCP server to interact with and inspect PostgreSQL DB

Local serverstdioGo

What is the PostgreSQL MCP Server?

MCP server to interact with and inspect PostgreSQL DB

What the server does

This is a Model Context Protocol (MCP) server that provides an interface to interact with PostgreSQL databases. It allows you to execute queries, perform database operations, and manage transactions through a standardized API.

  • Execute SQL queries with parameterized inputs
  • Perform database operations (INSERT, UPDATE, DELETE)
  • Execute transactions with multiple statements
  • Retrieve database schema information
  • Secure parameter handling to prevent SQL injection

More MCP options

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

Maintainer setup documentation.

Frequently asked questions

The server provides four tools: `execute_tool` (single SQL statement), `query_tool` (SELECT queries), `transaction_tool` (multi-statement transactions), and `schema_tool` (table schema).