pgconsole MCP server
2026년 10월 30일 커밋에이전트별 권한 관리와 감사 로그 기능을 갖춘 관리형 MCP 엔드포인트를 통해 AI 에이전트가 PostgreSQL을 쿼리하고 수정할 수 있습니다.
다른 이름 pgplex/pgconsole
- 스타
- 162
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 30일
- 라이선스
- Apache-2.0
pgconsole MCP란?
pgconsole은(는) MCP server입니다. 에이전트별 권한 관리와 감사 로그 기능을 갖춘 관리형 MCP 엔드포인트를 통해 AI 에이전트가 PostgreSQL을 쿼리하고 수정할 수 있습니다.
프로젝트 README에서 생성된 요약
pgconsole MCP server 정보
pgconsole은 엔지니어링 팀이 관리형 엔드포인트를 통해 AI 에이전트의 PostgreSQL 접근 권한을 관리할 수 있도록 지원합니다. 데이터베이스 원본 자격 증명을 공유하지 않고도 Model Context Protocol을 통해 Claude, Cursor 또는 CI 봇과 같은 외부 클라이언트에 데이터베이스 연결을 노출하는 방법을 제공합니다. 사용자는 단일 TOML 파일을 사용하여 시스템을 구성하고 npm, npx 또는 Docker를 통해 실행할 수 있습니다.
개발자는 이 도구를 사용하여 에이전트가 IAM 레이어를 통해 읽기, 쓰기 또는 ddl과 같은 특정 권한을 상속받는 세밀한 접근 제어를 구현할 수 있습니다. 이 서버는 두 가지 유형의 에이전트를 지원합니다: 순수 서비스 계정과 사용자를 대신하여 동작하는 위임된 에이전트입니다. 또한 사용자를 위한 통합 SQL 에디터와 OpenAI, Anthropic 또는 Google 프로바이더와 함께 작동하여 text-to-SQL 및 쿼리 최적화와 같은 작업을 수행하는 AI 어시스턴트를 포함합니다.
보안은 기본 거부(default-deny) 정책과 포괄적인 감사 로그를 통해 유지됩니다. 모든 쿼리와 로그인은 구조화된 JSON 형식으로 stdout에 기록되어, 팀이 사람과 자동화된 에이전트 모두가 수행한 작업을 추적할 수 있습니다. 시스템은 에이전트가 승인된 연결을 맺은 후에만 list_objects 또는 query와 같은 도구를 사용할 수 있도록 보장합니다.
활용 사례
- 1에이전트에 안전한 데이터베이스 접근 권한 부여실제 데이터베이스 비밀번호를 노출하지 않고 AI 에이전트에 데이터베이스를 쿼리할 수 있는 특정 권한을 제공합니다.
- 2AI 기반의 모든 데이터베이스 변경 사항 감사AI 에이전트가 실행한 모든 SQL 문을 추적하여 컴플라이언스와 가시성을 확보합니다.
- 3자연어를 SQL로 변환내장된 AI 어시스턴트를 사용하여 일반 영어 설명을 실행 가능한 PostgreSQL 쿼리로 변환합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능pgplex/pgconsole is public and reachablegithub.com/pgplex/pgconsole ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-30github.com/pgplex/pgconsole ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기[!NOTE] pgplex: The Postgres Toolchain for Humans and Agents - pgconsole · pgschema · pgtui · pgparser
Brought to you by Bytebase, open-source database governance platform.

