MCP Postgres Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.

MCP Postgres サーバー

このサーバーは、Cursor 用のモデル コンテキスト プロトコル (MCP) を実装し、PostgreSQL データベースをモデル コンテキストのストレージとして使用できるようにします。

前提条件

  • ドッカー
  • Dockerコンポーズ

インストールと起動

  1. このリポジトリをクローンする
  2. Docker Compose を使用してサーバーを起動します。
docker-compose up -d

カーソル内の設定

  1. オープンカーソル
  2. 設定 > MCP へ移動
  3. 次の設定で新しい接続を追加します。
    • 名前: MCP Postgres サーバー
    • タイプ: コマンド
    • コマンド: docker exec -i mcp-postgres-server node dist/index.js

トラブルシューティング

サーバーが正しく起動しない場合は、次の手順に従ってください。

  1. コンテナのログを確認します。
    docker logs mcp-postgres-server
  2. サーバーを再起動するには:
    docker-compose restart

MCP サーバーの機能

MCP PostgreSQL サーバーは、Cursor 用の次のツールを公開します。

  1. postgres_query - 読み取り専用のSQLクエリを実行する
  2. postgres_list_tables - データベース内のすべてのテーブルを一覧表示する
  3. postgres_describe_table - 特定のテーブルのスキーマを取得する

これらのツールにより、Cursor はデータベースを安全に探索およびクエリできます。

-
security - not tested
F
license - not found
-
quality - not tested

Cursor 用のモデル コンテキスト プロトコル (MCP) を実装したサーバー。これにより、PostgreSQL データベースをモデル コンテキストのストレージとして使用し、安全なデータベースの探索とクエリが可能になります。

  1. Prérequis
    1. Installation et démarrage
      1. Configuration dans Cursor
        1. Résolution des problèmes
          1. Fonctionnalités du serveur MCP
            ID: 2xjj29nqrm