Ein Protocol-Authority-Gateway, das Identity, Authorization und Execution Dispatch für Model Context Protocol Clients und Backends verwaltet.
Auch bekannt als mcpg-dev/mcpg, model-context-protocol-gateway
- Stars
- 0
- Tools
- 1
- Downloads, 30 Tage
- —
- Neueste Version
- —
- Letzter Commit
- 13. Nov. 2026
- Lizenz
- Apache-2.0
Was ist MCPG MCP?
MCPG ist ein MCP server. Ein Protocol-Authority-Gateway, das Identity, Authorization und Execution Dispatch für Model Context Protocol Clients und Backends verwaltet. Er stellt 1 Tool bereit, etwa built.
Zusammenfassung generiert aus dem README des Projekts
Über MCPG MCP server
mcpg ermöglicht die Verwaltung von Identity, Authorization und Execution Dispatch für Model Context Protocol Clients und Backends. Es fungiert als Protocol-Authority-Gateway zwischen Clients und Downstream-Systemen und übernimmt den gesamten Session Lifecycle sowie die Protocol-Implementierung. Entwickler können es lokal über cargo oder npm deployen oder in Produktionsumgebungen via Docker und Kubernetes mit Helm charts.
Das Gateway routet Tool Calls, Prompt Requests und Resource Reads über ein Plugin-System an operator-definierte Backends. Es unterstützt verschiedene Kommunikationsmethoden wie HTTP, gRPC, SQL und Messaging-Systeme wie NATS oder Kafka. Zudem verwaltet es Outbound Credentials über die credential_issuer Plugin-Familie, wodurch Backends auf ausgestellte Werte über spezifische URIs zugreifen können.
Sicherheit steht im Fokus: Das System erzwingt eine Authorization vor dem Dispatch mittels CEL Expressions und löst Identity über OIDC, OAuth oder JWKS auf. Durch Prometheus Metrics und OpenTelemetry Traces wird Observability gewährleistet, sodass komplexe Multi-Step-Pipelines und task-augmented Tool Calls vollständig überwacht und kontrolliert werden können.
Was du damit machen kannst
- 1Sichere Tool-AusführungEin AI Client kann Tool Calls auslösen, die durch spezifische Trust Levels und CEL Expressions gefiltert werden, bevor sie das Backend erreichen.
- 2Automatisierte Credential-VerwaltungEin Entwickler kann das Handling von OAuth 2.0 oder Vault dynamischen Datenbank-Credentials an das Plugin-System des Gateways delegieren.
- 3Anbindung diverser DatenquellenDu kannst MCP Requests an eine Vielzahl von Backends routen, einschließlich SQL-Datenbanken, GraphQL APIs oder LLM Providern.
- 4Orchestrierung komplexer WorkflowsEin Agent kann Multi-Step-Pipelines ausführen, die eine Interaktion mit dem Client für Sampling oder Elicitation erfordern.
Geschrieben aus dem README des Projekts. Jeder Use Case wurde gegen ein Zitat daraus geprüft.
So installierst du MCPG MCP
Formate geprüft am 10. Nov. 2026Zu Cursor hinzufügenZu Goose hinzufügenMCPG MCP in Claude Code installieren
$ claude mcp add mcpg -- npx -y model-context-protocol-gatewayMCPG MCP in Cursor installieren
~/.cursor/mcp.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}MCPG MCP in VS Code installieren
.vscode/mcp.json
{
"servers": {
"mcpg": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}MCPG MCP in VS Code CLI installieren
$ code --add-mcp '{"name":"mcpg","type":"stdio","command":"npx","args":["-y","model-context-protocol-gateway"]}'MCPG MCP in Claude Desktop installieren
claude_desktop_config.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}MCPG MCP in Codex installieren
$ codex mcp add mcpg -- npx -y model-context-protocol-gatewayMCPG MCP in Codex config.toml installieren
~/.codex/config.toml
[mcp_servers.mcpg] command = "npx" args = ["-y", "model-context-protocol-gateway"]
MCPG MCP in Gemini CLI installieren
$ gemini mcp add -s user mcpg npx -- -y model-context-protocol-gatewayMCPG MCP in Gemini settings.json installieren
~/.gemini/settings.json
{
"mcpServers": {
"mcpg": {
"command": "npx",
"args": [
"-y",
"model-context-protocol-gateway"
]
}
}
}MCPG MCP tools 1
Erkannt aus dem READMEbuilt
| built | — |
Konfiguration
MCPG_CONFIG
| Name | Beschreibung | Typ |
|---|---|---|
| MCPG_CONFIG | — |
Automatisierte Checks
Geluften am 14. Nov. 2026Vollständiger Bericht →Unsere automatisierten Checks bestanden. Das ist kein Security-Audit: Lies den Code und gib dem Server nur den minimal notwendigen Zugriff. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbarmcpg-dev/mcpg is public and reachablegithub.com/mcpg-dev/mcpg ↗Bestanden
- Paket nennt dieses Repository als Quellemodel-context-protocol-gateway names mcpg-dev/mcpg as sourcenpmjs.com/package/model-context-protocol-gateway ↗Bestanden
- Build-Provenienz (Sigstore-Attestierung)Sigstore attestation for model-context-protocol-gatewaynpmjs.com/package/model-context-protocol-gateway/v/0.1.0-rc. ↗Bestanden
- Open Source Lizenz (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Bestanden
- Commit oder Release im letzten JahrLast commit or release 2026-11-13github.com/mcpg-dev/mcpg ↗Bestanden
- OpenSSF ScorecardNicht geprüft
- Package-Name ähnelt keinem populären PackageNo popular package one edit away from model-context-protocol-gatewayBestanden
- Keine kritischen Advisories im Paket oder seinen AbhängigkeitenNicht geprüft
- Keine versteckten Anweisungen an das Modell1 tool description and the README read; no override phrases, credential paths or hidden charactersBestanden
- Destruktive Tools sind markiertNo tool named like delete, drop or execBestanden
- Remote-Endpoint beantwortet den MCP-HandshakeNicht geprüft
README
Auf GitHub ansehenMCPG — 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 Fragen
Wie füge ich MCPG MCP zu Claude Code hinzu?
Führe claude mcp add mcpg -- npx -y model-context-protocol-gateway in deinem Terminal aus. Füge --scope user hinzu, damit der Server in jedem Projekt verfügbar ist.
Wie füge ich MCPG MCP zu Cursor hinzu?
Öffne ~/.cursor/mcp.json und füge den Server unter mcpServers hinzu, mit der Cursor-Config aus dem Installationsabschnitt oben.
Welche Tools bietet MCPG MCP?
Er stellt 1 Tool bereit, darunter built.
Was macht MCPG?
Es fungiert als Gateway zwischen MCP Clients und Backend-Systemen und übernimmt das Protocol Handling, den Session Lifecycle, Identity, Authorization sowie Observability.
Wie kann ich MCPG auf Kubernetes deployen?
Du kannst es mittels Helm charts deployen, mit Optionen für eine Single Instance oder High Availability unter Verwendung eines NATS Backends.