Reference
Reference

mcpg config (config tooling)

One tool to scaffold, validate, document, and inspect the MCPG gateway AppConfig.

mcpg config — config tooling

CLI reference

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.

CommandPurposeUsage
mcpg config initScaffold a config.yaml from a deployment template (or interactive wizard)mcpg config init [--list] [--template <name>] [--output config.yaml] [--force]
mcpg config checkPre-flight validate config (CI / pre-commit) — exit 0/1/2mcpg config check <config.yaml> [<override.yaml> …]
mcpg config schemaEmit the full JSON Schema of AppConfig (IDE autocomplete)mcpg config schema > config.schema.json
mcpg config docEmit a Markdown config reference (deterministic; for docs)mcpg config doc > configuration.md
mcpg config explainDescribe one config field by dotted path (type/default/enum/doc)mcpg config explain [governance.audit.on_failure]
mcpg config secretsList every secret reference (${env.VAR}, scheme://…) the gateway will resolvemcpg config secrets [--json] <config.yaml> …
mcpg config wiringPrint the wiring report — which kind: each consumer slot resolves to + loaded pluginsmcpg 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/secrets read the on-disk files only (no MCPG_* env overrides), so they review the source of truth you commit. wiring uses the full runtime loader (so it folds in MCPG_* overrides and runs validation).
  • schema/doc are deterministic emitters — CI can diff a committed copy to catch drift.
  • Add the schema reference to your YAML for IDE autocomplete: # yaml-language-server: $schema=./config.schema.json.