Model Context Protocol 클라이언트와 백엔드를 위한 신원 관리, 권한 부여 및 실행 디스패치를 관리하는 프로토콜 권한 게이트웨이입니다.
다른 이름 mcpg-dev/mcpg, model-context-protocol-gateway
- 스타
- 0
- Tools
- 1
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- Apache-2.0
MCPG MCP란?
MCPG은(는) MCP server입니다. Model Context Protocol 클라이언트와 백엔드를 위한 신원 관리, 권한 부여 및 실행 디스패치를 관리하는 프로토콜 권한 게이트웨이입니다. 1개 도구를 제공합니다. 예: built.
프로젝트 README에서 생성된 요약
MCPG MCP server 정보
mcpg는 Model Context Protocol 클라이언트와 백엔드를 위한 신원 관리, 권한 부여 및 실행 디스패치를 가능하게 합니다. 클라이언트와 다운스트림 시스템 사이에 위치하는 프로토콜 권한 게이트웨이로서 전체 세션 수명 주기와 프로토콜 구현을 처리합니다. 개발자는 cargo 또는 npm을 사용하여 로컬에 배포하거나, Docker 및 Helm 차트를 이용해 Kubernetes 기반의 프로덕션 환경에 배포할 수 있습니다.
이 게이트웨이는 플러그인 시스템을 통해 도구 호출, 프롬프트 요청 및 리소스 읽기를 운영자가 정의한 백엔드로 라우팅합니다. HTTP, gRPC, SQL 및 NATS 또는 Kafka와 같은 메시징 시스템을 포함한 다양한 통신 방식을 지원합니다. 또한 credential_issuer 플러그인 제품군을 사용하여 외부 자격 증명을 관리하며, 백엔드가 특정 URI를 통해 발급된 값을 참조할 수 있도록 합니다.
보안은 핵심 요소로, 시스템은 CEL 표현식을 사용하여 디스패치 전 권한 부여를 강제하고 OIDC, OAuth 또는 JWKS를 통해 신원을 확인합니다. Prometheus 메트릭과 OpenTelemetry 트레이스를 통해 관측성을 제공하므로, 복잡한 다단계 파이프라인과 작업 증강 도구 호출을 완전히 모니터링하고 제어할 수 있습니다.
활용 사례
- 1안전한 도구 실행AI 클라이언트는 백엔드에 도달하기 전, 특정 신뢰 수준과 CEL 표현식에 의해 제어되는 도구 호출을 트리거할 수 있습니다.
- 2자동화된 자격 증명 관리개발자는 OAuth 2.0 또는 Vault 동적 데이터베이스 자격 증명 관리를 게이트웨이의 플러그인 시스템에 위임할 수 있습니다.
- 3다양한 데이터 소스 연결SQL 데이터베이스, GraphQL API 또는 LLM 제공업체를 포함한 매우 다양한 백엔드로 MCP 요청을 라우팅할 수 있습니다.
- 4복잡한 워크플로 오케스트레이션에이전트는 샘플링 또는 유도를 위해 클라이언트와의 상호 작용이 필요한 다단계 파이프라인을 실행할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
MCPG MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 MCPG MCP 설치
$ claude mcp add mcpg -- npx -y model-context-protocol-gatewayCursor에 MCPG MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}VS Code에 MCPG MCP 설치
.vscode/mcp.json
{
"servers": {
"mcpg": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}VS Code CLI에 MCPG MCP 설치
$ code --add-mcp '{"name":"mcpg","type":"stdio","command":"npx","args":["-y","model-context-protocol-gateway"]}'Claude Desktop에 MCPG MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}Codex에 MCPG MCP 설치
$ codex mcp add mcpg -- npx -y model-context-protocol-gatewayCodex config.toml에 MCPG MCP 설치
~/.codex/config.toml
[mcp_servers.mcpg] command = "npx" args = ["-y", "model-context-protocol-gateway"]
Gemini CLI에 MCPG MCP 설치
$ gemini mcp add -s user mcpg npx -- -y model-context-protocol-gatewayGemini settings.json에 MCPG MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}MCPG MCP 도구 1
README에서 감지됨built
| built | — |
구성
MCPG_CONFIG
| 이름 | 설명 | 유형 |
|---|---|---|
| MCPG_CONFIG | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능mcpg-dev/mcpg is public and reachablegithub.com/mcpg-dev/mcpg ↗통과
- 패키지가 이 저장소를 소스로 명시model-context-protocol-gateway names mcpg-dev/mcpg as sourcenpmjs.com/package/model-context-protocol-gateway ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for model-context-protocol-gatewaynpmjs.com/package/model-context-protocol-gateway/v/0.1.0-rc. ↗통과
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-13github.com/mcpg-dev/mcpg ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from model-context-protocol-gateway통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음1 tool description and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기MCPG — Model Context Protocol Gateway
MCPG is a protocol-authority gateway for the Model Context Protocol. It sits between MCP clients and downstream backend systems, owning protocol handling, session lifecycle, identity, authorization, execution dispatch, and observability.
Production-grade Rust · extensive unit + integration + MCP-conformance coverage · implements MCP 2026-07-28 and 2025-11-25 (both CI-conformance-gated; legacy 2025-06-18 / 2025-03-26 accepted on request)
Build an MCP server with MCPG: see
docs/agent-authoring-guide.mdfor the AI-agent authoring procedure, anddocs/mcp-server-ideas.mdfor 25 concrete systems worth wrapping (name.com, Cloudflare, GitHub, Stripe, iPhone Simulator, and more) — each with a runnable sample underexamples/.Compliance status: start at
docs/compliance/mcp-compliance.mdfor the canonical reference. The supported-feature matrix is atdocs/compliance/compliance-support.md; operator knobs and metrics are documented indocs/configuration.mdanddocs/observability.md. Doc index:docs/README.md.
What MCPG Does
- Speaks MCP over Streamable HTTP with SSE streaming — the finalized
2026-07-28revision (stateless, header-routed) and the session-based2025-11-25default; the server always emits2026-07-28as its wire string and accepts the legacy2025-06-18/2025-03-26revisions when a client requests them - Routes tool calls, prompt gets, and resource reads to operator-defined backends
- Enforces pre-dispatch authorization with trust levels and CEL expressions
- Resolves identity via JWKS, OIDC/OAuth (multi-provider), or header assertion
- Orchestrates multi-step pipelines with client interaction (elicitation, sampling)
- Supports MCP Tasks — task-augmented tool calls with background execution, polling, cancellation, and result retrieval
- Distributes state across NATS, Redis, or in-process backends per capability (activated via per-capability
<capability>.store/<bus>.busoverrides) - Manages outbound credentials (OAuth 2.0 client_credentials, Vault dynamic DB, static) via the
credential_issuerplugin family — backends reference issued values throughcred://<plugin_id>/<target>URIs, with cached, auto-refreshed tokens - Surfaces MCP App URLs (
_meta.mcpAppUrl) on resource descriptors with CEL interpolation - Delivers subject-scoped resource notifications with 4 filter scopes (all, subject, session, expression)
- Extends via async plugin system — dual-tier (Native + Wasm) tool-gate, transform, and identity chains
- Enforces external guardrails via HTTP webhook callouts with CEL triggers and fail-open/fail-closed policies
- Gates tool calls via Machine Payment Protocol with HMAC-bound challenges
- Emits Prometheus metrics and OpenTelemetry traces
Backends
Backends are cdylib plugins — the gateway binary hard-wires none. The
catalog ships 32 backend and connector plugins; a caller selects one
per capability via a nested backend.kind: discriminator. Common kinds:
| Kind | Transport |
|---|---|
http |
HTTP POST/GET to downstream endpoints |
command |
Local subprocess execution |
nats / kafka / amqp |
Messaging (request/reply, pub/sub) |
grpc |
gRPC via proto-less JSON mapping |
graphql / soap |
GraphQL query/mutation, SOAP |
sql |
SQL + warehouse databases (Postgres, MySQL, Snowflake, BigQuery, ClickHouse, DuckDB, Oracle, …) |
ldap / dynamodb / email / sftp |
Directory, key-value, mail, file transfer |
openapi |
OpenAPI spec → generated tools |
mock |
Static fixture response |
pipeline |
Multi-step orchestration (11 step types) |
| LLM/media family | 17 kinds — OpenAI, Azure OpenAI, Anthropic, Gemini, Stability, and OpenAI-compatible chat/embedding/image/TTS/STT |
Full reference: docs/backends.md.
Install
The model-context-protocol-gateway package installs mcpg together with
mcpg-config, mcpg-cloud and mcpg-plugin:
npx model-context-protocol-gateway --help # npm, one-shot
npm install -g model-context-protocol-gateway # npm
pipx install model-context-protocol-gateway # PyPI (or: uvx model-context-protocol-gateway)
cargo install model-context-protocol-gateway --version <version> # crates.io: a launcher that runs the release binaries
cargo binstall model-context-protocol-gateway --version <version> # the release binaries directly
curl -fsSL https://raw.githubusercontent.com/mcpg-dev/mcpg/main/install.sh | sh
The container image is ghcr.io/mcpg-dev/mcpg:<version>. Every install path:
mcpg.dev/docs/install.
Build from source
# Build
cargo build
# Test
cargo test
# Run
MCPG_CONFIG=config.example.yaml cargo run
Docker & Kubernetes
# Build Docker image (from repo root)
docker build -t mcpg:latest -f apps/gateway/Dockerfile .
# Run single instance
docker run -p 8787:8787 -v $(pwd)/config.yaml:/etc/mcpg/config.yaml:ro mcpg:latest
# Deploy to Kubernetes via Helm (single instance). The charts are
# 0.1.0-beta.N prereleases: always pass --version.
helm install mcpg oci://ghcr.io/mcpg-dev/charts/mcpg --version <chart-version>
# Deploy HA with NATS backend (multi-instance)
helm install mcpg oci://ghcr.io/mcpg-dev/charts/mcpg --version <chart-version> \
--set replicaCount=3 \
--set nats.enabled=true \
--set autoscaling.enabled=true \
--set podDisruptionBudget.enabled=true
Full deployment guide: docs/deployment.md. Helm chart reference: Kubernetes install with Helm.
Configuration
See config.example.yaml for a working configuration. Full reference: docs/configuration.md.
server:
bind_address: "127.0.0.1:8787"
observability:
logs:
level: "info"
sinks:
- kind: stderr
config: { format: json }
mcp:
capabilities:
tools:
- name: "my_tool"
description: "Example HTTP backend"
backend:
kind: http
url: "https://api.example.com/endpoint"
method: post
timeout_ms: 5000
Documentation
| Document | Description |
|---|---|
| docs/architecture.md | System architecture, module structure, request flow |
| docs/request-flow.md | Complete request lifecycle, all routes, plugin extension points |
| docs/configuration.md | Complete configuration reference |
| docs/backends.md | Backend kinds and connector plugins with examples |
| docs/pipelines.md | Pipeline execution, 11 step types, suspension/resumption |
| docs/identity-and-authorization.md | JWKS, OIDC/OAuth, trust levels, CEL policy |
| docs/infrastructure.md | Session stores, delivery buses, pipeline stores |
| docs/observability.md | Logging, Prometheus metrics, OpenTelemetry |
| docs/api-reference.md | HTTP endpoints, MCP operations, SSE protocol |
| docs/deployment.md | Docker, Kubernetes/Helm, deployment topologies |
| docs/plugins.md | Plugin system: traits, registry, Wasm, config |
| Kubernetes install with Helm | Helm chart reference — parameters, examples, architecture |
Architecture at a Glance
MCP Client
│
▼
HTTP Transport ──→ Identity Resolution ──→ Gateway Runtime ──→ Plugin Chain ──→ Backend Execution
│ (OIDC/JWKS/Plugin) │ (gate/transform) (backend plugins)
│ │
├── SSE Streaming Session Management
│ (replay window) (4 store backends)
│
└── Prometheus + OpenTelemetry
Plugin System Crates
libs/
├── plugin-protocol/ — Trait contracts + FFI ABI types (ToolGatePlugin, BackendPlugin, etc.)
├── plugin-host/ — Registry, chain evaluation, Wasm hosting, artifact verification
├── plugin-sdk/ — SDK for building plugins (testing helpers, MockGateway)
├── sdk/ — `mcpg-sdk` umbrella crate plugin authors depend on
└── plugins/ — the production catalog: 92 shipping plugins across 14
categories (backend, security, identity, transform,
observability, payment, credential, …), cdylib + a few Wasm
Design Decisions
Key architectural decisions:
- ADR-0001: Single-deployment, backend-driven runtime (no multi-tenancy)
- ADR-0004: Canonical backend execution contract (gateway as protocol authority)
- ADR-0005: Multi-node lease fencing with CAS semantics
- ADR-0007: OIDC/OAuth multi-provider authentication
License
The gateway core is Apache-2.0 (see LICENSE). Enterprise plugins and the fleet platform (Kubernetes operator, control plane) ship under BUSL-1.1, each release auto-converting to Apache-2.0 three years later. To license production use of the BUSL-1.1 components, email agent@mcpg.dev or use the managed service at mcpg.cloud. The canonical component map is at mcpg.dev/license.
Backend governance integrates with the policy layer. Each backend's minimum_trust and allow_if are injected as per-tool policy rules at startup. CEL expressions are compiled and validated during bootstrap.
Debug Tools
The debug capability model is intentionally narrow:
- the top-level
debug.enabled: truegate must be set before any debug capabilities exist - command probes, network probes, and the debug HTTP JSON call use named execution profiles (under
debug.tools.command_profiles/debug.tools.network_profiles) with bounded timeout and size limits - built-in debug tools, prompt, and resource capabilities can be exposed or hidden independently via
debug.tools.exposure.* - debug tools emit structured logs with
backend_kind: debug_toolto distinguish from operator backends
Execution Contract
All downstream execution paths produce structured result envelopes with:
- tool name, profile, and request kind classification
- request and response details
- structured error objects with category, retry hints, idempotency, and suggested actions
- execution duration, status codes, and truncation indicators
Execution logs include backend_kind (operator_backend or debug_tool) on all call sites.
MCPG MCP 질문
MCPG MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add mcpg -- npx -y model-context-protocol-gateway를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
MCPG MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
MCPG MCP는 어떤 도구를 제공하나요?
1개 도구를 제공합니다. 예: built.
MCPG는 무엇을 하나요?
MCP 클라이언트와 백엔드 시스템 사이의 게이트웨이 역할을 하며 프로토콜 처리, 세션 수명 주기, 신원 관리, 권한 부여 및 관측성을 담당합니다.
Kubernetes에 MCPG를 어떻게 배포하나요?
Helm 차트를 사용하여 배포할 수 있으며, 단일 인스턴스 또는 NATS 백엔드를 사용한 고가용성 옵션을 제공합니다.