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

CommandPurposeExample
loginAuthenticate with MCP Agent Cloud.uvx mcp-agent login --no-open
initScaffold a project from a template.uvx mcp-agent init --template basic --dir apps/agent
init --quickstartCopy a curated quickstart example.uvx mcp-agent init --quickstart workflow --dir ./workflow-demo
deploy <APP_NAME>Package the current directory and deploy it.uvx mcp-agent deploy research-agent --non-interactive
cloud servers listList deployed or configured servers.uvx mcp-agent cloud servers list --filter prod --format json
install --client claude_code <URL>Register a deployed server with a local MCP client.uvx mcp-agent install https://srv_abc.deployments... --client claude_code

Primary workflows

Log in to MCP Agent Cloud

uvx mcp-agent login
OptionDescription
--api-key TEXTProvide an existing API key (also reads MCP_API_KEY).
--no-openPrevent the CLI from opening a browser tab during login.
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.
FlagDescription
--dir, -d PATHDestination directory (defaults to .).
--template, -t TEXTScaffolding template.
--quickstart TEXTCopy an example project (backwards compatible with mcp-agent quickstart).
--force, -fOverwrite existing files.
--no-gitignoreSkip writing .gitignore.
--list, -lDisplay available templates with descriptions.
interactiveGuided prompts for template selection and configuration.
Scaffolding templates
TemplateWhat you get
basicAsyncio agent with filesystem & fetch servers plus main.py.
serverMCP server starter with workflow + parallel agent examples.
tokenToken accounting example with telemetry and monitoring hooks.
factoryRouter-backed agent factory pattern.
minimalBare configuration files—bring your own application code.
Quickstart examples (--quickstart <name>)
TemplateContents
workflowEvery workflow pattern (router, deep orchestrator, swarm, parallel).
researcherResearch assistant use case with routing and evaluation hooks.
data-analysisFinancial analysis agent that demonstrates multi-server orchestration.
state-transferWorkflow router showcasing explicit state passing.
mcp-basic-agentFinder agent from the README, ready to run via uvx python main.py or uv run main.py.
token-counterStructured logging + token metering starter.
agent-factoryAgent factory with declarative routing rules.
basic-agent-server, reference-agent-serverComplete MCP server implementations (asyncio + reference).
elicitation, sampling, notificationsPackaged MCP server variations installed via mcp_agent.data.examples.
hello-worldBasic cloud-deployable example with simple tool calls.
mcpComprehensive MCP server example showcasing tools, sampling, elicitation, notifications, prompts, and resources.
temporalTemporal integration example with durable workflows and pause/resume patterns.
chatgpt-appChatGPT App with interactive UI widgets (coin flip example with React frontend).
Examples:
uvx mcp-agent init --template basic --dir apps/research-agent
uvx mcp-agent init --quickstart workflow --dir ./workflow-demo --force
uvx mcp-agent init --list

Deploy an application (mcp-agent deploy)

uvx mcp-agent deploy research-app \
  --config-dir ./deploy \
  --ignore-file .deployignore \
  --non-interactive
OptionDescription
APP_NAMEOptional friendly name for the deployment.
--config-dir, -c DIRECTORYDirectory containing configuration and source (defaults to the working directory).
--working-dir, -w DIRECTORYBase directory for resolving relative paths.
--app-description, -d TEXTUpdate the app description shown in Cloud.
--non-interactiveFail instead of prompting (crucial for CI/CD).
--no-auth/--authToggle unauthenticated server access (preserves existing setting by default).
--ignore-file FILEGitignore-style patterns (precedence: CLI > .mcpacignore in --config-dir > .mcpacignore in working dir).
--git-tag / --no-git-tagCreate a local git tag for the deployment.
--retry-count INTEGERDeployment retry attempts (1–10, default 3).
--api-url, --api-keyOverride Cloud endpoint or use specific credentials (respect env vars).
Use --dry-run for validation without uploading, and let the CLI guide you through classifying developer versus user secrets.

List deployed servers (mcp-agent cloud servers list)

uvx mcp-agent cloud servers list --filter prod --sort-by -created --format json
uvx mcp-agent cloud servers describe srv_123
OptionDescription
--limitMaximum number of entries (default 100).
--filterCase-insensitive filter applied to server name, description, or status.
--sort-bySort by name, created, or status (prefix with - for reverse order).
--formatOutput format (text, json, yaml).
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)

uvx mcp-agent install https://srv_abc.deployments.mcp-agent.com \
  --client claude_desktop \
  --name research-buddy \
  --dry-run
OptionDescription
SERVER_IDENTIFIERHTTPS or SSE URL from the deployment dashboard.
--client, -c TEXTDestination client (vscode, claude_code, cursor, claude_desktop, chatgpt).
--name, -n TEXTOverride the generated client entry name.
--dry-runPrint the configuration block without writing to disk.
--force, -fOverwrite existing entries.
--api-url, --api-keyOverride Cloud endpoints or credentials (fallback to env vars).
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)

uvx mcp-agent cloud logger tail srv_abc123 --follow
OptionDescription
--follow/-fStream logs continuously (mutually exclusive with --since, --limit, --order-by, --asc, or --desc).
--grepFilter log messages using a regex (e.g., `—grep “ERRORWARN”`).
--formatRender output as text, json, or yaml.
--limit/-nMaximum entries to fetch in batch mode (default 100).
--sinceShow logs from a relative duration (e.g., 1h, 30m).
--order-by, --asc, --descSort batched results (default is newest first).
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)

uvx mcp-agent cloud configure \
  --id https://srv_base.deployments.mcp-agent.com/mcp \
  --secrets-file team-secrets.yaml
OptionDescription
--id/-iServer URL to clone and configure with your own secrets.
--secrets-file/-sYAML file containing values for required user secrets.
--secrets-output-file/-oDestination for prompted secrets (defaults to mcp_agent.configured.secrets.yaml).
--paramsList required secrets and exit without configuring.
--dry-runValidate required parameters using mock clients without persisting secrets.
--api-url, --api-keyOverride Cloud endpoint or credentials.
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.
    • --api-url, --api-key allow per-command overrides.
  • 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:
# Inspect available servers
uvx mcp-agent cloud servers list

# Tail logs for a specific deployment
uvx mcp-agent cloud logger tail srv_abc123 --follow

# Resume a paused workflow run
uvx mcp-agent cloud workflows resume srv_abc123 run_xyz789

# Review required secrets before configuring an app
uvx mcp-agent cloud configure --id https://srv_abc123.deployments.mcp-agent.com/mcp --params

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.
I