Skip to main content
The mcp-agent CLI is the primary interface for project scaffolding, deployment, and day‑to‑day management of MCP Agent Cloud. Run commands ad hoc with uvx mcp-agent … (no install required). If mcp-agent is listed in your project dependencies, uv run mcp-agent … executes inside that environment.
Every command honours the global flags --verbose/-v, --quiet/-q, --format <text|json|yaml>, --color/--no-color, and --version.

Quick reference

Primary workflows

Log in to MCP Agent Cloud

After authenticating, uvx mcp-agent cloud auth whoami confirms the active account (use uv run mcp-agent … if you prefer to stay inside your project environment). Run uvx mcp-agent cloud auth logout to clear stored credentials.

Initialise a project (mcp-agent init)

Recent CLI changes fold the old quickstart command into mcp-agent init. You can now scaffold config files or copy full examples from one entry point. Scaffolding templates Quickstart examples (--quickstart <name>) Examples:

Deploy an application (mcp-agent deploy)

Use --dry-run for validation without uploading, and let the CLI guide you through classifying developer versus user secrets. When deployment completes you will see two new artefacts next to your source:
  • mcp_agent.deployed.secrets.yaml – transformed secrets file containing opaque handles plus an env section.
  • mcp_agent.deployed.config.yaml – the configuration snapshot that the control plane consumes (safe to commit).
Add an env list to mcp_agent.config.yaml whenever you want to capture environment variables as deployment secrets:
Keys are processed in order, pulling from os.environ first, then the optional fallback literal. Each value is stored as a secret handle under env: in mcp_agent.deployed.secrets.yaml.

List deployed servers (mcp-agent cloud servers list)

cloud servers describe <SERVER_ID> and cloud servers workflows <SERVER_ID> share the same formatting flag and surface deep metadata such as server URLs, current status, and published workflows.

Install a deployed MCP server (mcp-agent install)

For authenticated clients, the CLI injects MCP_API_KEY automatically. Use --dry-run when sharing configuration snippets or validating changes before committing them.

Tail logs for a running application (mcp-agent cloud logger tail)

Use streaming (--follow) when you need real-time visibility; combine --since with --grep to audit historical runs.

Configure a deployed server (mcp-agent cloud configure)

This workflow lets you adopt a published server template, supply your credentials (LLM keys, database passwords, etc.), and produce a new server deployment associated with your account.

Cloud management commands

  • Apps (mcp-agent cloud apps …) – manage logical applications.
    • apps status <APP_ID> displays health, version, and associated servers.
    • apps workflows <APP_ID> enumerates workflows exposed by that app.
    • apps delete <APP_ID> removes the application; apps update refreshes metadata.
  • Logs (mcp-agent cloud logger tail …) – fetch or stream logs.
    • --since 1h, --grep, --limit/-n, and --order-by timestamp|severity tune batch retrieval.
    • --follow/-f enables streaming (mutually exclusive with the filtering flags).
    • --format text|json|yaml controls output.
  • Configure (mcp-agent cloud configure --id <SERVER_URL> …) – collect user secrets after deployment.
    • --secrets-file/-s reuses an authored secrets.yaml.
    • --secrets-output-file/-o chooses where prompted secrets are written (defaults to mcp_agent.configured.secrets.yaml).
    • --params lists required secrets and exits.
    • --dry-run validates using mock clients without persisting anything.
  • Env (mcp-agent cloud env …) – manage environment secrets captured during deploy.
    • env list [APP] displays stored environment keys with masked handles.
    • env add <KEY> <VALUE> [APP] (or --from-env-file .env.local) creates or updates secret values (apps/<app_id>/env/<KEY>).
    • env remove <KEY> [APP] deletes the stored handle.
    • env pull [APP] --format env|yaml --output <FILE> downloads resolved values as either a dotenv file (default .env.mcp-cloud) or a YAML file. .env is loaded first (developer overrides), followed by .env.mcp-cloud, before config-driven fallbacks are applied.
    • --app/-a, --api-url, --api-key allow per-command overrides (use --app when omitting positional arguments or when using --from-env-file).
  • Auth (mcp-agent cloud auth …) – the same login, whoami, and logout commands exposed at the top level, handy for scripts.
  • Workflows (mcp-agent cloud workflows …) – inspect and control durable workflow runs.
    • workflows list <SERVER|URL> [--format text|json|yaml] lists workflow definitions.
    • workflows runs <SERVER|URL> surfaces recent executions.
    • workflows describe|status <SERVER> <RUN_ID> shows execution details.
    • workflows resume|suspend|cancel <SERVER> <RUN_ID> manipulates in-flight runs.
Example session:

Local development helpers

  • mcp-agent dev start – run your app locally with optional file watching (auto-detects main.py, then agent.py when --script is omitted). Companion subcommands include dev chat, dev go, dev invoke, dev serve, dev logs, dev keys, and dev models.
  • mcp-agent config show|check|edit|builder – inspect YAML, validate schemas, or generate config files with an interactive questionnaire (builder supports templates and expert mode).
  • mcp-agent doctor – end-to-end diagnostics across configuration, secrets, provider keys, required MCP servers, and network connectivity.
  • mcp-agent install --dry-run – even for local experiments, emit ready-to-paste client snippets without touching disk.
These commands respect the same settings discovery as the runtime: preload strings (MCP_APP_SETTINGS_PRELOAD), explicit paths, discovered mcp_agent.config.yaml/mcp_agent.secrets.yaml, and environment variables. Append --help whenever you need the latest options or examples.