pg-aiguide is a free, open source documentation & knowledge base project written in Python and released under Apache-2.0. It has 1,881 GitHub stars, 120 forks and 8 open issues, and was last pushed 6 days ago. On this registry it ranks #65 of 100 tracked projects in Documentation & Knowledge Base, with 5 head-to-head comparisons available. It gained 30 stars over the last 30 tracked days.

What is pg-aiguide?

pg-aiguide is an Apache-2.0 MCP server and Claude Code plugin that gives AI coding agents version-aware PostgreSQL documentation and curated best-practice skills, built for developers and teams whose assistants write outdated or incomplete Postgres code.

What it is

pg-aiguide is a knowledge layer for AI coding tools, distributed in three forms: Agent Skills installed through npx skills, a public MCP server hosted at https://mcp.tigerdata.com/docs, and a Claude Code plugin published through a Claude plugin marketplace. It is written in Python, carries the Apache-2.0 licence, and lives in the MCP and Agent Skills ecosystem alongside Claude Code, Cursor, Codex, Gemini CLI, VS Code, and more than forty other agents reachable through agentskills.io. Its content is version-aware, so the guidance an agent retrieves tracks the PostgreSQL release in play rather than a single frozen snapshot.

The concrete problem is the default behaviour of AI coding tools. Their generated Postgres is often outdated, missing constraints and indexes, unaware of modern PG features, and inconsistent with real-world practice. pg-aiguide replaces the assistant's unaided recall of PostgreSQL with semantic search across the official PostgreSQL manual plus curated, opinionated skills, so the agent retrieves documented patterns instead of guessing. The README's worked example, an e-commerce schema generated by Claude Code with and without the server enabled, reports four times as many constraints, 55 percent more indexes including partial and expression indexes, PG17-recommended patterns, use of GENERATED ALWAYS AS IDENTITY and NULLS NOT DISTINCT, and cleaner naming and documentation.

Key capabilities

  • Version-aware semantic search across the official PostgreSQL manual, with TimescaleDB and PostGIS manuals also indexed.
  • Curated, opinionated Postgres best-practice skills installed with npx skills add timescale/pg-aiguide --skill postgres, or interactively via npx skills add timescale/pg-aiguide.
  • Public MCP server at https://mcp.tigerdata.com/docs, added to any agent through a JSON mcpServers entry named pg-aiguide.
  • Claude Code plugin installation through claude plugin marketplace add timescale/pg-aiguide followed by claude plugin install pg@aiguide.
  • Extension ecosystem documentation, starting with TimescaleDB, with more extensions stated as coming soon.
  • One-click install badges for Cursor, VS Code, VS Code Insiders, Visual Studio, and Goose.
  • Documented schema-generation improvements including more constraints, partial and expression indexes, and modern identity and null-handling syntax.

Who uses it and how

  • Developers running Claude Code who want Postgres guidance delivered through Claude's native skill support rather than pasted context.
  • Teams working across several agents, since the same skills and MCP endpoint serve Cursor, Codex, Gemini CLI, VS Code, and other agentskills.io clients.
  • Engineers writing schema DDL, where the README's comparison shows the largest gains in constraint and index coverage.
  • Teams already on TimescaleDB or PostGIS, who gain extension-specific documentation alongside core PostgreSQL manuals.
  • Individual developers who want the hosted endpoint without running any infrastructure of their own.

Getting started

Install the skills with npx skills add timescale/pg-aiguide --skill postgres, or add the public MCP server by pointing an agent at https://mcp.tigerdata.com/docs. Claude Code users can instead run claude plugin marketplace add timescale/pg-aiguide and then claude plugin install pg@aiguide.

How it compares

No paid products are listed among the facts, and no directly comparable PostgreSQL knowledge server is named, so pg-aiguide stands alone in this registry. It belongs to the category of documentation and knowledge-base tooling, but its delivery mechanism is an MCP endpoint and installable agent skills rather than a browsable site or a search UI for humans.

