Skip to main content
Glama
KannaKim

PostgreSQL MCP Server

by KannaKim

PostgreSQL MCPサーバー

PostgreSQL用の汎用Model Context Protocol (MCP) サーバーであり、AIエージェントがPostgreSQLデータベースを安全に調査・クエリできるようにします。

機能

  • list_tables: publicスキーマ内のすべてのテーブルを一覧表示します。

  • get_schema: 特定のテーブルのスキーマ(列、型、NULL許容性)を取得します。

  • run_query: 読み取り専用のSQLクエリ(SELECT/WITHのみ許可)を実行します。大きな応答を避けるため、最大100行の制限があります。

Related MCP server: PostgreSQL MCP Server

前提条件

  • Python 3.13以上

  • uv

  • PostgreSQLデータベース

インストール

リポジトリをクローンした場合は、uvxまたはuv runを使用して直接実行できます。

使用方法

このサーバーを使用するには、DATABASE_URL環境変数を設定する必要があります。

接続文字列の例: postgres://user:password@localhost:5432/mydatabase

直接実行する場合

DATABASE_URL="postgresql://postgres:poggerpogger@localhost:5432/boxboxWeb" uv run main.py

Claude Desktop / MCPクライアントでの使用方法

MCPクライアントの設定(例: Claude Desktopのclaude_desktop_config.json)に以下を追加してください:

{
  "mcpServers": {
    "postgres": {
      "command": "uv",
      "args": [
        "run",
        "/path/to/2025postgresqlmcp/main.py"
      ],
      "env": {
        "DATABASE_URL": "postgres://user:password@localhost:5432/mydatabase"
      }
    }
  }
}
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only SQL queries.
    66,136
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to safely interact with PostgreSQL databases through read-only operations, providing schema discovery, table inspection, and query execution capabilities with structured context awareness.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to safely interact with PostgreSQL databases, perform queries, inspect schemas, and analyze query performance.
    2

View all related MCP servers

Related MCP Connectors

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…

  • Comprehensive PostgreSQL documentation and best practices, including ecosystem tools

View all MCP Connectors

Latest Blog Posts

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/KannaKim/PostgresqlMCPServer'

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