P

Postgresql Documentation Portal

Boost productivity using this postgresql, documentation, skills, writing. Includes structured workflows, validation checks, and reusable patterns for database.

MCPClipticsdatabasev1.0.0MIT
0 views0 copies

PostgreSQL Documentation Portal

Access comprehensive PostgreSQL documentation and best-practice guidance directly within Claude Code for writing better Postgres queries and schema designs.

When to Use This MCP Server

Connect this server when you need to:

  • Look up PostgreSQL syntax, functions, data types, or configuration parameters without leaving your coding session to search external documentation
  • Get expert guidance on PostgreSQL performance tuning, index strategies, and query optimization while actively writing database code
  • Validate that your SQL migrations, stored procedures, or schema designs follow PostgreSQL best practices and avoid common anti-patterns

Consider alternatives when:

  • You need to actually execute queries against a live PostgreSQL database, which requires the PostgreSQL Integration MCP server instead
  • Your project uses a different database system like MySQL or MongoDB, where PostgreSQL-specific documentation would not apply

Quick Start

Configuration

name: postgresql-documentation-portal type: mcp category: database

Example Connection

claude mcp:connect postgresql-documentation-portal

Available Tools

search-docs:       Search PostgreSQL documentation by topic, function name, or keyword
get-syntax:        Retrieve complete syntax reference for any SQL statement or command
best-practices:    Get curated best-practice recommendations for a given database pattern
explain-concept:   Get detailed explanations of PostgreSQL concepts like MVCC, WAL, or TOAST
get-config-help:   Look up postgresql.conf parameters with recommended values and tuning advice

Core Concepts

Documentation Server Overview

AspectDetails
TransportRemote MCP endpoint hosted at https://mcp.tigerdata.com/docs
Content SourceOfficial PostgreSQL documentation plus curated expert guidance
CoveragePostgreSQL 12 through 17, covering all major and minor version differences
Response FormatStructured markdown with code examples, syntax diagrams, and version notes
Update FrequencyDocumentation synced with each PostgreSQL minor and major release

Documentation Access Architecture

Claude Code IDE
    |
    v
[MCP Client] --HTTPS--> [TigerData MCP Endpoint]
                              |
                              v
                     [Documentation Index]
                      /       |        \
               Syntax     Functions   Config
              Reference    Library    Parameters
                      \       |        /
                       [Search Engine]
                              |
                              v
                     [Formatted Response]

Configuration

ParameterTypeDefaultDescription
pg_versionstring17Target PostgreSQL version for version-specific documentation results
include_examplesbooleantrueInclude practical code examples alongside documentation text
max_resultsinteger5Maximum number of documentation sections returned per search query
include_deprecatedbooleanfalseInclude deprecated features and syntax in search results
response_formatstringmarkdownOutput format for documentation content: markdown or plain text

Best Practices

  1. Search Before Writing Complex SQL - Before writing window functions, recursive CTEs, or advanced aggregations, search the documentation for the specific PostgreSQL syntax. Documentation includes edge cases and version-specific behavior that can prevent subtle bugs.

  2. Validate Index Strategies Against Documentation - Use the best-practices tool to verify your indexing approach. PostgreSQL supports B-tree, Hash, GiST, SP-GiST, GIN, and BRIN indexes, and the documentation clarifies which type suits each access pattern.

  3. Check Configuration Parameters During Tuning - When adjusting postgresql.conf settings like shared_buffers, work_mem, or effective_cache_size, use get-config-help to understand the implications of each change. The documentation provides recommended ranges based on available system resources.

  4. Reference Version-Specific Features - Set the pg_version parameter to match your production PostgreSQL version. This ensures you do not accidentally use syntax or features that are unavailable in your deployed environment.

Common Issues

  1. Documentation Returns Generic Results - Use more specific search terms including the exact function name or SQL keyword. Searching for "jsonb_path_query" yields better results than searching for "json query" when you need specific function documentation.

  2. Version Mismatch in Examples - If a code example uses syntax not available in your PostgreSQL version, adjust the pg_version configuration parameter. Features like MERGE (PostgreSQL 15+) or JSON_TABLE (PostgreSQL 17+) are version-gated.

  3. Endpoint Unreachable During Network Outage - The documentation server requires internet connectivity. For offline development scenarios, consider downloading the PostgreSQL documentation locally or bookmarking frequently referenced sections.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates