SP

stuzero/pg-mcp-client

Database management

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

4 stars 6 forks 품질 42 트렌드 12MIT

A web-based client application for the PostgreSQL Model Context Protocol (PG-MCP) server that allows users to query databases using natural language.

개요

A web-based client application for the PostgreSQL Model Context Protocol (PG-MCP) server that allows users to query databases using natural language. PG-MCP-Client provides a user-friendly web interface for interacting with PostgreSQL databases through the PG-MCP server. It leverages AI language models to translate natural language questions into SQL queries, making database exploration accessible to users without SQL expertise. The client connects to a PG-MCP server, which provides database schema information and query execution capabilities, while an AI provider (Anthropic, Google, or OpenAI) handles the natural language understanding and SQL generation.

README

원문 README의 일부입니다. 원문 보기.

PG-MCP-Client

A web-based client application for the PostgreSQL Model Context Protocol (PG-MCP) server that allows users to query databases using natural language.

More info on the pg-mcp project here:

https://stuzero.github.io/pg-mcp/

Overview

PG-MCP-Client provides a user-friendly web interface for interacting with PostgreSQL databases through the PG-MCP server. It leverages AI language models to translate natural language questions into SQL queries, making database exploration accessible to users without SQL expertise.

The client connects to a PG-MCP server, which provides database schema information and query execution capabilities, while an AI provider (Anthropic, Google, or OpenAI) handles the natural language understanding and SQL generation.

Features

  • Natural Language Interface: Query your PostgreSQL database using plain English
  • Multiple LLM Support: Compatible with Anthropic (Claude), Google (Gemini), and OpenAI models
  • Interactive UI: Clean, responsive web interface built with Tailwind CSS and HTMX
  • Database Schema Exploration: Automatically retrieves and uses database schema for accurate query generation
  • Query Visualization: Displays generated SQL and query results in a formatted table
  • Configurable Settings: Easy configuration of API keys and connection details

Screenshot

Installation

Prerequisites

Using Docker

# Clone the repository
git clone https://github.com/stuzero/pg-mcp-client.git
cd pg-mcp-client

# Create a .env file with your application secret
echo "APPLICATION_SECRET=your_secure_random_string" > .env

# Build and run with Docker
docker-compose up -d

Manual Installation

This project uses uv for dependency management:
uv Installation Instructions

# Clone the repository
git clone https://github.com/stuzero/pg-mcp-client.git
cd pg-mcp-client

# Install dependencies and create a virtual environment ( .venv )
uv sync

# Activate the virtual environment
source .venv/bin/activate

# Create a .env file with your application secret
echo "APPLICATION_SECRET=your_secure_random_string" > .env

# Run the application
python -m client.app

Usage

  1. Access the web interface at http://localhost:8080
  2. Navigate to the Settings page and configure:
    • LLM Provider (Anthropic, Gemini, or OpenAI)
    • LLM API Key
    • PG-MCP Server URL (e.g., http://localhost:8000/sse)
    • PostgreSQL Connection String
  3. Go to the Query page
  4. Enter your question in natural language (e.g., “Show me the top 10 customers by revenue”)
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →