pg-aiguide

MCP.Pizza Chef: timescale

This tool gives your AI coding assistant deep, current knowledge of PostgreSQL so it stops writing outdated or incomplete database code. It searches the official PostgreSQL manual, plus documentation for extensions like TimescaleDB, and applies proven best practices automatically, such as adding the right constraints, choosing efficient indexes, and using modern PostgreSQL features. It works with Claude Code, Cursor, VS Code, Windsurf, Goose, Codex, and Gemini CLI, and the hosted version needs no API key or account to use.

Coding
Data

Use This MCP server To

Design a database table with proper constraints and indexes Look up official PostgreSQL documentation without leaving my coding assistant Catch missing indexes or constraints before they cause problems Use current PostgreSQL features instead of outdated advice Set up a TimescaleDB table for time-series data correctly Compare two database designs and pick the stronger one

README

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

how-to-train-your-agent.mp4
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.

pg-aiguide FAQ

Can I use this to design a better database table for my app?
Yes — it gives your AI assistant proven PostgreSQL patterns, like the right constraints and indexes, so the table it designs is more solid from the start.
Can I use this to look up PostgreSQL documentation without leaving my coding assistant?
Yes — it can search the official PostgreSQL manual, plus documentation for extensions like TimescaleDB and PostGIS, and bring the answer straight into your conversation.
Do I need an account or an API key to use it?
No. The hosted version is a free public address you point your app to, with no sign-up or key required.
Which apps can I use this with?
It works with Cursor, VS Code, Claude Code, Windsurf, Goose, and Codex, among others.
How hard is it to set up?
For most apps, you paste one small snippet into your settings, or click a single install link if your app offers one, with no coding required.
Does this work with assistants built on Claude, Gemini, or OpenAI's models?
Yes — it connects through your coding app rather than any one chat app, so it works across assistants built on Claude, Gemini, and OpenAI's models.
Will it change my database for me?
No. It gives your AI assistant knowledge and suggestions; you, or your assistant with your approval, still make the actual changes to your database.
Do I need to know PostgreSQL myself to benefit from this?
No. It is designed to make your AI assistant produce better database code, so you benefit even if you do not know much PostgreSQL yourself.