Feedback

PostgreSQL MCP Server — by habuvo

@habuvo Claim

Basic information

Runtime
go
Category
License
Not specified
Transports
stdio
Author
habuvo
Submitted by
Community
Quality
35
Stars
2

About PostgreSQL MCP Server

MCP server to interact with and inspect PostgreSQL DB

PostgreSQL MCP Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by habuvo. Supported transport: stdio. Runtime: go. The repository has 2 GitHub stars. Source code is hosted on github.com.

PostgreSQL MCP Server — by habuvo config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

PostgreSQL MCP Server — by habuvo tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is PostgreSQL MCP Server?

PostgreSQL MCP Server is a Model Context Protocol (MCP) server that provides a standardized API for interacting with PostgreSQL databases. It enables developers to execute queries, perform database operations, and manage transactions through MCP-compatible clients while using parameterized inputs for secure SQL execution.

How to use PostgreSQL MCP Server?

Clone the repository, install dependencies via go mod download, configure database credentials in a .env file, build with go build -o postgres-mcp, and run the server with ./postgres-mcp. The server exposes four MCP tools—execute_tool, query_tool, transaction_tool, and schema_tool—that accept JSON-formatted requests and return structured responses. A Go client example is provided in the README.

Key features of PostgreSQL MCP Server

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

Use cases of PostgreSQL MCP Server

  • Running SELECT queries and returning result rows with column metadata
  • Inserting, updating, or deleting records via parameterized statements
  • Executing multiple statements atomically within a single transaction
  • Obtaining column names, data types, and nullability for a given table

Frequently asked questions

1 What MCP tools does the server expose?

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

2 How does the server prevent SQL injection?

All queries must use parameterized inputs (e.g., $1, $2) rather than concatenating user-provided values directly into SQL strings.

3 What are the runtime dependencies?

The server is written in Go and requires a PostgreSQL database. Database connection details are configured in a .env file using credentials provided by the user.

4 Can I run multiple statements in a single request?

Yes, the transaction_tool accepts an array of statements and executes them as an atomic transaction, returning results for each statement.

5 Is SSL/TLS supported for database connections?

Yes, the README recommends using SSL/TLS for database connections in production environments.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