Skip to main content
Glama

MCP PostgreSQL Server

by a21071

MCP PostgreSQLサーバー

-

MCP ツールを通じて PostgreSQL データベース操作を提供するモデル コンテキスト プロトコル (MCP) サーバー。

特徴

  • User および Post エンティティの CRUD 操作
  • Prisma を使用した型安全なデータベース操作
  • MCP互換ツールインターフェース
  • 型安全性のためにTypeScriptで構築

インストール

  1. リポジトリをクローンする
  2. 依存関係をインストールします:
git clone https://github.com/a21071/mcp-postgres.git cd mcp-postgres npm install
  1. PostgreSQL データベースをセットアップします。
docker-compose up -d
  1. データベースの移行を実行します。
npx prisma migrate dev
  1. プロジェクトをビルドします。
npm run build

使用法

サーバーを実行します。

npm start

利用可能なMCPツール

  • getData : PostgreSQLからユーザーデータを取得する
    { "tableName": "user" }
  • addUserData : データベースに新しいユーザーを追加する
    { "email": "user@example.com", "name": "John Doe", "age": 30 }
  • deleteUserData : ID、メールアドレス、または名前でユーザーを削除する
    { "id": "clxyz...", "email": "user@example.com", "name": "John Doe" }
  • updateUserData : ユーザー情報を更新する
    { "id": "clxyz...", "email": "new@example.com", "name": "New Name" }

データベーススキーマ

サーバーは次の Prisma スキーマを使用します。

model User { id String @id @default(cuid()) email String @unique name String? age Int? createdAt DateTime @default(now()) posts Post[] }

発達

  • 視聴モード:
npm run watch

依存関係

ライセンス

マサチューセッツ工科大学

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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MCP ツールを使用して、User および Post エンティティに対して PostgreSQL データベース操作 (作成、読み取り、更新、削除) を実行できるようにするモデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. インストール
      1. 使用法
        1. 利用可能なMCPツール
      2. データベーススキーマ
        1. 発達
          1. 依存関係
            1. ライセンス

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server providing both read and write access to PostgreSQL databases, enabling LLMs to query data, modify records, and manage database schemas.
                Last updated -
                86
                7
                JavaScript
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.
                Last updated -
                18
                457
                98
                TypeScript
                AGPL 3.0
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.
                Last updated -
                28
                JavaScript
                MIT License
                • Linux
                • Apple
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that enables interaction with PostgreSQL databases for analyzing setups, debugging issues, managing schemas, migrating data, and monitoring performance.
                Last updated -
                1
                0
                TypeScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/a21071/mcp-postgres'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server