SM

sav-maya/postgres-docs-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

0 stars 0 forks 品質 78 トレンド 8MIT

公開オープンソースの MCP サーバーで、PostgreSQL のドキュメントをバージョンアップ

概要

PostgreSQL の公式ドキュメントの公開、オープンソースのモデルコンテキストプロトコルサーバです。 デフォルトでは、現在の安定したリリースにデフォルトで、アーカイブ、ベータ、開発文書を含むすべてのオンラインバージョンを検索または読み込むことができます。 - list versions — オンラインで利用可能なすべてのドキュメント・バージョンを一覧表示 - search docs — 特定のPostgreSQLバージョン内の検索 - get doc page — ドキュメント・ページをMarkdownとして読み、長いページをパジネーションして 読み取り専用のドキュメントサーバです。 それは: - www.postgresql.orgから公開ページのみをフェッチ - PostgreSQLデータベースに接続しません - 資格情報、APIキー、環境変数を必要としません - SQLを実行したり、PostgreSQLプロジェクトを変更することはできません 必要に応じてuvをインストールし、このサーバーを~/.cursor/mcp.jsonに追加します。 ファイルを保存した後、カーソルを再起動します。 最初の起動は、サーバーとその依存関係をダウンロードします。 では、postgres-docs は 3 つのツールで有効になっているように表示されます。 次に、通常、Cursor の質問をしてください.

概要(AI 翻訳)

公開、オープンソースのモデルコンテキストプロトコル 公式、バージョンアップされたサーバー PostgreSQL ドキュメント。

現在の安定したリリースにデフォルトで、すべてのオンラインを検索または読むことができます バージョン—アーカイブ、ベータ、開発文書を含む。

ツール

  • [list_versions — 利用可能なすべてのドキュメントバージョンをオンラインでリストする
  • [search_docs — 特定の PostgreSQL 版内の検索
  • [get_doc_page — ドキュメントページをMarkdownとして読み、パジネーションを 長いページ

アクセスとセキュリティ

読み取り専用のドキュメントサーバです。 それは:

  • [[T3]から公開ページのみをフェッチ
  • PostgreSQLデータベースに接続しない
  • 資格情報、API キー、または環境変数を必要としません
  • SQL を実行したり、PostgreSQL プロジェクトを変更したりすることはできません

カーソルで使用する

必要に応じてUVをインストールします。 このサーバーを[~/.cursor/mcp.jsonに追加します。

ファイルを保存した後、カーソルを再起動します。 最初の起動はサーバーをダウンロードし、 依存関係。 カーソル設定 → ツール & MCP, [postgres-docs] 3つのツールで有効になっています。

次に、通常、Cursor の質問をしてください。 ドキュメンテーション時にツールを呼び出す 必要な。 例えば:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

PostgreSQL Docs MCP

A public, open-source Model Context Protocol server for the official, versioned PostgreSQL documentation.

It defaults to the current stable release and can search or read every online version—including archived, beta, and development documentation.

Tools

  • list_versions — list every documentation version available online
  • search_docs — search within a specific PostgreSQL version
  • get_doc_page — read a documentation page as Markdown, with pagination for long pages

Access and security

This is a read-only documentation server. It:

  • fetches only public pages from www.postgresql.org
  • never connects to a PostgreSQL database
  • does not need credentials, API keys, or environment variables
  • cannot execute SQL or modify PostgreSQL projects

Use it in Cursor

Install uv if needed, then add this server to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "postgres-docs": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/sav-maya/postgres-docs-mcp",
        "postgres-docs-mcp"
      ]
    }
  }
}

Restart Cursor after saving the file. The first launch downloads the server and its dependencies. In Cursor Settings → Tools & MCP, postgres-docs should appear as enabled with three tools.

Then ask Cursor questions normally. It calls the tools when documentation is needed. For example:

  • Which PostgreSQL documentation versions are available?
  • Using the PostgreSQL 18 docs, explain logical replication conflicts.
  • Look up CREATE PUBLICATION in PostgreSQL 15 and cite the source page.
  • What changed in the JSON functions between PostgreSQL 16 and 18?

The version defaults to current. Mention a version in your prompt when you need behavior from a specific release.

Run locally

Requires Python 3.10+ and uv.

git clone https://github.com/sav-maya/postgres-docs-mcp.git
cd postgres-docs-mcp
uv sync
uv run postgres-docs-mcp

To make Cursor launch the local clone, use an absolute path:

{
  "mcpServers": {
    "postgres-docs": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/postgres-docs-mcp",
        "run",
        "postgres-docs-mcp"
      ]
    }
  }
}

The server follows the official Build an MCP server guide: Python 3.10+, MCP Python SDK 2.x, typed @mcp.tool() functions, httpx2, and stdio transport. It never writes logs to stdout; logs go to stderr so they cannot corrupt MCP JSON-RPC messages.

Troubleshooting

  • Server does not appear: Restart Cursor, then check Cursor Settings → Tools & MCP for an error beside postgres-docs.
  • uvx is not found: Install uv, or replace "uvx" in the configuration
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/sav-maya/postgres-docs-mcp postgres-docs-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "postgres-docs": { "command": "uvx", "args": [ "--from", "git+https://github.com/sav-maya/postgres-docs-mcp", "postgres-docs-mcp" ] } } }