When to use it — and when not

Use it when AI assistants are already part of a Postgres workflow and their output needs to be grounded in current, versioned documentation; the hosted MCP server means no database, storage, or mail service to operate. Skip it if the work is non-Postgres, if the team does not use AI coding agents at all, or if only core PostgreSQL matters and extension coverage does — the README states extension documentation starts with TimescaleDB and that more is coming soon. One limitation worth noting: the README documents no self-hosted deployment path for the MCP server, so the hosted endpoint is the only route described.

project readme (upstream, from github) — read inline

pg-aiguide

AI-optimized PostgreSQL expertise for coding assistants

pg-aiguide helps AI coding tools write dramatically better PostgreSQL code. It provides:

  • Semantic search across the official PostgreSQL manual (version-aware)
  • AI-optimized “skills” — curated, opinionated Postgres best practices used automatically by AI agents
  • Extension ecosystem docs, starting with TimescaleDB, with more coming soon

Use it as:

  • Agent Skills via npx skills — works with Claude Code, Cursor, Codex, Gemini CLI, and 40+ other agents
  • a public MCP server that can be used with any AI coding agent, or
  • a Claude Code plugin optimized for use with Claude's native skill support.

⭐ Why pg-aiguide?

AI coding tools often generate Postgres code that is:

  • outdated
  • missing constraints and indexes
  • unaware of modern PG features
  • inconsistent with real-world best practices

pg-aiguide fixes that by giving AI agents deep, versioned PostgreSQL knowledge and proven patterns.

See the difference

https://github.com/user-attachments/assets/5a426381-09b5-4635-9050-f55422253a3d

Video Transcript

Prompt given to Claude Code:

Please describe the schema you would create for an e-commerce website two times, first with the tiger mcp server disabled, then with the tiger mcp server enabled. For each time, write the schema to its own file in the current working directory. Then compare the two files and let me know which approach generated the better schema, using both qualitative and quantitative reasons. For this example, only use standard Postgres.

Result (summarized):

  • 4× more constraints
  • 55% more indexes (including partial/expression indexes)
  • PG17-recommended patterns
  • Modern features (GENERATED ALWAYS AS IDENTITY, NULLS NOT DISTINCT)
  • Cleaner naming & documentation

Conclusion: pg-aiguide produces more robust, performant, maintainable schemas.

🚀 Quickstart

Agent Skills

Install curated PostgreSQL best-practice skills for your AI coding agent:

npx skills add timescale/pg-aiguide --skill postgres

Or pick individual skills interactively:

npx skills add timescale/pg-aiguide

Works with Claude Code, Cursor, Codex, Gemini CLI, VS Code, and 40+ other agents.

For even deeper PostgreSQL knowledge, also add the MCP server to give your agent semantic search over the official PostgreSQL, TimescaleDB, and PostGIS manuals.

MCP Server

For semantic search over PostgreSQL, TimescaleDB, and PostGIS documentation, add the public MCP server:

https://mcp.tigerdata.com/docs

Manual MCP configuration using JSON
{
  "mcpServers": {
    "pg-aiguide": {
      "url": "https://mcp.tigerdata.com/docs"
    }
  }
}

Or it can be used as a Claude Code Plugin:

claude plugin marketplace add timescale/pg-aiguide
claude plugin install pg@aiguide
Install by environment

Install in Cursor Install in VS Code Install in VS Code Insiders Install in Visual Studio Install in Goose Add MCP Server pg-aiguide to LM Studio

Claude Code

This repo serves as a claude code marketplace plugin. To install, run:

claude plugin marketplace add timescale/pg-aiguide
claude plugin install pg@aiguide

This plugin uses the skills available in the skills directory as well as our publicly available MCP server endpoint hosted by TigerData for searching PostgreSQL documentation.

Codex

Run the following to add the MCP server to codex:

