PostgreSQL MCP Server
PostgreSQL
PostgreSQLデータベースへの読み取り専用アクセスを提供するモデルコンテキストプロトコル(CMP)サーバー。このサーバーにより、LLMはデータベーススキーマを検査し、読み取り専用クエリを実行できます。
コンポーネント
ツール
クエリ
接続されたデータベースに対して読み取り専用のSQLクエリを実行する
入力:
sql(文字列): 実行するSQLクエリすべてのクエリは読み取り専用トランザクション内で実行されます
リソース
サーバーは、データベース内の各テーブルのスキーマ情報を提供します。
テーブルスキーマ(
postgres://<host>/<table>/schema)各テーブルのJSONスキーマ情報
列名とデータ型が含まれます
データベースのメタデータから自動的に検出
Related MCP server: PostgreSQL MCP Server
Claude Desktopでの使用
このサーバーを Claude Desktop アプリで使用するには、 claude_desktop_config.jsonの「mcpServers」セクションに次の構成を追加します。
ドッカー
macOSでdockerを実行する場合、サーバーがホストネットワーク(例:localhost)上で実行されている場合はhost.docker.internalを使用します。
ユーザー名/パスワードは
postgresql://user:password@host:port/db-nameのように postgresql の URL に追加できます。
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://host.docker.internal:5432/mydb"]
}
}
}NPX
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
]
}
}
}/mydbデータベース名に置き換えます。
建物
ドッカー:
docker build -t mcp/postgres -f src/postgres/Dockerfile . ライセンス
このMCPサーバーはMITライセンスに基づいてライセンスされています。つまり、MITライセンスの条件に従って、ソフトウェアを自由に使用、改変、配布することができます。詳細については、プロジェクトリポジトリのLICENSEファイルをご覧ください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.66,13689,748MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server providing LLMs read-only access to PostgreSQL databases for inspecting schemas and executing queries.66,13627MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.22MIT
- 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.66,136MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools
MCP server for managing Prisma Postgres.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/vinsidious/mcp-pg-schema'
If you have feedback or need assistance with the MCP directory API, please join our Discord server