dotsagent.io
언어:한국어
데이터 · Crystal DBA

Postgres MCP Pro 설정

보관 처리된 참조 서버를 대체하며 Postgres 쿼리, 스키마 검사, 인덱스 튜닝 및 상태 확인을 제공합니다.

게시자
Crystal DBA 커뮤니티
로컬 실행
uvx postgres-mcp --access-mode=restricted
전송 방식
stdio, sse
인증
DATABASE_URI에 설정하는 Postgres 연결 문자열.
환경 변수
DATABASE_URI
접근 가능한 항목
제한 모드는 읽기 전용이고, 제한 없는 모드는 읽기와 쓰기를 지원합니다.
라이선스
MIT
소스
github.com/crystaldba/postgres-mcp
상태
활성

설치

이 서버는 클라이언트의 자식 프로세스로 내 컴퓨터에서 실행됩니다. 명령에서 사용하는 런타임이 필요합니다. 예를 들어 npx에는 Node.js, uvx에는 uv, Docker에는 Docker가 필요합니다. Environment에 나열된 변수도 준비해야 합니다.

Claude Code

shell
claude mcp add --scope project --env DATABASE_URI='<DATABASE_URI>' postgres-mcp-pro -- uvx postgres-mcp --access-mode=restricted

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "postgres-mcp-pro": {
      "command": "uvx",
      "args": [
        "postgres-mcp",
        "--access-mode=restricted"
      ],
      "env": {
        "DATABASE_URI": "${env:DATABASE_URI}"
      }
    }
  }
}

Codex

~/.codex/config.toml
[mcp_servers.postgres-mcp-pro]
command = "uvx"
args = ["postgres-mcp", "--access-mode=restricted"]
env_vars = ["DATABASE_URI"]

다른 클라이언트용 설정 →

중요한 데이터베이스에는 항상 --access-mode=restricted를 사용하세요. 제한 없는 모드에서는 에이전트가 쓸 수 있습니다.

데이터의 다른 서버

출처

  1. github.com/crystaldba/postgres-mcp