Reference
Reference

mcpg cp (control plane)

Run the MCPG Control Plane (serve / serve --dev), mint gateway-enrollment URLs, and check a CP’s health.

mcpg cp — the control plane

The control plane ships as one binary, mcpg-cp, reached as mcpg cp … through the front door or invoked directly (containers run mcpg-cp serve). It replaced the old wedge CLI — running servers belongs to the server binary itself (see the CLI design doc §4.1 for the mapping).

text
mcpg cp serve               Run the CP server (HTTP REST/UI :7843 + agent gRPC :7844).
                            All MCPG_CP_* / MCPG_CONTROL_PLANE_* env vars and flags
                            unchanged — `mcpg cp serve --help` is the full reference.
mcpg cp serve --dev         Tier-0 development defaults: sqlite db in the state dir
                            (MCPG_STATE_DIR, default ~/.mcpg), auth_mode=none,
                            external URL derived from the HTTP bind.
mcpg cp enroll new          Mint a gateway-enrollment URL (the thing
                            `mcpg --enroll <URL>` consumes). Defaults to
                            default/default/default; --org/--workspace/--env,
                            --reusable, --ttl-secs.
mcpg cp status              Health + version of the CP at --cp-url, plus the local
                            state-dir/db hints.

The self-host loop

bash
mcpg cp serve --dev                      # terminal 1 — console on http://127.0.0.1:7843
mcpg cp enroll new                       # mint an enrollment URL
mcpg --enroll "<the printed URL>"        # terminal 2 — gateway attaches + enrolls
mcpg status                              # box report: gateway + pairing + CP

Or skip the two terminals entirely: mcpg --cp runs the gateway and an embedded control plane in one process, auto-enrolled over loopback (see gateway.md).

Auth

enroll new / status are thin REST clients: they attach the Bearer id_token from mcpg cloud login when credentials exist; a loopback CP (auth_mode=none) needs none.

Production

The CP container image's entrypoint is mcpg-cp serve; every MCPG_CP_* env var keeps its meaning (the explicit MCPG_CONTROL_PLANE_* long forms are mirrored). See docs/SELF-HOSTING-RUNBOOK.md and docs/control-plane/RUNBOOK.md.