postgres-mcp

postgres-mcp

2

This project is an MCP server designed for interacting with PostgreSQL databases. It provides tools for executing SQL queries, performing database operations, and managing transactions through a standardized API. Security features include parameterized queries to prevent SQL injection.

PostgreSQL MCP Server

This project is an MCP server that provides an interface to interact with PostgreSQL databases. It supports executing SQL queries, database operations such as INSERT, UPDATE, DELETE, and managing transactions. Key features include secure parameter handling to prevent SQL injection and retrieving database schema information.

Features

  • Execute SQL queries with parameterized inputs
  • Perform database operations
  • Execute transactions with multiple statements
  • Retrieve database schema information
  • Secure parameter handling

Installation

  1. Clone the repository and navigate to the directory.
  2. Install dependencies.
  3. Configure the database connection.
  4. Build the server.
  5. Run the server.

Usage

The server exposes several MCP tools for executing SQL statements, querying data, handling transactions, and retrieving schema information.