codex mcp add --url "https://mcp.tigerdata.com/docs" pg-aiguide
Cursor

One-click install:

Install MCP Server

Or add the following to .cursor/mcp.json

{
  "mcpServers": {
    "pg-aiguide": {
      "url": "https://mcp.tigerdata.com/docs"
    }
  }
}
Gemini CLI

Run the following to add the MCP server to Gemini CLI:

gemini mcp add -s user pg-aiguide "https://mcp.tigerdata.com/docs" -t http
OpenCode

Add the following to your global OpenCode config file (~/.config/opencode/opencode.json), or to a project level opencode.json. See the OpenCode config docs for more about file locations, and the MCP server docs for more about the mcp options.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "pg-aiguide": {
      "type": "remote",
      "url": "https://mcp.tigerdata.com/docs"
    }
  }
}

Add use pg-aiguide to your prompts to use the pg-aiguide tools.

Visual Studio

Click the button to install:

Install in Visual Studio

VS Code

Click the button to install:

Install in VS Code

Alternatively, run the following to add the MCP server to VS Code:

code --add-mcp '{"name":"pg-aiguide","type":"http","url":"https://mcp.tigerdata.com/docs"}'
VS Code Insiders

Click the button to install:

Install in VS Code Insiders

Alternatively, run the following to add the MCP server to VS Code Insiders:

code-insiders --add-mcp '{"name":"pg-aiguide","type":"http","url":"https://mcp.tigerdata.com/docs"}'
Windsurf

Add the following to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pg-aiguide": {
      "serverUrl": "https://mcp.tigerdata.com/docs"
    }
  }
}

💡 Your First Prompt

Once installed, pg-aiguide can answer Postgres questions or design schemas.

Simple schema example prompt

Create a Postgres table schema for storing usernames and unique email addresses.

Complex schema example prompt

You are a senior software engineer. You are given a task to generate a Postgres schema for an IoT device company. The devices collect environmental data on a factory floor. The data includes temperature, humidity, pressure, as the main data points as well as other measurements that vary from device to device. Each device has a unique id and a human-readable name. We want to record the time the data was collected as well. Analysis for recent data includes finding outliers and anomalies based on measurements, as well as analyzing the data of particular devices for ad-hoc analysis. Historical data analysis includes analyzing the history of data for one device or getting statistics for all devices over long periods of time.

Features

Documentation Search (MCP Tools)

  • search_docs Unified search tool supporting semantic (vector similarity) and keyword (BM25) search across multiple documentation sources:
    • postgres - Official PostgreSQL manual, scoped by version
    • tiger - Tiger Data's documentation (TimescaleDB and ecosystem)
    • postgis - PostGIS spatial extension documentation

Skills (AI-Optimized Best Practices)

  • view_skill
    Exposes curated, opinionated PostgreSQL best-practice skills used automatically by AI coding assistants.

    These skills provide guidance on:

    • Schema design
    • Indexing strategies
    • Data types
    • Data integrity and constraints
    • Naming conventions
    • Performance tuning
    • Modern PostgreSQL features

🔌 Ecosystem Documentation

Supported today:

  • TimescaleDB (docs + skills)
  • PostGIS (docs)

Coming soon:

  • pgvector

We welcome contributions for additional extensions and tools.

🛠 Development

See DEVELOPMENT.md for:

  • running the MCP server locally
  • adding new skills
  • adding new docs

🤝 Contributing

We welcome:

  • new Postgres best-practice skills
  • additional documentation corpora
  • search quality improvements
  • bug reports and feature ideas

📄 License

Apache 2.0

Frequently asked questions

Is pg-aiguide free to use?

pg-aiguide is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does pg-aiguide do?

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

What is pg-aiguide written in?

pg-aiguide is primarily written in Python. Its source is publicly available at https://github.com/timescale/pg-aiguide, and it has 1,881 GitHub stars.