timescale avatar

Pg Aiguide

timescale/pg-aiguide

pg-aiguide provides AI coding assistants with semantic search across the official PostgreSQL manual (version-aware) and curated, opinionated PostgreSQL best practices through AI-optimized skills that help generate higher-quality database schemas. The server addresses the problem of AI-generated PostgreSQL code being outdated, missing constraints and indexes, and unaware of modern features by delivering deep, versioned PostgreSQL knowledge and proven patterns. It operates as an Agent Skill, public MCP server, or Claude Code plugin and includes ecosystem documentation for extensions like TimescaleDB.

GitHub stars
1.9K
tools
3
auth
Secret needed
transport
STDIO, HTTP
env vars
7
last updated
Sep 4, 2026

Install

From registry metadata
$ npx add-mcp https://mcp.tigerdata.com/docs --name pg-aiguide

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http pg-aiguide https://mcp.tigerdata.com/docs

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 3 tools

Verified live against the running server on Nov 13, 2026.

search_docsSearch documentation with hybrid semantic (vector) and keyword (BM25) search. Use semanticWeight to choose keyword-only (0), semantic-only (1), or a blend; mid values fuse rankings with RRF. Supports Tiger Cloud (TimescaleDB), PostgreSQL, and PostGIS. A hit is one chunk of a p...4 params

Search documentation with hybrid semantic (vector) and keyword (BM25) search. Use semanticWeight to choose keyword-only (0), semantic-only (1), or a blend; mid values fuse rankings with RRF. Supports Tiger Cloud (TimescaleDB), PostgreSQL, and PostGIS. A hit is one chunk of a p...

Parameters* required
limit*value
The maximum number of matches to return. Defaults to 20.
query*string
The search query. Used for BM25 when keyword or hybrid search applies, and for the embedding when semantic or hybrid search applies.
semanticWeight*value
Controls the balance between semantic and keyword search. 0 = keyword only, 0.5 = equal mix, 1 = semantic only. Default is 0.7 (favor semantic search).
source*string
The documentation source to search. "tiger" for Tiger Cloud and TimescaleDB, "postgres" for PostgreSQL, "postgis" for PostGIS spatial extension. Specific versions provided with _X.X suffixes.one of tiger · postgres_14 · postgres_15 · postgres_16 · postgres_17 · postgres_18
view_skillRetrieve detailed skills for TimescaleDB operations and best practices. ## Available Skills <available_skills> [11 ]{name description}: design-postgis-tables Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and...2 params

Retrieve detailed skills for TimescaleDB operations and best practices. ## Available Skills <available_skills> [11 ]{name description}: design-postgis-tables Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and...

Parameters* required
path*string
A relative path to a file or directory within the skill to view. If empty, will view the `SKILL.md` file by default. Use `.` to list the root directory of the skill.
skill_name*string
The name of the skill to browse, or `.` to list all available skills.
get_contextOpens any part of the docs (a section or a whole page) as markdown, with links to move around it. Use it on a search_docs hit before answering from it: a hit is one chunk, and often a fragment (a table row without the header that says which column is which plan, one step of a...3 params

Opens any part of the docs (a section or a whole page) as markdown, with links to move around it. Use it on a search_docs hit before answering from it: a hit is one chunk, and often a fragment (a table row without the header that says which column is which plan, one step of a...

Parameters* required
id*string
Any docs id: a chunk_id or section_id from search_docs, a page_id, or a parent_id / children id from an earlier get_context. A chunk_id returns the section the chunk is in. Give this or url.
part*value
Which part of the text to return when part_count > 1. Defaults to the part holding the chunk you passed, else part 1.
url*string
A docs URL (tigerdata.com/docs, postgresql.org/docs, postgis.net/docs), e.g. a link found in docs text. With a #fragment it returns that section, otherwise the page. Give this or id.

Sponsors

Configuration

OPENAI_API_KEY*secret

Your API key for text embeddings via OpenAI

PGHOST*secret

PostgreSQL host to connect to

PGPORT*secret

PostgreSQL port to connect to

PGUSER*secret

PostgreSQL user to connect as

PGPASSWORD*secret

PostgreSQL password to connect with

PGDATABASE*secret

PostgreSQL database to connect to

DB_SCHEMAsecret

PostgreSQL database schema to use

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

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

Video Transcript

Prompt given to Claude Code:


View the full README on GitHub

Details

Repository
github.com/timescale/pg-aiguide
Category
Databases
Package
@tigerdata/pg-aiguide
Transport
STDIO, HTTP
Auth
Required
Registry
MCP registry, active
Prompts
11
Tools verified
Nov 13, 2026

More from timescale

Related Databases MCP servers

View all
1neondatabase avatarNeonneondatabase/mcp-server-neonOfficial Neon MCP server for managing Neon projects and Lakebase Postgres databases.663stars
2yawlabs avatarPostgreSQL MCP Serveryawlabs/postgres-mcpPostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants10stars
3mistersandfr avatarMistersandfr Supabase Mcp Selfhostedmistersandfr/supabase-mcp-selfhostedManage Supabase projects end to end across database, auth, storage, realtime, and migrations. Moni…7stars
4edelciomolina avatarPostgres MCPedelciomolina/postgres-mcpPostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.5stars
5planetscale avatarPlanetScaleplanetscale/mcp-serverConnect to PlanetScale databases, branches, schema, query insights, and execute SQL0stars
6bluwork avatarPostgres Scout Mcpbluwork/postgres-scout-mcpScout your PostgreSQL databases with AI - safety features, monitoring, and data quality0stars