PostgreSQL MCP Server

PostgreSQL 데이터베이스에 대한 읽기 전용 액세스를 제공하여 LLM이 스키마를 검사하고 쿼리를 실행할 수 있도록 합니다.

문서

K_YH mcp-db-server

Introduction

This package is purely experimental and just for fun!

Do not use this code in production or with any critical databases.

This implementation grants full control over the database to the agent. Therefore, it is strongly discouraged to use shared or sensitive databases.

References

This implementation is based on the mcp/postgres Docker image.

Usage

npx @k_yh/mcp-db-server <your-postgresql-url>

For example:

npx @k_yh/mcp-db-server 'postgresql://user:[email protected]:5432/my-db'

To use this with an agent like Claude desktop or Cursor, configure it like so:

{
  "mcpServers": {
    "my-db-server": {
      "command": "npx",
      "args": [
        "-y",
        "@k_yh/mcp-db-server",
        "postgresql://user:password@localhost:5432/my-db"
      ]
    }
  }
}

You can manipulate the database through the agent using your prompt.