pgconsole is a web-based PostgreSQL editor. Single binary, single config file, no database required. Connect your team to PostgreSQL with access control and audit logging built in.
Installation
Visit https://docs.pgconsole.com/getting-started/quickstart
Prerequisites
- Node.js 20+
npm
npm install -g @pgplex/pgconsole
pgconsole --config pgconsole.toml
npx
npx @pgplex/pgconsole --config pgconsole.toml
Docker
docker run -p 9876:9876 -v /path/to/pgconsole.toml:/etc/pgconsole.toml pgplex/pgconsole
Run without --config to start in demo mode with a bundled sample database.
Features
SQL Editor
A full-featured SQL workspace for writing, running, editing, and inspecting PostgreSQL, with parser-powered intelligence in the editor.
- Autocomplete — context-aware suggestions for tables, columns, joins, and CTEs
- Formatting — pretty-print or collapse SQL to one line
- Error detection — red underlines with hover tooltips
- Code folding — collapse
SELECT,WITH, and other blocks - Function signature help — parameter hints as you type
- Result grid & inline editing — virtual-scrolling query results with staged edits, generated SQL previews, and optional AI risk assessment before execution
- Schema browser — inspect tables, views, materialized views, functions, and procedures with metadata, indexes, constraints, triggers, and grants
AI Assistant
Generate, explain, fix, and rewrite SQL with an AI assistant that understands your schema context. Supports OpenAI, Anthropic, and Google providers.
- Text-to-SQL — describe a query in natural language, get SQL back
- Explain SQL — get plain-language explanations of any query
- Fix SQL — AI-powered error correction from inline linting
- Rewrite SQL — optimize queries for performance or readability
- Risk assessment — analyze staged changes for potential risks before execution
MCP Server
Expose your Postgres connections to external AI agents (Claude, Cursor, IDEs, CI bots) over the Model Context Protocol — without handing out raw database credentials. Agents connect to a remote MCP endpoint and inherit the same IAM, permission, and audit controls as human users.
- Remote & token-authenticated — a Streamable HTTP endpoint at
/mcp; each agent authenticates withAuthorization: Bearer <token> - Two agent kinds — a pure service account (authorized by
agent:<id>IAM rules) or a delegated agent that acts on behalf of a user, optionally capped to fewer permissions or connections - Permission-shaped tools — every agent can
list_connections; catalog tools (list_objects,describe_table) appear once it has an accessible connection, and execution tools unlock per grant:explain_query(explain),query(read),write_data(write),run_ddl(ddl) - Same governance as the UI — every statement runs through per-statement SQL permission detection, default-deny IAM, and the audit log
# A standalone agent, authorized via [[iam]] just like a user
[[agents]]
id = "ci-bot"
name = "CI Pipeline"
token = "generate-a-long-random-secret" # openssl rand -hex 32
[[iam]]
connection = "staging"
permissions = ["read", "ddl"]
members = ["agent:ci-bot"]
Database Access Control
Fine-grained IAM controls who can read, write, or administer each connection. Permissions are enforced at the application layer — no database roles needed.
- Default deny — users have no access unless a rule explicitly grants it
- Connection-scoped — permissions are granted per connection, not globally
- Disjoint permissions —
read,write,ddl,admin,explain,execute,exportare independent
Audit Log
Every query and login is recorded as structured JSON to stdout. Filter and forward to your log infrastructure.
{
"type": "audit",
"ts": "2024-01-15T10:32:15.456Z",
"action": "sql.execute",
"actor": "alice@example.com",
"connection": "prod-db",
"sql": "SELECT * FROM users WHERE active = true",
"duration_ms": 45,
"row_count": 150
}
Single-File Configuration
Everything lives in pgconsole.toml — connections, users, groups, access rules, AI providers. No database required.
[[connections]]
id = "production"
name = "Production"
host = "db.example.com"
port = 5432
database = "myapp"
username = "readonly"
password = "..."
[[iam]]
connection = "production"
permissions = ["read", "explain", "export"]
members = ["*"]
[[iam]]
connection = "production"
permissions = ["*"]
members = ["group:dba"]
[[ai.providers]]
id = "claude"
vendor = "anthropic"
model = "claude-sonnet-4-20250514"
api_key = "sk-ant-..."
Getting Help
Development
[!NOTE] For external contributors: If you want to request a feature, please create a GitHub issue to discuss first instead of creating a PR directly.
git clone https://github.com/pgplex/pgconsole.git
cd pgconsole
pnpm install
pnpm dev # Start dev server (frontend + backend)
pnpm build # Production build
pnpm test # Run all tests
Sponsor
Bytebase - open source, web-based database DevSecOps platform.
pgconsole MCP 질문
AI 에이전트는 pgconsole MCP server에 어떻게 인증하나요?
/mcp 경로의 streamable HTTP 엔드포인트에 연결하며, 설정 파일에 정의된 에이전트 전용 bearer token으로 인증합니다.
pgconsole MCP server에서 에이전트가 사용할 수 있는 도구는 무엇인가요?
모든 에이전트는 연결 목록을 조회할 수 있으며, catalog 및 execution 도구는 에이전트에 부여된 권한에 따라 나타납니다.
pgconsole를 사용하려면 에이전트에 데이터베이스 원본 자격 증명이 필요한가요?
아니요. 에이전트는 데이터베이스 자격 증명 대신 MCP 엔드포인트를 사용하며, 사용자 환경과 동일한 IAM, 권한 및 감사 제어를 상속받습니다.
pgconsole에서 에이전트의 쿼리는 감사되나요?
네, 모든 문장은 SQL 권한 감지, 기본 거부(default-deny) IAM 및 감사 로그를 거쳐 실행됩니다.
pgconsole에는 어떤 종류의 에이전트를 구성할 수 있나요?
IAM 규칙에 의해 권한을 부여받은 순수 서비스 계정이나, 선택적으로 축소된 권한을 가지고 사용자를 대신하여 동작하는 위임된 에이전트를 구성할 수 있습니다.