Skip to content

CLI

mcpr is a sidecar primitive in the envoy / pgbouncer mold. The launched PID is the proxy itself, so a host process supervisor (terminal, systemd, Docker, your Node app) owns its lifecycle. There is no daemon — mcpr does not list, stop, or restart proxies for you. Use docker ps / systemctl status to see what’s running, and docker stop / systemctl stop / kill -TERM to stop them.

The CLI does not configure proxy behavior — that’s mcpr.toml.

Run a proxy from a config file in the foreground. The launched PID is the proxy. SIGTERM drains gracefully (up to drain_timeout, default 30s).

Terminal window
mcpr proxy run mcpr.toml
mcpr proxy run # defaults to ./mcpr.toml

Restart is the host supervisor’s job (systemd Restart=on-failure, Docker restart=always, k8s restartPolicy).

Interactive setup that connects your proxy to mcpr Cloud. Authenticates via email, lets you pick or create a project and server, generates a project token, and writes mcpr.toml.

Terminal window
mcpr proxy setup # writes ./mcpr.toml
mcpr proxy setup -o /path/to/mcpr.toml # write to a specific path
mcpr proxy setup --cloud-url https://api.mcpr.app

If mcpr.toml already exists, setup reads existing values as defaults.

Print the local store size, row counts, and the age of the oldest and newest events.

Terminal window
mcpr store stats

Delete records older than a duration and reclaim disk.

Terminal window
mcpr store vacuum --before 7d # delete records older than 7 days
mcpr store vacuum --before 30d --proxy myapp # only one proxy
mcpr store vacuum --before 7d --dry-run # show what would be deleted

Validate mcpr.toml and exit. Returns 0 on success, 1 on errors.

Terminal window
mcpr validate # checks ./mcpr.toml
mcpr validate -c /etc/mcpr/mcpr.toml # specific file
mcpr validate --dump # dump resolved config to stdout

Print version and build info as JSON.

Terminal window
mcpr version

mcpr does not ship a query CLI. The local SQLite store at ~/.mcpr/store.db is the source of truth — inspect it directly with the sqlite3 CLI for ad-hoc analysis. For dashboards, charts, search, slow-call detection, and session timelines, stream events to mcpr Cloud.

See the mcpr CLI reference in the open-source repo for the full flag reference.