/ 디렉터리 / 플레이그라운드 / pg-aiguide
● 커뮤니티 timescale ⚡ 바로 사용

pg-aiguide

제작: timescale · timescale/pg-aiguide

Plug PostgreSQL expertise into your coding agent — semantic search over official docs plus curated best-practice skills.

Timescale's pg-aiguide is both a Claude plugin and an MCP server. It exposes semantic search over PostgreSQL/TimescaleDB/PostGIS docs and curated 'skills' (schema design, indexing, data types, performance). Reported 4x more constraints and 55% more indexes in generated schemas.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

pg-aiguide.replay ▶ 준비됨
0/0

설치

클라이언트 선택

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "uvx",
      "args": [
        "pg-aiguide"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "uvx",
      "args": [
        "pg-aiguide"
      ],
      "_inferred": true
    }
  }
}

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "uvx",
      "args": [
        "pg-aiguide"
      ],
      "_inferred": true
    }
  }
}

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "pg-aiguide": {
      "command": "uvx",
      "args": [
        "pg-aiguide"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "pg-aiguide",
      "command": "uvx",
      "args": [
        "pg-aiguide"
      ]
    }
  ]
}

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

~/.config/zed/settings.json
{
  "context_servers": {
    "pg-aiguide": {
      "command": {
        "path": "uvx",
        "args": [
          "pg-aiguide"
        ]
      }
    }
  }
}

context_servers에 추가. 저장 시 Zed가 핫 리로드.

claude mcp add pg-aiguide -- uvx pg-aiguide

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: pg-aiguide

How to get an agent to write a production-grade Postgres schema

👤 Backend engineers starting a new service ⏱ ~20 min intermediate

언제 쓸까: You want generated SQL that actually survives a code review.

사전 조건
  • Add the pg-aiguide MCP — Point client at https://mcp.tigerdata.com/docs or install the Claude plugin
흐름
  1. State the domain
    I need a schema for a multi-tenant SaaS with orgs, users, projects, invites. Before writing SQL, consult pg-aiguide for schema design and identifier best practices.✓ 복사됨
    → Agent cites view_skill output
  2. Review constraints + indexes
    Show me every constraint you added and why. Any redundant indexes?✓ 복사됨
    → Per-index justification
  3. Check modern features
    Use search_docs to verify you're using GENERATED ALWAYS AS IDENTITY (not SERIAL), and NULLS NOT DISTINCT where appropriate.✓ 복사됨
    → Modern idioms applied

결과: Schema with sensible constraints, right identity columns, and indexes you can defend.

함정
  • Agent overuses indexes — write-heavy tables slow down — Ask for workload-aware indexing — tell it the expected reads/writes ratio
함께 쓰기: postgres

How to get expert context when reading an EXPLAIN plan

👤 Devs optimizing a slow query ⏱ ~15 min intermediate

언제 쓸까: You have EXPLAIN ANALYZE output and don't know what's normal.

흐름
  1. Share the plan
    [paste EXPLAIN ANALYZE] — use pg-aiguide to identify what each node does and typical reasons for cost here.✓ 복사됨
    → Node-by-node diagnosis citing docs
  2. Ask for index advice
    Based on the plan, propose one index change. Verify the index type (BTREE vs BRIN vs partial) via pg-aiguide.✓ 복사됨
    → Concrete CREATE INDEX with justification

결과: Plan understood, change defended with docs.

함께 쓰기: postgres

How to pick the right TimescaleDB hypertable settings

👤 Teams doing time-series on Postgres ⏱ ~15 min advanced

언제 쓸까: First hypertable in a new service — many knobs.

흐름
  1. State ingest shape
    I'll ingest ~10k rows/sec of IoT sensor data, queries are last-24h and last-30d aggregates. Consult pg-aiguide for TimescaleDB hypertable chunk interval recommendations.✓ 복사됨
    → Chunk interval + compression policy rationale
  2. Draft the table
    Draft the CREATE TABLE + create_hypertable + compression policy.✓ 복사됨
    → Full DDL

결과: Hypertable config tuned for your ingest rate.

함께 쓰기: postgres

조합

다른 MCP와 조합해 10배 효율

pg-aiguide + postgres

Consult pg-aiguide for best practices, then actually apply them via postgres MCP

Use pg-aiguide to pick the right index for orders.user_id, then apply it via postgres MCP on the dev DB. Show EXPLAIN ANALYZE before/after.✓ 복사됨
pg-aiguide + github

Code-review a schema migration with docs-backed reasoning

Review PR #4421 which adds a new table. Use pg-aiguide to flag any choices that diverge from idiomatic PG 16.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
search_docs query: str, product?: 'postgres'|'timescale'|'postgis', version?: str Look up a specific feature, function, or setting free
view_skill skill: 'schema-design'|'indexing'|'data-types'|'performance' Apply best-practice guidance before writing schema free

비용 및 제한

운영 비용

API 쿼터
Hosted endpoint — reasonable-use rate limits
호출당 토큰
300-1500 tokens per search result
금액
Free
Use view_skill for broad guidance, search_docs only when you need a specific citation.

보안

권한, 시크릿, 파급범위

최소 스코프: None — docs only
자격 증명 저장: None
데이터 외부 송신: Your queries go to mcp.tigerdata.com
절대 부여 금지: Nothing to grant; no DB access

문제 해결

자주 발생하는 오류와 해결

search_docs returns outdated info

Pin version: search_docs(query, version='17') for PG 17 specifics.

Connection to mcp.tigerdata.com fails

Check corporate firewall; fall back to the Claude plugin (local) install.

확인: curl -I https://mcp.tigerdata.com/docs
view_skill returns generic output

Specify the skill slug exactly — unknown slugs fall back to generic summaries.

대안

pg-aiguide 다른 것과 비교

대안언제 쓰나단점/장점
postgres MCPYou need to execute SQL, not just read docsNo curated best-practice layer
Supabase MCPSupabase-specific project managementSupabase-locked

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기