Agentic onboarding from the CLI
Set up MCP Stack from a terminal, fund the organization, and operate servers and agents without using the dashboard.
Automation can onboard MCP Stack from the CLI. The only required browser step is the normal cardholder or OAuth step, when your organization chooses those payment or login rails. MCP Stack entitlement comes from server-side billing state, not from loading the dashboard.
For a human-assisted first run:
mcpstack auth login --no-browser
mcpstack auth whoami --json
mcpstack org list --jsonFor steady-state automation, use a service-account key created by an Owner or Admin:
export MCPSTACK_API_URL=https://api.mcpstack.com
export MCPSTACK_ORG_ID=org_123
export MCPSTACK_API_KEY=mcpstack_sk_...
mcpstack auth statusSee API keys and service accounts for key creation and role selection.
Read current state:
mcpstack billing status --jsonStart a non-interactive credit checkout and wait for entitlement. For the billing-only path, see CLI Checkout for Agents.
mcpstack billing credits checkout --amount 25 --non-interactive --wait --jsonThe command prints a Stripe Checkout URL immediately, waits while payment is completed, and exits after the organization balance is refreshed. If your runner cannot keep the process open, omit --wait, complete the printed Stripe URL, and run billing wait.
mcpstack billing credits ledger --jsonmcpstack billing plans list --json
mcpstack billing checkout --plan mcp_hosting_team --non-interactive --wait --jsonComplete the printed Stripe URL while the command waits. If your runner has to split checkout and waiting into separate steps, omit --wait and run billing wait after Stripe completes.
Hosted plan checkout changes the organization entitlement after server-side billing completion. It does not depend on a dashboard page load.
mcpstack servers create \
--name "Support API" \
--openapi-file ./openapi.yaml \
--runtime-type hosted \
--json
mcpstack operations list mcp_123 --json
mcpstack smoke tools-list mcp_123 --jsonAttach Gateway first when your upstream API requires user-scoped OAuth. See Configure Gateway.
mcpstack agents list --json
mcpstack agents get ag_123 --json
mcpstack agents usage ag_123 --jsonSet per-user budget caps for embedded agents:
mcpstack agents budget defaults ag_123 --monthly-usd 10000 --default-user-usd 5 --json
mcpstack agents budget set ag_123 --user customer_abc --monthly-usd 5 --jsonUse a human OAuth login only to bootstrap an organization and create service-account keys. After that, run automation with:
MCPSTACK_API_KEYMCPSTACK_ORG_IDMCPSTACK_OUTPUT=jsonbilling ... checkout --non-interactive --wait --json for one-command checkoutbilling wait only when checkout and waiting must be split across processesAgents can fund and operate MCP Stack with billing credits checkout --non-interactive --wait --json, the printed Stripe URL, and the normal server/agent commands. The dashboard is optional.