local_pgsql
Type: server
Author: WaterMelon
Tags: database, analysis, pgsql
Description: 一个本地访问PGSQL的MCP Server
Tools:
Server command: GITHUB_PERSONAL_ACCESS_TOKEN={GITHUB_PERSONAL_ACCESS_TOKEN} DB_HOST={DB_HOST} DB_PORT={DB_PORT} DB_NAME={DB_NAME} DB_USER={DB_USER} DB_PASSWORD={DB_PASSWORD} docker build -t mcp-pgsql-python-service . && docker run -p 8000:8000 -e DB_HOST=${DB_HOST} -e DB_PORT=${DB_PORT:-5432} -e DB_NAME=${DB_NAME} -e DB_USER=${DB_USER} -e DB_PASSWORD=${DB_PASSWORD} mcp-pgsql-python-service
Server configuration:
{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "build",
        "-t",
        "mcp-pgsql-python-service",
        ".",
        "&&",
        "docker",
        "run",
        "-p",
        "8000:8000",
        "-e",
        "DB_HOST=${DB_HOST}",
        "-e",
        "DB_PORT=${DB_PORT:-5432}",
        "-e",
        "DB_NAME=${DB_NAME}",
        "-e",
        "DB_USER=${DB_USER}",
        "-e",
        "DB_PASSWORD=${DB_PASSWORD}",
        "mcp-pgsql-python-service"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_TOKEN",
        "DB_HOST": "postgres",
        "DB_PORT": "5432",
        "DB_NAME": "postgres",
        "DB_USER": "postgres",
        "DB_PASSWORD": "postgres"
      }
    }
  }
}