Atlas / MCP servers / timescale / Pg Aiguide

Pg AiguideCAUTION

mcp/timescale/pg-aiguide

MCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.

Verdict
CAUTION
Grade
B
Trust score
85 /100
Exposed tools
1 1r · 0w · 0d
Transport
streamable-http
License
Apache-2.0
Stars
1,849
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

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:

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.

🚀 Quickstart

Agent S

Read from source at commit e82db42ae9f9OBSERVED · 2026-09-23
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add pg-aiguide --env OPENAI_API_KEY=${OPENAI_API_KEY} --env PGPASSWORD=${PGPASSWORD} -- npx -y @tigerdata/[email protected]
claude-desktop
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "npx",
      "args": [
        "-y",
        "@tigerdata/[email protected]"
      ],
      "env": {
        "OPENAI_API_KEY": "${OPENAI_API_KEY}",
        "PGPASSWORD": "${PGPASSWORD}"
      }
    }
  }
}
03

Exposed tools (1)

1 read · 0 write · 0 destructive.

ToolRiskDescription
view_skillreadRetrieve detailed skills for TimescaleDB operations and best practices.
04

Trust audit

CAUTIONgrade B · trust 85/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (2 observation(s))
Shell
declared (5 observation(s))
Dependencies
not all pinned
Secrets in source
found

Findings (10)

HIGHHard-coded secrets · secret.db_uri · CWE-798, CWE-321
ingest/utils/db.py:18
return f"postgresql://{pg_user}:{encoded_password}@{pg_host}:{pg_port}/{pg_database}"
LOWInventory / provenance · inv.hidden_file · CWE-1104
.env.sample
.env.sample
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.symlink · CWE-1104
skills/postgres/references/backfill-strategies.md
skills/postgres/references/backfill-strategies.md
Why it matters. link not followed
LOWInventory / provenance · inv.symlink · CWE-1104
skills/postgres/references/complete-example.md
skills/postgres/references/complete-example.md
Why it matters. link not followed
LOWInventory / provenance · inv.symlink · CWE-1104
skills/postgres/references/design-postgis-tables.md
skills/postgres/references/design-postgis-tables.md
Why it matters. link not followed
LOWInventory / provenance · inv.symlink · CWE-1104
skills/postgres/references/design-postgres-tables.md
skills/postgres/references/design-postgres-tables.md
Why it matters. link not followed
LOWInventory / provenance · inv.symlink · CWE-1104
skills/postgres/references/find-hypertable-candidates.md
skills/postgres/references/find-hypertable-candidates.md
Why it matters. link not followed
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
ingest/tiger_docs.py:1067
hash_suffix = hashlib.md5(path.encode()).hexdigest()[:8]
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@opentelemetry/api, dotenv, gray-matter, migrate, pg, zod, @biomejs/biome, @types/bun
Why it matters. 13 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.authority_framing · CWE-94, CWE-1427
README.md:256
> You are a senior software engineer. You are given a task to generate a Postgres schema for an IoT device company.

Gates applied: no_behavioural_pass.

Audited 2026-09-23 · audit v0.4.1 · source sha e82db42ae9f9full audit observations/trust-audit/mcp-server/timescale__pg-aiguide.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-23e82db42ae9f9CAUTIONB85source changed, verdict held
06

Questions

What is the Pg Aiguide MCP server?

MCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.

What tools does Pg Aiguide expose?

1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Pg Aiguide safe to connect to an agent?

With care. The audit graded it B (85/100) and found 10 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does Pg Aiguide need?

It reads OPENAI_API_KEY and PGPASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Pg Aiguide run?

It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @tigerdata/pg-aiguide at 0.6.1.

How current is this page?

The grade is for one exact copy of the source (e82db42ae9f9), read on 2026-09-23. The repository is watched and re-audited when it changes.

Advertisement