279개의 특화된 도구를 사용하여 AI agent가 PostgreSQL 데이터베이스를 안전하게 검사, 조회, 조작 및 튜닝할 수 있습니다.
다른 이름 devopam/MCPg
- 스타
- 14
- Tools
- —
- 다운로드, 30일
- 770
- 최신 버전
- 0.8.4
- 마지막 커밋
- 2026년 11월 12일
- 라이선스
- MIT
MCPg MCP란?
MCPg은(는) MCP server입니다. 279개의 특화된 도구를 사용하여 AI agent가 PostgreSQL 데이터베이스를 안전하게 검사, 조회, 조작 및 튜닝할 수 있습니다.
프로젝트 README에서 생성된 요약
MCPg MCP server 정보
MCPg는 AI agent가 PostgreSQL 데이터베이스와 상호작용할 수 있는 프로덕션급 인터페이스를 제공합니다. 카탈로그 조사, 쿼리 인텔리전스, 데이터베이스 관리 작업을 수행할 수 있는 279개의 특화된 도구를 제공합니다. 개발자는 단순한 데이터 조회 및 자연어 SQL 변환부터 인덱스 튜닝, vacuum, 마이그레이션 관리와 같은 복잡한 DBA 작업까지 모든 과정을 수행하는 데 이 도구를 사용할 수 있습니다.
이 server는 PostgreSQL 14부터 19 버전까지 지원하며, pip 또는 Docker를 통해 로컬에 배포하거나 원격 HTTP server로 배포할 수 있습니다. 안전을 최우선으로 설계되어 모든 SQL 문이 AST 검증을 거치는 읽기 전용 모드를 기본값으로 사용합니다. 고급 설정의 경우 요청별 역할 설정, 읽기 복제본 라우팅, OIDC JWT bearer 인증을 통한 멀티테넌시를 지원합니다.
사용자는 로컬 데스크톱 클라이언트를 위해 stdio를 통해 연결하거나, 웹 애플리케이션 및 IDE 통합을 위해 HTTP/SSE 전송 방식을 사용할 수 있습니다. 이 시스템은 pgvector, PostGIS, TimescaleDB와 같은 extension과 네이티브하게 통합되어, agent가 별도의 추상화 계층 없이 특화된 데이터베이스 기능을 활용할 수 있도록 보장합니다.
활용 사례
- 1느린 데이터베이스 쿼리 분석AI agent가 특정 SQL 문에 대해 EXPLAIN 분석을 수행하여 성능 문제를 조사할 수 있습니다.
- 2자연어를 SQL로 변환개발자는 다양한 LLM provider를 사용하여 일반 영어 요청을 실행 가능한 SQL 쿼리로 변환하는 데 이 server를 사용할 수 있습니다.
- 3데이터베이스 스키마 조사 수행agent가 데이터베이스 구조를 탐색하여 기존 스키마와 가장 큰 테이블을 식별할 수 있습니다.
- 4데이터베이스 유지 관리 작업 관리이 server를 통해 agent가 vacuum 및 인덱스 튜닝과 같은 DBA급 작업을 실행할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
MCPg MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 MCPg MCP 설치
$ claude mcp add mcpg -- uvx mcpgCursor에 MCPg MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
]
}
}
}VS Code에 MCPg MCP 설치
.vscode/mcp.json
{
"servers": {
"mcpg": {
"type": "stdio",
"command": "uvx",
"args": [
"mcpg"
]
}
}
}Claude Desktop에 MCPg MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
]
}
}
}Codex에 MCPg MCP 설치
~/.codex/config.toml
[mcp_servers.mcpg] command = "uvx" args = ["mcpg"]
Gemini CLI에 MCPg MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": [
"mcpg"
]
}
}
}구성
MCPG_DATABASE_URLMCPG_HTTP_PORTMCPG_TRANSPORT
| 이름 | 설명 | 유형 |
|---|---|---|
| MCPG_DATABASE_URL | — | |
| MCPG_HTTP_PORT | — | |
| MCPG_TRANSPORT | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지와 의존성에 심각한 보안 권고 없음통과
README
GitHub에서 보기MCPg
A production-grade Model Context Protocol server for PostgreSQL. It lets AI agents safely inspect, query, operate, and tune a Postgres database — 279 tools spanning catalog introspection, query intelligence, natural-language SQL, structural diffs, hybrid search, graph queries, data movement, live ops, and more.
Try it live: point an MCP client — or the MCP Inspector — at the hosted, read-only demo endpoint
https://devopam-mcpg-demo.hf.space/mcp. It serves read tools against throwaway demo data; for real use, run MCPg next to your own database (see Quick start).
📍 Listed On
| Aspect | MCPg |
|---|---|
| Safety | Read-only default + AST validation |
| Transport | stdio + HTTP/SSE |
| Install | pip install mcpg |
| Postgres Versions | 14–19 |
| Key Differentiator | Production observability + multi-tenancy |
Why MCPg
- Safe by default. Read-only access mode. Every user-supplied SQL
statement parses through a validated AST allowlist before execution.
Names that reach PostgreSQL as SQL identifiers are encoded with
delimited-identifier quoting (see Identifier policy),
not rejected merely for containing hyphens or other legal characters.
Capabilities like DDL, shell, and
LISTEN/NOTIFYare off until you opt in. Every tool publishes MCPToolAnnotations(readOnlyHint,openWorldHint) derived from those same gates, so clients can auto-approve reads and gate writes without guessing. - One server, broad surface. Application data access (queries, search, cursors, NL→SQL) and DBA-grade operations (health checks, index tuning, EXPLAIN analysis, locks, vacuum, dumps, replicas, migrations) in a single MCP server. Agents don't have to switch tools to switch tasks.
- PostgreSQL-native everything. No ORM, no abstraction tax — uses
psycopg3directly, speaks everypg_*system view, integrates with TimescaleDB, pgvector, PostGIS, Apache AGE, andpg_stat_statementswhere they're available, and degrades gracefully when they aren't. - Production-shaped, not demo-shaped. Connection pooling, per-request
SET ROLEmulti-tenancy, read-replica routing with degraded-host detection, server-side cursors with dedicated connections, rate-limiting, audit trail with regex redaction, PG TLS enforcement on startup, OIDC JWT bearer auth, per-session statement / lock timeouts. - Observability built in. Prometheus
/metricsendpoint on the HTTP transport surfacesmcpg_tool_calls_total{tool,status}+mcpg_tool_duration_seconds. Every tool call records a structured audit event with credential-redacted arguments. - Test-driven, multi-version. 2,500+ unit tests plus an integration suite that runs against a real PostgreSQL container in CI — matrix covers PG 14, 15, 16, 17, 18 on every push, plus PG 19 (beta) as an experimental (non-blocking) entry tracked under issue #120.
Install
From PyPI (recommended)
pip install mcpg
# or, in an isolated venv exposed globally:
uv tool install mcpg
Verify:
mcpg --version
Docker
Pull the pre-built image from the GitHub Container Registry (published
on every tagged release — :latest tracks the newest, or pin a version
like :0.6.5):
docker pull ghcr.io/devopam/mcpg:latest
docker run --rm --name mcpg -p 8000:8000 \
-e MCPG_DATABASE_URL=postgresql://user:pass@host:5432/db \
-e MCPG_ACCESS_MODE=read-only \
ghcr.io/devopam/mcpg:latest
On Windows PowerShell replace the trailing \ with a backtick `
(or put the command on one line); the installation
guide has ready-to-copy
Linux/macOS, PowerShell, and Command Prompt blocks.
Or build it yourself from source:
docker build -t mcpg https://github.com/devopam/MCPg.git
Multi-stage image: runtime stage drops the build toolchain, runs as
uid=10001 / gid=10001 with nologin shell, application files
root-owned and read-only to the runtime user.
From source (developers)
git clone https://github.com/devopam/MCPg && cd MCPg
uv sync
uv sync creates a venv with all runtime + dev dependencies and exposes
the mcpg console script.
More detail in the Installation Guide.
Quick start
One-click installs:
— setup for Windsurf, JetBrains, Zed, Cline, Antigravity, Qwen Code, Perplexity,
ChatGPT, Copilot Studio, Continue, and HTTP
clients in the integrations guide.
One-click install in Claude Desktop (.mcpb)
Download mcpg-<version>.mcpb from the
latest release and
double-click it (or drag it into Claude Desktop's Settings →
Extensions). You'll be prompted for your PostgreSQL connection URL —
stored in the OS keychain — and an access mode (defaults to
read-only). That's the whole install: the bundle is ~2 kB and the
host resolves the pinned mcpg release from PyPI for your platform.
Or wire it up manually (stdio transport)
Drop this into your claude_desktop_config.json (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json;
Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"mcpg": {
"command": "uvx",
"args": ["mcpg"],
"env": {
"MCPG_DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
}
}
}
}
Restart Claude Desktop. The MCPg toolset is now available to the model. You can ask Claude things like:
"What schemas exist in this database? For each one, summarise the three biggest tables."
"Why is this query slow?
SELECT * FROM orders WHERE customer_id = 42 ORDER BY created_at DESC"
No interesting data yet? Seed the demo dataset
MCPG_DATABASE_URL=postgresql://... mcpg --demo
One command seeds a small, curated e-commerce dataset (3,000 orders,
900 product reviews, deliberately planted flaws) into an mcpg_demo
schema — engineered so the index advisor, query-plan analysis,
full-text search, PII audit, and graph projection all have something
real to find on your first try. See the
guided tour for a captured walkthrough, and remove it
any time with mcpg --demo-drop.
Run as an HTTP server (for IDE integrations, web apps, etc.)
MCPG_DATABASE_URL=postgresql://user:pass@localhost:5432/mydb \
MCPG_TRANSPORT=streamable-http \
MCPG_HTTP_PORT=8000 \
mcpg
Then point any MCP-aware client at http://localhost:8000/mcp (or
/sse for the SSE transport). The HTTP transport refuses to start
unless it's authenticated — set MCPG_HTTP_AUTH_TOKEN=... for a static
bearer, or MCPG_AUTH_MODE=oidc for full JWT validation against an
OIDC issuer. To deliberately run without auth (not recommended), set
MCPG_HTTP_ALLOW_UNAUTHENTICATED=true.
Configuration
MCPg is configured entirely through environment variables — no
config file, no flags (the CLI's --version / --demo / --demo-drop
are one-shot commands, not configuration). The only required one is
MCPG_DATABASE_URL; everything else has a safe default.
Common scenarios
| Scenario | Set |
|---|---|
| Local exploration, read-only | MCPG_DATABASE_URL |
| Read-write app data access | MCPG_ACCESS_MODE=restricted |
| DBA toolkit (DDL, vacuum, etc.) | MCPG_ACCESS_MODE=unrestricted + MCPG_ALLOW_DDL=true |
| HTTP transport with bearer auth | MCPG_TRANSPORT=streamable-http + MCPG_HTTP_AUTH_TOKEN=… |
| Multi-tenant SaaS | MCPG_DEFAULT_ROLE=tenant_a + MCPG_ALLOWED_ROLES=tenant_a,tenant_b,… |
| Read-replica fan-out | MCPG_REPLICA_URLS=postgresql://…?sslmode=require,postgresql://…?sslmode=require |
| NL→SQL — single provider | Set any one vendor key (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, XAI_API_KEY, GROQ_API_KEY, HF_TOKEN, … — 22 built-in providers). MCPg auto-picks the default. |
| NL→SQL — multiple providers, caller picks | Set all vendor keys you want active. Each call to translate_nl_to_sql can pass provider="…" (any configured built-in or custom). |
Full reference
Core
| Variable | Default | Description |
|---|---|---|
MCPG_DATABASE_URL |
required | Primary PostgreSQL DSN. Supports URI (postgresql://…) and keyword (host=… user=…) forms. Remote hosts require sslmode=require (or stronger). |
MCPG_ACCESS_MODE |
read-only |
read-only | restricted (allows write tools) | unrestricted (also unlocks DBA tools when paired with the gate vars). |
MCPG_TRANSPORT |
stdio |
stdio (default, for Claude Desktop) | streamable-http | sse. |
MCPG_LOG_LEVEL |
INFO |
DEBUG | INFO | WARNING | ERROR | CRITICAL. |
MCPG_HTTP_HOST |
127.0.0.1 |
Bind address for HTTP transports. Set to 0.0.0.0 inside containers. |
MCPG_HTTP_PORT |
8000 |
Listen port for HTTP transports (1–65535). |
Capability gates (opt-in for higher-blast-radius tools)
| Variable | Default | Description |
|---|---|---|
MCPG_ALLOW_DDL |
false |
Expose DDL tools (run_ddl, create_graph, drop_graph, hypertable tools, migration tools). Requires MCPG_ACCESS_MODE=unrestricted. |
MCPG_ALLOW_SHELL |
false |
Expose subprocess-backed tools (dump_database, restore_database, run_pg_binary). Required PG client binaries must be on PATH. |
MCPG_ALLOW_TIMESCALEDB_ADMIN |
false |
With unrestricted mode + MCPG_ALLOW_DDL, expose the destructive / heavy TimescaleDB tools (drop_chunks, compress_chunk, decompress_chunk, reorder_chunk, merge_chunks, refresh_continuous_aggregate, run_job, alter_job, delete_job); each needs dry_run then confirm=true + confirmation_token. See docs/timescaledb.md. |
MCPG_ALLOW_ALTER_SYSTEM |
false |
Expose alter_system, alter_system_reset_all, reload_config (unrestricted mode only; two-step confirm=true flow — see docs/alter-system.md). MCPG_ALTER_SYSTEM_ALLOWLIST / MCPG_ALTER_SYSTEM_DENYLIST (comma-separated GUC names) narrow or extend the built-in denylist. |
MCPG_ALLOW_LISTEN |
false |
Expose LISTEN/NOTIFY tools (subscribe_channel, poll_notifications, unsubscribe_channel, list_notification_subscriptions). |
Authentication (HTTP transports only)
| Variable | Default | Description |
|---|---|---|
MCPG_AUTH_MODE |
static |
static (compare bearer to MCPG_HTTP_AUTH_TOKEN) | oidc (full JWT validation). |
MCPG_HTTP_AUTH_TOKEN |
— | Required bearer token when MCPG_AUTH_MODE=static. Constant-time compare. The HTTP transport refuses to start (ConfigError) unless this, MCPG_AUTH_MODE=oidc, or MCPG_HTTP_ALLOW_UNAUTHENTICATED=true is set. |
MCPG_HTTP_ALLOW_UNAUTHENTICATED |
false |
Explicit opt-out of the HTTP transport's fail-closed auth check. Loudly logged on every startup when set; not recommended. |
MCPG_OIDC_ISSUER |
— | OIDC issuer URL (required when MCPG_AUTH_MODE=oidc). |
MCPG_OIDC_AUDIENCE |
— | Expected aud claim (required when MCPG_AUTH_MODE=oidc). |
MCPG_OIDC_JWKS_URL |
discovered | Override JWKS endpoint (auto-discovered from issuer's .well-known otherwise). |
MCPG_OIDC_ROLE_CLAIM |
— | JWT claim whose value becomes the per-request PG role (SET LOCAL ROLE). Composes with the tenancy driver. |
HTTP hardening (HTTP transports only)
| Variable | Default | Description |
|---|---|---|
MCPG_HTTP_MAX_BODY_BYTES |
1048576 |
(1 MiB) Request bodies above this get a 413. Counts streamed bytes, so a missing/lying Content-Length can't bypass it. |
MCPG_HTTP_ALLOWED_ORIGINS |
— | Comma-separated CORS allowlist. Unset = no CORS middleware (no cross-origin headers emitted). |
MCPG_HTTP_HSTS_MAX_AGE |
63072000 |
Strict-Transport-Security max-age (2 years, OWASP's current recommendation). 0 disables the HSTS header. Security headers (CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy) are always added unless the app already set them. |
MCPG_HTTP_REQUEST_TIMEOUT_SECONDS |
0 |
Per-request wall-clock cap (504 on expiry). 0 = disabled. Leave off if you rely on long-lived SSE / streamable-http streams — a hard cap also severs those. |
MCPG_HTTP_TRUSTED_HOSTS |
— | Comma-separated list of allowed Host header values (wildcards like *.example.com supported). Unset = no host-header validation (current behaviour). When set, requests with a non-matching Host get a 400 via Starlette's TrustedHostMiddleware. |
Multi-tenancy (SET ROLE)
| Variable | Default | Description |
|---|---|---|
MCPG_DEFAULT_ROLE |
— | Static PG role applied to every query. Identifier-validated. |
MCPG_ALLOWED_ROLES |
— | Comma-separated allowlist. When set, the X-MCPG-Role header / OIDC role claim must be in this list. |
Read replicas
| Variable | Default | Description |
|---|---|---|
MCPG_REPLICA_URLS |
— | Comma-separated replica DSNs. force_readonly queries round-robin across healthy replicas; primary fallback on failure; 30 s degraded-replica retry window. |
Multiple databases (read-only secondaries)
| Variable | Default | Description |
|---|---|---|
MCPG_SECONDARY_DATABASE_URLS |
— | Comma- or newline-separated name=dsn entries naming additional read-only databases this one server can serve (e.g. analytics=postgresql://…?sslmode=require,reporting=postgresql://…?sslmode=require). Read-capable tools accept an optional database argument selecting a secondary by name; omit it for the primary. Secondaries are read-only — PostgreSQL-enforced (every query runs in a READ ONLY transaction), so writes / DDL / shell / migrate always target the primary. Names must be simple identifiers ([a-z0-9_]+), unique, and not primary (the reserved id of MCPG_DATABASE_URL). Same TLS rules as the primary DSN. Call list_databases to discover the configured ids and their reachability. |
Pool / timeouts / TLS
| Variable | Default | Description |
|---|---|---|
MCPG_POOL_MIN_SIZE |
1 |
Minimum pool connections. |
MCPG_POOL_MAX_SIZE |
5 |
Maximum pool connections. Must be ≥ MCPG_POOL_MIN_SIZE. |
MCPG_STATEMENT_TIMEOUT_MS |
30000 |
Per-session statement_timeout set on connection checkout. Runaway queries self-terminate. |
MCPG_LOCK_TIMEOUT_MS |
5000 |
Per-session lock_timeout. Hanging lock waits self-terminate. |
MCPG_ENABLE_ANALYTICAL_QUERIES |
true |
Expose run_analytical_query (long-running reads on an isolated pool). Set false to withdraw the tool. |
MCPG_ANALYTICAL_TIMEOUT_MS |
120000 |
Default per-call budget for run_analytical_query (2 min). |
MCPG_ANALYTICAL_MAX_TIMEOUT_MS |
600000 |
Hard ceiling for run_analytical_query; a per-call timeout_ms is clamped to this (10 min). Must be ≥ MCPG_ANALYTICAL_TIMEOUT_MS. |
MCPG_ANALYTICAL_MAX_CONCURRENCY |
2 |
Size of the isolated analytical pool — max simultaneous run_analytical_query calls. |
MCPG_ALLOW_INSECURE_TLS |
false |
Bypass the startup TLS check that refuses remote DSNs without sslmode=require (or stronger). Loopback hosts are always exempt. |
MCPG_SHUTDOWN_DRAIN_SECONDS |
30 |
On SIGTERM, wait up to this long for in-flight tool calls to finish before closing the pool and cursors. |
Subprocess tools (MCPG_ALLOW_SHELL=true only)
| Variable | Default | Description |
|---|---|---|
MCPG_SHELL_TIMEOUT_SEC |
60 |
Max wall-clock for pg_dump / pg_restore / psql invocations. |
MCPG_SHELL_MAX_OUTPUT_BYTES |
67108864 |
(64 MiB) Cap on captured stdout per subprocess call. |
MCPG_SUBPROCESS_BIN_ALLOWLIST |
— | Comma-separated absolute dirs the resolved pg_dump / pg_restore / psql must live under. Empty = trust PATH. Defeats a PATH-shim of these binaries. |
MCPG_SUBPROCESS_CPU_SECONDS |
— | Per-child RLIMIT_CPU (seconds). POSIX only; unset = inherit. |
MCPG_SUBPROCESS_MEMORY_MB |
— | Per-child RLIMIT_AS (MiB). POSIX only; unset = inherit. |
LISTEN/NOTIFY (MCPG_ALLOW_LISTEN=true only)
| Variable | Default | Description |
|---|---|---|
MCPG_LISTEN_QUEUE_MAX |
1000 |
Per-channel buffer; oldest notifications dropped on overflow. |
Audit
| Variable | Default | Description |
|---|---|---|
MCPG_AUDIT_PERSIST |
false |
When true, every run_write / run_ddl call persists to a mcpg_audit.events table (auto-created idempotently). |
MCPG_AUDIT_REDACT_KEYS |
— | Comma-separated regex fragments added to the secret-name pattern (defaults already cover password, passwd, secret, token, api[_-]?key, bearer, authorization, database_url, dsn, conninfo). |
MCPG_AUDIT_INTEGRITY |
false |
When true, each persisted event is signed with an HMAC chained over the previous event; the verify_audit_chain tool walks the chain and reports the first break. Requires MCPG_AUDIT_HMAC_KEY. |
MCPG_AUDIT_HMAC_KEY |
— | Secret key for the audit HMAC chain. Required when MCPG_AUDIT_INTEGRITY=true. Never appears in repr/logs. |
Secrets backend
By default every secret is read straight from the environment. Set
MCPG_SECRETS_BACKEND=file to instead load API keys / bearer token /
HMAC key from a mounted file — a name in the file wins; anything absent
falls back to the env var, so partial files work.
| Variable | Default | Description |
|---|---|---|
MCPG_SECRETS_BACKEND |
env |
env (read every secret from the environment) | file (overlay a secrets file on top of the environment). |
MCPG_SECRETS_FILE_PATH |
— | Required when MCPG_SECRETS_BACKEND=file. Path to a flat name → value map: JSON always, or YAML (.yaml/.yml) when PyYAML is installed. Covers ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY / GOOGLE_API_KEY / MCPG_NL2SQL_API_KEY, MCPG_HTTP_AUTH_TOKEN, and MCPG_AUDIT_HMAC_KEY. |
Rate limiting
| Variable | Default | Description |
|---|---|---|
MCPG_RATE_LIMIT_ENABLED |
true |
Token-bucket per-tool rate limiting. Set to false to restore the pre-breaking-change unlimited behavior. |
MCPG_RATE_LIMIT_MAX_REQUESTS |
60 |
Global cap per window across all tools. |
MCPG_RATE_LIMIT_WINDOW_SECONDS |
60 |
Window length for the global quota. |
MCPG_RATE_LIMIT_HEAVY_MAX |
5 |
Cap for heavy tools (run_write, run_ddl, dump_database, etc.). |
MCPG_RATE_LIMIT_HEAVY_WINDOW |
60 |
Window length for the heavy-tool quota. |
Caching & Feature flags
| Variable | Default | Description |
|---|---|---|
MCPG_CACHE_ENABLED |
true |
Enable or disable the adaptive cache layer. |
MCPG_CACHE_TTL_SECONDS |
300 |
Default cache Time-To-Live in seconds. |
MCPG_CACHE_MAXSIZE |
1024 |
Maximum LRU capacity bound for the memory cache. |
MCPG_REDIS_URL |
— | Optional Redis backend connection string for external, multi-node caching. |
MCPG_ENABLE_HEAVY_DIAGNOSTICS |
true |
Toggle computationally heavy diagnostic, diagram, and advisor tools. |
MCPG_ELICIT_CONFIRM_WRITES |
false |
When true, every write/DDL/shell/listen/migrate-tier tool call (any tool whose readOnlyHint annotation isn't true) requires an accepted interactive confirmation (ctx.elicit()) before running. Best-effort, not an enforcement boundary: it only engages for clients that both pass a request context and declare the elicitation capability during initialize — a client that omits either silently bypasses the gate and the tool runs as normal. |
MCPg MCP 질문
MCPg MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add mcpg -- uvx mcpg를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
MCPg MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
MCPg를 운영 데이터베이스에서 안전하게 사용할 수 있나요?
네, 기본적으로 읽기 전용 모드가 활성화되어 있으며, 사용자가 입력한 모든 SQL 문에 대해 AST 검증을 수행하므로 안전합니다.
어떤 PostgreSQL 버전을 지원하나요?
이 server는 PostgreSQL 14부터 19 버전까지 지원합니다.