Discover and explore top open-source AI tools and projects—updated daily.
subnetmarcoNatural language interface for PostgreSQL
Top 62.4% on SourcePulse
PGMCP (PostgreSQL Model Context Protocol Server) bridges the gap between AI assistants and PostgreSQL databases by enabling natural language querying. It allows users to interact with any PostgreSQL database using plain English, translating questions into SQL queries and returning structured results. This facilitates data access for tools like Cursor, Claude Desktop, and VS Code extensions, simplifying complex database interactions for developers and data analysts.
How It Works
PGMCP operates as a server that connects to a PostgreSQL database. It accepts natural language prompts from various MCP-compatible clients. An integrated AI engine, typically leveraging OpenAI's API, interprets these prompts and generates corresponding SQL queries. The server then executes these read-only queries against the database, managing results through automatic streaming, pagination, and robust error handling for AI-generated SQL. This approach ensures safe, efficient, and intuitive database interaction without requiring schema modifications.
Quick Start & Requirements
go build -o pgmcp-server ./server and go build -o pgmcp-client ./client.DATABASE_URL is required for the database connection string. OPENAI_API_KEY and OPENAI_MODEL are optional for AI integration.Highlighted Details
Maintenance & Community
The provided README does not contain specific details regarding project maintainers, community channels (e.g., Discord, Slack), or a public roadmap.
Licensing & Compatibility
Limitations & Caveats
The accuracy of SQL generation is dependent on the underlying AI model, which may occasionally produce incorrect queries requiring user intervention or rephrasing. While an OpenAI API key is optional, its absence or the use of alternative LLMs might impact the quality and reliability of the natural language to SQL translation.
1 month ago
Inactive
sqlchat
Canner