PostgreSQL Multi-Schema MCP Server
PostgreSQL マルチスキーマ MCP サーバー
強化されたマルチスキーマサポートを備えたPostgreSQLデータベースへの読み取り専用アクセスを提供するモデルコンテキストプロトコル(CMP)サーバー。このサーバーにより、LLMは複数の名前空間にまたがるデータベーススキーマを検査し、スキーマの分離を維持しながら読み取り専用クエリを実行できます。
主な特徴
マルチスキーマサポート: コマンドライン構成を通じて公開するスキーマを明示的に指定する
スキーマ分離: サーバーの起動時にリストされた承認済みスキーマのみへの厳格なアクセス制御
クロススキーマ検出: スキーマ境界を維持しながら、複数のスキーマにまたがるテーブルの統合ビュー
メタデータセキュリティ: システムカタログをフィルタリングして、指定されたスキーマ内のユーザー定義テーブルのみを公開します。
Related MCP server: PostgreSQL MCP Server
コンポーネント
ツール
クエリ
接続されたデータベースに対して読み取り専用のSQLクエリを実行する
入力:
sql(文字列): 実行するSQLクエリすべてのクエリは読み取り専用トランザクション内で実行されます
search_path 制限を通じて維持されるスキーマコンテキスト
リソース
サーバーは、承認されたスキーマ全体の各テーブルのスキーマ情報を提供します。
テーブルスキーマ(
postgres://<host>/<db_schema>/<table>/schema)各テーブルのJSONスキーマ情報
列名、データ型、型修飾子が含まれます
データベースのメタデータから自動的に検出
明示的なスキーマ許可リストによるマルチスキーマのサポート
使用法
サーバーはデータベース URL を必要とし、公開するスキーマのコンマ区切りリストを受け入れます。
npx -y mcp-server-postgres-multi-schema <database-url> [schemas]database-url : PostgreSQL接続文字列(例:
postgresql://localhost/mydb)schemas : 公開するスキーマのコンマ区切りリスト (指定されていない場合はデフォルトで 'public' になります)
例
# Connect with default public schema
npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb
# Connect with multiple schemas
npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb public,analytics,stagingClaude Desktopでの使用
claude_desktop_config.jsonの「mcpServers」セクションを設定します。
NPX
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"mcp-server-postgres-multi-schema",
"postgresql://localhost/mydb",
"public,audit"
]
}
}
}ライセンス
このマルチスキーマMCPサーバーはMITライセンスに基づいてライセンスされています。ライセンスファイルの条項に従って、ソフトウェアを使用、変更、および配布することができます。
This server cannot be deployed
Maintenance
Related MCP Connectors
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
Query your Postgres from ChatGPT or Claude without exposing the database or handing over credentials. Run npx boltschema connect next to your database and it dials out over HTTPS — no inbound firewall rule, no open port, works with localhost and VPC-private databases. Read-only is enforced by a SQL guard, a Postgres READ ONLY transaction, and a scoped role generated for you.
Related MCP Servers
- -licenseNot gradedqualityAmaintenanceA Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.109,622 npm90,629MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing LLMs read-only access to PostgreSQL databases for inspecting schemas and executing queries.109,622 npm27MIT
- AlicenseNot gradedqualityDmaintenanceAn enhanced Model Context Protocol server that enables LLMs to inspect database schemas with rich metadata and execute read-only SQL queries with safety checks.90 npm25MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only queries.109,622 npmMIT