Reference
mcpg config (config tooling)
One tool to scaffold, validate, document, and inspect the MCPG gateway AppConfig.
mcpg config — config tooling
One binary — mcpg-config — with seven subcommands for authoring,
checking, and understanding the gateway AppConfig. Reached as
mcpg config <sub> through the front door, or invoked directly.
| Command | Purpose | Usage |
|---|---|---|
mcpg config init | Scaffold a config.yaml from a deployment template (or interactive wizard) | mcpg config init [--list] [--template <name>] [--output config.yaml] [--force] |
mcpg config check | Pre-flight validate config (CI / pre-commit) — exit 0/1/2 | mcpg config check <config.yaml> [<override.yaml> …] |
mcpg config schema | Emit the full JSON Schema of AppConfig (IDE autocomplete) | mcpg config schema > config.schema.json |
mcpg config doc | Emit a Markdown config reference (deterministic; for docs) | mcpg config doc > configuration.md |
mcpg config explain | Describe one config field by dotted path (type/default/enum/doc) | mcpg config explain [governance.audit.on_failure] |
mcpg config secrets | List every secret reference (${env.VAR}, scheme://…) the gateway will resolve | mcpg config secrets [--json] <config.yaml> … |
mcpg config wiring | Print the wiring report — which kind: each consumer slot resolves to + loaded plugins | mcpg config wiring <config.yaml> … |
Examples
bash
mcpg config init --template multi-tenant --output ./tenant-prod.yaml # scaffold
mcpg config check base.yaml production.yaml # ✓ valid (8 bindings, audit on)
mcpg config explain governance.audit.on_failure # Type: enum, default fail_closed
mcpg config secrets --json prod.yaml # machine-readable secret inventory
mcpg config wiring config.yaml # consumer slots → resolved kinds
mcpg config schema > config.schema.json # + add yaml-language-server $schema
Templates available to --template: dev-single-node,
production-single-redis, production-redis-cluster,
production-nats-cluster, air-gapped, multi-tenant (--list to see them).
Notes
check/secretsread the on-disk files only (noMCPG_*env overrides), so they review the source of truth you commit.wiringuses the full runtime loader (so it folds inMCPG_*overrides and runs validation).schema/docare deterministic emitters — CI candiffa committed copy to catch drift.- Add the schema reference to your YAML for IDE autocomplete:
# yaml-language-server: $schema=./config.schema.json.