Skip to content
Skillpedia
● Free and open sourceπŸ’»β˜οΈ Local / RemoteπŸ”“ No API keyProgramming

pg-aiguide

Lets your AI agent search the PostgreSQL manual and follow Postgres best practices when it writes schemas and queries.

1.9k stars on GitHubby Timescale (Tiger Data)License Apache-2.0Updated 20 days ago

How to install

This MCP has two ways to run: local or remote.

Pick one below. Local runs on your computer; remote runs in the cloud and needs nothing installed.

Paste in the terminal:

claude mcp add pg-aiguide -e OPENAI_API_KEY="<your value>" -e PGHOST="<your value>" -e PGPORT="<your value>" -e PGUSER="<your value>" -e PGPASSWORD="<your value>" -e PGDATABASE="<your value>" -- npx -y @tigerdata/pg-aiguide

What to fill in

NameWhat it isRequired
OPENAI_API_KEYYour API key for text embeddings via OpenAIYes
PGHOSTPostgreSQL host to connect toYes
PGPORTPostgreSQL port to connect toYes
PGUSERPostgreSQL user to connect asYes
PGPASSWORDPostgreSQL password to connect withYes
PGDATABASEPostgreSQL database to connect toYes
DB_SCHEMAPostgreSQL database schema to useNo

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Create a Postgres table schema for storing usernames and unique email addresses.
Design a Postgres schema for an IoT company that records temperature, humidity and pressure from factory devices.

What it is

pg-aiguide gives your AI coding agent access to the official PostgreSQL manual, TimescaleDB docs and PostGIS docs. It also offers curated best-practice skills for things like schema design, indexing and constraints. The goal is to make the Postgres code your agent writes more complete and up to date.

What it can do

  • search_docs: semantic and keyword search across the PostgreSQL manual (by version), Tiger Data docs and PostGIS docs
  • view_skill: read curated Postgres best-practice skills
  • Skills on schema design, indexing, data types, constraints, naming and performance tuning
  • A skill for exploring an existing PostgreSQL schema

When to use

  • β€ΊWhen you ask your agent to design a database schema and want it to use modern Postgres features.
  • β€ΊWhen you need an answer taken from the official PostgreSQL or TimescaleDB documentation.
  • β€ΊWhen you want to review an existing Postgres schema for missing indexes or constraints.

What you need

Nothing to install for the public server: you add the URL https://mcp.tigerdata.com/docs to your MCP client. Node.js is needed only if you install the skills with npx.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free?

The project is open source under the Apache 2.0 license. The readme does not mention any fees for the public MCP server.

Do I need an API key?

The readme does not mention one. You add the public server URL to your MCP client.

Which agents does it work with?

It works with any MCP client. The readme gives setup steps for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, VS Code, Visual Studio and Windsurf.

Can I use it without MCP?

Yes. The same best-practice skills can be installed with npx skills add timescale/pg-aiguide, or as a Claude Code plugin.

Which documentation does it cover?

The PostgreSQL manual (version-aware), TimescaleDB docs and PostGIS docs. pgvector is listed as coming soon.

Does it connect to my database?

No. It searches documentation and serves best-practice skills. The readme does not describe any connection to your own database.

If it does not work

  • β€ΊIf the tools do not appear, restart your AI app fully after adding the server URL.
  • β€ΊCheck that the URL is exactly https://mcp.tigerdata.com/docs.
  • β€ΊFor the skill install, make sure Node.js is installed so npx works.

5 new skills a week. 1 minute to read.