pg-aiguide

Searches versioned PostgreSQL, TimescaleDB and PostGIS manuals and serves Postgres best-practice guides

Official · Tiger Data TypeScript Remote (hosted) · Streamable HTTPLocal · stdio DatabasesDeveloper tools

72 popularity score ★ 1.9k ↓ 162/wk

Connect your client

Remote (hosted)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Codexterminal
codex mcp add --url "https://mcp.tigerdata.com/docs" pg-aiguide
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "pg-aiguide": {
      "url": "https://mcp.tigerdata.com/docs"
    }
  }
}
VS Codeterminal
code --add-mcp '{"name":"pg-aiguide","type":"http","url":"https://mcp.tigerdata.com/docs"}'
Claude CodeTerminal
claude mcp add --transport http pg-aiguide https://mcp.tigerdata.com/docs
Gemini CLIterminal
gemini mcp add -s user pg-aiguide "https://mcp.tigerdata.com/docs" -t http
opencode~/.config/opencode/opencode.json or a project opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "pg-aiguide": {
      "type": "remote",
      "url": "https://mcp.tigerdata.com/docs"
    }
  }
}
windsurf~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "pg-aiguide": {
      "serverUrl": "https://mcp.tigerdata.com/docs"
    }
  }
}
Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs PGHOST, PGDATABASE, PGUSER, PGPASSWORD, OPENAI_API_KEY. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add pg-aiguide -e PGHOST=<PGHOST> -e PGDATABASE=<PGDATABASE> -e PGUSER=<PGUSER> -e PGPASSWORD=<PGPASSWORD> -e OPENAI_API_KEY=<OPENAI_API_KEY> -- npx -y @tigerdata/pg-aiguide stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "npx",
      "args": [
        "-y",
        "@tigerdata/pg-aiguide",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "npx",
      "args": [
        "-y",
        "@tigerdata/pg-aiguide",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "pg-aiguide": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tigerdata/pg-aiguide",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.pg-aiguide]
command = "npx"
args = ["-y", "@tigerdata/pg-aiguide", "stdio"]

[mcp_servers.pg-aiguide.env]
PGHOST = "<PGHOST>"
PGDATABASE = "<PGDATABASE>"
PGUSER = "<PGUSER>"
PGPASSWORD = "<PGPASSWORD>"
OPENAI_API_KEY = "<OPENAI_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e PGHOST=<PGHOST> -e PGDATABASE=<PGDATABASE> -e PGUSER=<PGUSER> -e PGPASSWORD=<PGPASSWORD> -e OPENAI_API_KEY=<OPENAI_API_KEY> pg-aiguide npx -- -y @tigerdata/pg-aiguide stdio
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs PGHOST, PGDATABASE, PGUSER, PGPASSWORD, OPENAI_API_KEY. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/timescale/pg-aiguide.git
cd pg-aiguide
./bun i
Claude CodeTerminal
claude mcp add pg-aiguide -e PGHOST=<PGHOST> -e PGDATABASE=<PGDATABASE> -e PGUSER=<PGUSER> -e PGPASSWORD=<PGPASSWORD> -e OPENAI_API_KEY=<OPENAI_API_KEY> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js' stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "pg-aiguide": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js",
        "stdio"
      ],
      "env": {
        "PGHOST": "<PGHOST>",
        "PGDATABASE": "<PGDATABASE>",
        "PGUSER": "<PGUSER>",
        "PGPASSWORD": "<PGPASSWORD>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.pg-aiguide]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/index.js", "stdio"]

[mcp_servers.pg-aiguide.env]
PGHOST = "<PGHOST>"
PGDATABASE = "<PGDATABASE>"
PGUSER = "<PGUSER>"
PGPASSWORD = "<PGPASSWORD>"
OPENAI_API_KEY = "<OPENAI_API_KEY>"
Gemini CLITerminal
gemini mcp add --scope user -e PGHOST=<PGHOST> -e PGDATABASE=<PGDATABASE> -e PGUSER=<PGUSER> -e PGPASSWORD=<PGPASSWORD> -e OPENAI_API_KEY=<OPENAI_API_KEY> pg-aiguide node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js' stdio

Settings 8

PGHOST Required: Host of the pgvector database holding the loaded docs (self-hosted only).
PGDATABASE Required: Name of that database.
PGUSER Required: Database user; a read-only user is enough.
PGPASSWORD Required: Password for that user.
OPENAI_API_KEY Required: OpenAI key used to embed search queries.
PGPORT Optional: Database port.
DB_SCHEMA Optional: Schema holding the docs tables; defaults to docs.
DISABLE_MCP_SKILLS Optional: Set to 1 or true to remove view_skill and the skill prompts.

What it does

pg-aiguide is Tiger Data's (formerly Timescale) documentation server for coding assistants that write PostgreSQL. It has two tools. search_docs looks up passages in one documentation set at a time: the PostgreSQL manual for versions 14 to 18, PostGIS 3.3 to 3.6, or Tiger Data's own TimescaleDB and Tiger Cloud docs. It can match by keyword (BM25), by meaning (vector similarity), or blend the two. view_skill returns curated guidance documents on topics such as schema design, indexes, data types, constraints, naming, performance, exploring an existing schema and setting up TimescaleDB hypertables.

Most people use the free hosted endpoint at https://mcp.tigerdata.com/docs, which Tiger Data runs. You can also run it yourself from the npm package or a clone, but then you need your own pgvector database with the docs loaded into it, plus an OpenAI key for query embeddings. The same repository also ships the guides as agent skills and as a Claude Code plugin, so you can use them without the MCP server.

Some things the README leaves out, checked in the v0.6.1 source: search_docs takes a single source value that names both the manual and its version (postgres_14 to postgres_18, postgis_3.3 to postgis_3.6, or tiger). It returns 20 matches by default, and the code sets no upper limit on limit. semanticWeight defaults to 0.7, so searches lean toward meaning-based matches. Self-hosted, queries are embedded with OpenAI's text-embedding-3-small model.

What it needs

To run it yourselfNode.js

Hosted: an MCP client that can connect to a remote HTTP server. No account or key is needed. To run it yourself: Node.js, a PostgreSQL database with the pgvector extension, and the documentation scraped, embedded and loaded into it by following the repository's ingest directions (the database starts out empty). Embeddings need an OpenAI API key. Building from source uses the repo's ./bun script.

Limits

It searches only the bundled documentation sets: the PostgreSQL manual for versions 14 to 18, PostGIS 3.3 to 3.6, and Tiger Data's TimescaleDB and Tiger Cloud docs. Other versions and other extensions are not covered, and the README lists pgvector docs as still to come. It never connects to your own database or runs SQL. view_skill disappears when skills are turned off (disable_mcp_skills=1 on the hosted URL, DISABLE_MCP_SKILLS=1 for stdio), and the API docs say it is off in the Claude Code plugin, which loads the skills directly. A self-hosted copy returns nothing useful until you have loaded the docs yourself.

Who it suits

It suits developers who want their assistant to check the right Postgres manual version, or TimescaleDB and PostGIS docs, before writing schemas and queries. The hosted endpoint needs no key and nothing installed, so that is the easy route. Self-hosting is a real project (your own pgvector database, a docs load, an OpenAI key), so it makes sense only if you have to keep queries off Tiger Data's servers. It only looks up documentation. To inspect or change a live database, pair it with a database server.

Tools 2

search_docs
Searches one documentation set (PostgreSQL 14-18, PostGIS 3.3-3.6, or Tiger/TimescaleDB) by keyword, meaning or both
view_skill
Returns a curated Postgres or TimescaleDB best-practice guide by name, or a file inside it

Similar servers