Postgres icon

Postgres

Enables an MCP-compatible client to execute PostgreSQL queries and receive structured results.

About

This project provides a Model Context Protocol (MCP) server that allows external AI models and tools to interact with a PostgreSQL database in a standardized way. By eliminating the need for custom integrations, it offers a common API for running both `SELECT` and non-`SELECT` SQL queries, returning results in structured JSON. This enables seamless use of PostgreSQL as a knowledge base or application datastore for MCP-compatible clients.

Key Features

  • Features structured logging with Loguru.
  • Returns query results in structured JSON format.
  • 1 GitHub stars
  • Executes direct PostgreSQL queries via MCP.
  • Supports both data retrieval (SELECT) and database modifications (INSERT, UPDATE, DELETE, CREATE).
  • Operates in either standard I/O (stdio) or HTTP (REST API) modes.

Use Cases

  • Integrate PostgreSQL as a data source for MCP-compatible AI models.
  • Allow external MCP clients to execute SQL queries on a PostgreSQL database.
  • Utilize PostgreSQL as a standardized knowledge base or application datastore for MCP systems.
Advertisement

Advertisement