pg-aiguide

io.github.timescale/pg-aiguide

About pg-aiguide

pg-aiguide is an MCP server published by the GitHub account timescale. Comprehensive PostgreSQL documentation and best practices, including ecosystem tools

It runs on your own machine: your AI client starts it from the npm package @tigerdata/pg-aiguide at version 0.6.1, or you can connect to the hosted version instead.

It asks for 7 secrets: OPENAI_API_KEY, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE and DB_SCHEMA. Give it a key with the least access that still works.

Version 0.6.1 was published on 4 September 2026, and the source code is public, so you can read it before installing.

Written from the registry entry. 10 automated checks on the registry entry and the package code: 8 pass, 1 warn, 0 fail, 1 info. How we check.

What it asks for

VariableRequiredSecretDescription
OPENAI_API_KEYYesYesYour API key for text embeddings via OpenAI
PGHOSTYesYesPostgreSQL host to connect to
PGPORTYesYesPostgreSQL port to connect to
PGUSERYesYesPostgreSQL user to connect as
PGPASSWORDYesYesPostgreSQL password to connect with
PGDATABASEYesYesPostgreSQL database to connect to
DB_SCHEMANoYesPostgreSQL database schema to use

Checks

CheckResultDetail
Source repository linkedPasshttps://github.com/timescale/pg-aiguide
Version pinnedPassEvery package has an explicit version
Remote uses HTTPSPassAll remote endpoints use https://
Secrets requestedWarnAsks for 7 secrets: OPENAI_API_KEY, PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE, DB_SCHEMA
Known package registryPassAll packages come from npm, PyPI, OCI, NuGet or MCPB
Namespace ownershipInfoName verified via GitHub account timescale
Registry text aimed at the AIPassDescription and settings contain no hidden characters or instructions to the AI
Install scriptsPass@tigerdata/pg-aiguide@0.6.1 runs nothing at install
Code red flagsPassRead 19 files in @tigerdata/pg-aiguide@0.6.1: no obfuscation, encoded execution, credential reads or data-collection endpoints found
Text aimed at the AIPassNo hidden characters or instructions to the AI in 19 files, including comments and the README

Code review: Pass, with notes

We read all 993 lines in 17 files of @tigerdata/pg-aiguide 0.6.1 on 2026-10-31, without running it.

Search tool over PostgreSQL, PostGIS and TimescaleDB documentation, read-only. When run yourself, your search text goes to your Postgres docs database and (for semantic search, the default) to OpenAI to build an embedding. The skill texts it serves come from a separate library that was not part of this review.

What we found

  • Note Unless semanticWeight is 0, every search query is sent to OpenAI to make an embedding. Running it locally needs your own OPENAI_API_KEY and a Postgres loaded with the docs corpus; most users use the hosted endpoint instead. dist/apis/searchDocs.js:95-101
  • Note The view_skill tool, its skill list (appended to the tool description) and the MCP prompts come from @tigerdata/mcp-boilerplate/skills, a dependency; that AI-facing text is not in this package and was not reviewed here. dist/apis/index.js:6-11, dist/prompts/index.js:2
  • Info SQL interpolates schema and table prefix, but schema is validated against ^[a-z_][a-z0-9_$]{0,62}$ (config.js:6-25) and the prefix comes from a fixed enum; user text is always a bound parameter. No SQL injection. dist/util/getDocChunkRows.js:4-23
  • Info 5 bun test files are shipped in dist (counted in the line total); they only exercise mocks. dist/*.test.js
  • Info No package.json in the reviewed copy; dependencies are taken from imports. No obfuscation, install hooks, dynamic code, child_process or hard-coded secrets. package
Talks toPostgreSQL server from PG* env vars (pg Pool defaults): the search query text (keyword search) or its embedding vector, plus version/limit, as bound parameters (when search_docs is called)
api.openai.com (via @ai-sdk/openai): the search query text, to create a text-embedding-3-small embedding (when search_docs is called with semanticWeight > 0 (default 0.7, so most calls))
OpenTelemetry/Logfire exporter (configured in @tigerdata/mcp-boilerplate, not in this package): span attributes: result count and top-3 result ids and scores (no document content) (when a tracer is configured)
Keys and settingsPGHOST / PGUSER / PGPASSWORD / PGDATABASE / PGPORT (read by pg): the configured PostgreSQL server
OPENAI_API_KEY (read by @ai-sdk/openai): api.openai.com
DB_SCHEMA: local (schema name, strictly validated)
DISABLE_MCP_SKILLS: local (hides view_skill tool)
NODE_ENV: local (DNS-rebinding protection on unless production)
Files on your machineLoads .env via 'dotenv/config'. No other file access in this package (skills are loaded by the @tigerdata/mcp-boilerplate dependency).
Runs programsNone in this package. cliEntrypoint from the boilerplate dependency launches stdio.js or httpServer.js (its own files).
TelemetryNo telemetry of its own. It records result ids/scores on an OpenTelemetry span if the host app configured a tracer (searchDocs.js:85-94); with no tracer this is a no-op.
Toolssearch_docs, view_skill
Tool descriptionsclean

This covers the package's own code only, not the 8 packages it depends on (@tigerdata/mcp-boilerplate, @ai-sdk/openai, ai, @opentelemetry/api, pg, zod, dotenv, bun:test (test files only)), and not the hosted version, which runs code we cannot see. A new version drops this review until we read it again.

Popularity & health: 73 / 100

Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.

Popularity23 / 40

1,879 GitHub stars, 115 downloads last week, 1 Hacker News post (3 points). Best two of the three, each on a log scale.

Activity23 / 25

Last push 2026-10-28, last release 2026-09-04, 28 commits in 90 days.

Issue health11 / 15

14 closed of 20 issues.

Our checks16 / 20

1 warning, each costing a fifth.

120 forks, 91 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.

What people say

1 Hacker News thread linking to the source code. We link to them and copy nothing.

Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.

Facts

Registry nameio.github.timescale/pg-aiguide
PublisherGitHub account timescale
How the name is verifiedName verified via GitHub account timescale. The registry ties the name prefix to that account or domain; it does not check the code.
TypeLocal package and a hosted remote
Packagesnpm @tigerdata/pg-aiguide 0.6.1 (stdio)
oci ghcr.io/timescale/pg-aiguide:0.6.1 no version given (stdio)
Remote endpointsstreamable-http https://mcp.tigerdata.com/docs
Version0.6.1
Published
Last updated
Source repositoryhttps://github.com/timescale/pg-aiguide
WebsiteNone linked
CategoryDatabases & data (assigned by keyword rule, not by hand)

Related servers in Databases & data