PostgreSQL MCP サーバー
PostgreSQLデータベースへの直接クエリ実行機能を提供するモデルコンテキストプロトコル(MCP)サーバーです。このサーバーは、パラメータ化されたクエリと設定可能なタイムアウトをサポートし、PostgreSQLデータベースに対するカスタムSQLクエリ実行を可能にします。このプロジェクトは、Cursor IDEで使用するために特別に設計されています。
前提条件
Node.js >= 18.0.0
PostgreSQL サーバー (ターゲット データベース操作用)
対象のPostgreSQLインスタンスへのネットワークアクセス
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の PostgreSQL データベース クエリ サーバーを自動的にインストールするには:
手動インストール
リポジトリをクローンする
依存関係をインストールします:
npm installサーバーを構築します。
npm run buildMCP 設定ファイルに追加:
{ "mcpServers": { "postgresql-mcp": { "command": "node", "args": ["/Users/1Levick3/Desktop/postgresql-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [], "env": { "POSTGRES_CONNECTION_STRING": "postgresUrl", "POSTGRES_SSL_CERT_PATH": "/Users/1levick3/Desktop/root.crt" } } } }
発達
npm run dev
- ホットリロードで開発サーバーを起動するnpm run lint
- ESLint を実行するnpm test
- テストを実行する
セキュリティに関する考慮事項
接続セキュリティ
接続プールを使用する
接続タイムアウトを実装する
接続文字列を検証する
SSL/TLS接続をサポート
貢献
リポジトリをフォークする
機能ブランチを作成する
変更をコミットする
ブランチにプッシュする
プルリクエストを作成する
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
セットアップの分析、問題のデバッグ、スキーマの管理、データの移行、パフォーマンスの監視のために PostgreSQL データベースとの対話を可能にするモデル コンテキスト プロトコル サーバー。
Related MCP Servers
- -securityFlicense-qualityA 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 -6088
- AsecurityAlicenseAqualityA 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 -181,751126AGPL 3.0
- -securityFlicense-qualityA Model Context Protocol server that enables performing PostgreSQL database operations (create, read, update, delete) on User and Post entities through MCP tools.Last updated -
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.Last updated -22MIT License