pg-aiguide  by timescale

AI-powered PostgreSQL expertise for coding assistants

Created 5 months ago
1,349 stars

Top 29.6% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides AI coding assistants with enhanced PostgreSQL knowledge, addressing common issues like outdated code, missing constraints, and suboptimal indexing. It offers a public MCP server and a Claude Code plugin, enabling AI tools to generate significantly better, more robust, and performant PostgreSQL schemas and queries by leveraging version-aware documentation and curated best practices.

How It Works

pg-aiguide integrates with AI coding tools via an MCP server and specific plugins. It employs semantic search across the official PostgreSQL manual, scoped by version, and utilizes AI-optimized "skills" that encapsulate curated, opinionated best practices for schema design, indexing, data integrity, and modern PostgreSQL features. This approach directly combats the tendency of AI agents to produce code that is inconsistent with real-world best practices or unaware of contemporary PostgreSQL capabilities.

Quick Start & Requirements

pg-aiguide can be accessed as a public MCP server at https://mcp.tigerdata.com/docs. Integration examples are provided for Claude Code (claude plugin marketplace add timescale/pg-aiguide, claude plugin install pg@aiguide), Codex (codex mcp add --url "https://mcp.tigerdata.com/docs" pg-aiguide), Cursor, Gemini CLI, Visual Studio, VS Code, VS Code Insiders, and Windsurf, often via simple configuration files or one-click installers. No specific hardware or software prerequisites beyond the target AI tool/IDE are mentioned.

Highlighted Details

  • Demonstrated improvements in AI-generated schemas include 4x more constraints and 55% more indexes (including partial/expression indexes).
  • Incorporates PG17-recommended patterns and modern PostgreSQL features like GENERATED ALWAYS AS IDENTITY and NULLS NOT DISTINCT.
  • Supports semantic search over official PostgreSQL documentation and TigerData's corpus, including TimescaleDB.
  • Future ecosystem support is planned for pgvector and PostGIS.

Maintenance & Community

The project welcomes community contributions for new skills, documentation corpora, and improvements. TigerData hosts the public MCP server endpoint. Specific details on core maintainers, sponsorships, or community channels like Discord/Slack are not provided in the README.

Licensing & Compatibility

The project is licensed under the Apache 2.0 license, which is generally permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

While the core PostgreSQL documentation and TimescaleDB are supported, the ecosystem documentation is marked as "Coming soon" for other extensions like pgvector and PostGIS. The effectiveness of pg-aiguide is dependent on the specific AI agent's ability to integrate and utilize the provided MCP server and skills effectively.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
11
Issues (30d)
1
Star History
1,213 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.