timescale/pg-aiguide

MCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.

What it solves

AI coding assistants often generate PostgreSQL code that is outdated, lacks proper constraints and indexes, or ignores modern features and real-world best practices. pg-aiguide provides these agents with deep, version-aware knowledge and proven patterns to produce more robust, performant, and maintainable database schemas.

How it works

It integrates with AI agents through three primary methods:

  • Agent Skills: Curated, opinionated best practices (skills) that agents can use automatically for tasks like schema design, indexing, and performance tuning.
  • MCP Server: A Model Context Protocol server that enables agents to perform semantic and keyword searches across the official PostgreSQL manual, TimescaleDB, and PostGIS documentation.
  • Plugins: Specialized integrations for tools like Claude Code.

Who it’s for

Developers using AI coding tools (such as Cursor, Claude Code, VS Code, or Gemini CLI) who want to ensure the SQL generated for their PostgreSQL databases follows modern standards and professional best practices.

Highlights

  • Version-Aware Search: Semantic search across official PostgreSQL, TimescaleDB, and PostGIS manuals.
  • AI-Optimized Skills: Guidance on naming conventions, data integrity, and modern PG features (e.g., GENERATED ALWAYS AS IDENTITY).
  • Broad Compatibility: Works with 40+ AI agents via the npx skills framework and the MCP standard.
  • Schema Exploration: Includes specific skills for investigating existing PostgreSQL databases.

Related

  • Project
  • Project
  • Project
  • Project
  • Project