Skip to content

MCP Tools Reference

The MCTL MCP server exposes 45 tools for managing your infrastructure. Each tool is annotated as either read-only or destructive.

Identity

ToolDescriptionType
mctl_whoamiCheck authentication status, user ID, team memberships, admin status, and accessible namespacesRead

Tenants

ToolDescriptionType
mctl_list_tenantsList all team workspaces with resource quotas and member counts (admin only)Read
mctl_get_tenantGet workspace details: members, quotas, and deployed servicesRead
mctl_create_tenantCreate a new workspace with namespace, resource quotas, network policies, Vault scope, ArgoCD RBAC, and SSO accessWrite
mctl_delete_tenantPermanently delete a workspace and all its resources. Retires all services firstDestructive

Services

ToolDescriptionType
mctl_list_servicesList deployed services showing name, team, image tag, host, and database status. Optional team filterRead
mctl_get_service_statusGet ArgoCD sync state, health status, and service configurationRead
mctl_get_service_configGet full configuration from GitOps: image tag, host, port, component type, database statusRead
mctl_get_service_logsFetch recent log lines from Loki, sorted by timestamp (most recent first)Read
mctl_get_resource_usageGet resource quota usage: CPU, memory, pods used vs allocatedRead
mctl_deploy_serviceDeploy a service. Actions: "onboard" (first-time), "deploy" (update version), "update-config" (change env/secrets)Write
mctl_scale_serviceUpdate autoscaling: enable/disable HPA, set min/max replicas and CPU thresholdWrite
mctl_rollback_serviceRoll back to a previously deployed image tag via GitOpsWrite
mctl_retire_servicePermanently remove a service: deletes GitOps manifests, Vault secrets, ArgoCD app, and K8s resourcesDestructive

Operations & Workflows

ToolDescriptionType
mctl_list_operationsList all available platform operations with parameters, risk levels, and descriptionsRead
mctl_get_operationGet detailed schema of an operation: parameters, types, defaults, validation, risk levelRead
mctl_list_recent_operationsList most recent platform operations from audit log (up to 50 entries)Read
mctl_list_workflowsList recent Argo Workflow runs for a team. Admins see all namespacesRead
mctl_get_workflow_statusGet status and logs of an Argo Workflow runRead

Incidents

ToolDescriptionType
mctl_list_incidentsList incidents (AlertManager alerts, GitHub Actions failures, polling). Filter by team, service, status, severityRead
mctl_get_incidentGet full incident details including evidence, analysis, and PR info. Accepts full ID or 8-char prefixRead
mctl_incident_summaryGet aggregate counts of active incidents by status, severity, and typeRead
mctl_acknowledge_incidentMark an incident as acknowledged. Records current user as acknowledgerWrite
mctl_resolve_incidentMark an incident as resolved with optional reasonWrite

Domains

ToolDescriptionType
mctl_list_domainsList custom domains for a team or service. Shows status (pending/verified/active)Read
mctl_verify_domainCheck if a domain's CNAME record points to the expected targetRead
mctl_add_custom_domainAdd a custom domain to a deployed service. Triggers DNS verification and TLS provisioningWrite
mctl_remove_custom_domainRemove a custom domain from a service. Auto-generated domain is not affectedDestructive

Databases

ToolDescriptionType
mctl_provision_databaseProvision PostgreSQL on shared CNPG cluster. Creates database/role, stores credentials in Vault and K8s SecretWrite

Preview Environments

ToolDescriptionType
mctl_list_previewsList active previews with health status, sync state, and namespaceRead
mctl_create_previewDeploy ephemeral preview from existing image tag. Auto-deleted after TTL (default: 24h)Write
mctl_delete_previewRemove a preview environment and all its K8s resources immediatelyDestructive

Repositories

ToolDescriptionType
mctl_list_reposList GitHub repos available to a team. Admins see org + personal reposRead
mctl_grant_repo_accessGenerate GitHub App installation URL to grant platform access to a repoWrite
mctl_sync_reposDiscover and register GitHub repos from App installations for a teamWrite

OpenClaw (Resource Optimization)

ToolDescriptionType
mctl_get_openclaw_sizing_recommendationRead VictoriaMetrics history and return recommended resource profileRead
mctl_deploy_openclawPrepare self-service OpenClaw deployment. Returns Telegram bot-token intake URLWrite
mctl_resume_openclaw_deployResume onboarding after bot token saved. Provisions database and submits deploy workflowWrite
mctl_apply_openclaw_resource_profileApply a named runtime profile (startup, steady-medium, steady-small) via GitOpsWrite

mctl-agents pipeline controls

Admin-only. All tools in this section require membership in the admins group. Calls from non-admin users return 403 Forbidden.

Version note: available as of mctl-api 4.15.0 (commit 016b3c8) and 4.16.0 (f41590e). version-status: unverified — confirm against production before relying on this page.

The mctl platform runs a daily autonomous R&D pipeline (mctl-agents) that scans sibling repos for changes, identifies documentation gaps, and writes spec proposals — one cycle per service (researcher → analyst → spec-writer). A Tier 2 implementer can also convert accepted proposals into pull requests automatically.

The five tools below let platform admins drive this pipeline on demand from any MCP-capable client (e.g. Claude Desktop, Claude Code).

Tool summary

ToolPurposeReturns
mctl_trigger_agents_runFull pipeline — all service-agents + mentor digestworkflow_name
mctl_trigger_mentor_onlyMentor weekly digest onlyworkflow_name
mctl_trigger_single_serviceOne service-agent cycleworkflow_name
mctl_list_recent_agent_runsList ≤10 recent pipeline runs from audit log{ "items": [...], "count": N }
mctl_trigger_implementerTier 2: open PRs for accepted proposalsworkflow_name
mctl_trigger_shepherdTier 3: drive open implementer PRs through review and mergeworkflow_name

mctl_trigger_agents_run

Triggers a full mctl-agents run: every service-agent (researcher → analyst → spec-writer in parallel) followed by the mentor weekly digest. Equivalent to the daily 06:00 UTC cron, but on demand.

Parameters: none

Cost / duration: ~$10 against Claude subscription quota; ~15 minutes.

Result: A chore(agents) commit lands in mctl-gitops main under platform-gitops/agents-state/ with new inbox files, proposals, and updated .status.yaml entries.

Returns: workflow_name string — use with mctl_get_workflow_status to track progress.

mctl_trigger_agents_run()
# → { "workflow_name": "mctl-agents-daily-abc12" }

mctl_trigger_mentor_only

Runs only the mentor sub-agent, which reads all service inbox files from the past week and produces a cross-service digest. Lighter than the full run.

Parameters: none

Cost / duration: ~$2, ~5 minutes.

Returns: workflow_name


mctl_trigger_single_service

Runs the researcher → analyst → spec-writer cycle for a single service only. Useful for spot-checking one repo after a significant release.

Parameters:

NameTypeRequiredDescription
servicestring (enum)yesOne of: mctl-web, mctl-openclaw, mctl-docs, mctl-api, mctl-portal, mctl-agent, mctl-gitops

Cost / duration: ~$2–5, ~5–10 minutes.

Returns: workflow_name

Example:

mctl_trigger_single_service(service="mctl-docs")
# → { "workflow_name": "mctl-agents-single-xyz99" }

mctl_list_recent_agent_runs

Returns up to 10 recent mctl-agents pipeline runs from the audit log, enriched with the run mode and target service so you don't need to parse the workflow name.

Parameters: none

Returns: JSON object { "items": [...], "count": N } where each item has:

FieldDescription
workflowNameArgo workflow name (use for status polling)
operationOperation name (mctl-agents-run, mctl-agents-implement, …)
modeRun mode (full, mentor-only, single-service)
serviceTarget service (empty for full/mentor runs)
statusLast known status (running, succeeded, failed)
userAdmin user ID who triggered the run
timestampISO8601 start time
riskLevelhigh for all mctl-agents triggers
messageShort status message

mctl_trigger_implementer

Triggers Tier 2 implementer agents. The implementer scans platform-gitops/agents-state/<service>/proposals/<slug>/.status.yaml for entries with status: accepted. For each accepted proposal it:

  1. Clones the matching mctlhq/<service> repo.
  2. Runs the per-service implementer sub-agent to make the change.
  3. Pushes a feat/agents-<slug> branch and opens a PR.
  4. Updates .status.yaml to status: implemented with the PR URL.

Parameters:

NameTypeRequiredDescription
servicestring (enum)noFilter to one service. Leave empty to process all services. Same enum as mctl_trigger_single_service.
slugstringnoFilter to one proposal slug (across services unless service is also set).
force"true" | "false"noRetry proposals stuck in in-progress (e.g. from a crashed run). Default "false".

Cost / duration: ~$3 per proposal; 1–10 minutes per proposal.

Returns: workflow_name

Example — implement one specific proposal:

mctl_trigger_implementer(service="mctl-docs", slug="mcp-agents-tools")
# → { "workflow_name": "mctl-agents-implement-abc34" }

mctl_trigger_shepherd

Triggers the Tier 3 PR shepherd. The shepherd scans every open PR opened by the implementer (feat/agents-* branches in mctlhq/mctl-* repos) and advances each one toward merge:

  1. Reads the latest Codex review state for the PR.
  2. If P1/P2 findings are present, runs the per-service implementer sub-agent to push a fix-up commit addressing the feedback.
  3. If the review is clean and CI is green, merges the PR with --merge --delete-branch and flips the proposal's .status.yaml to status: merged.
  4. If the proposal is unsalvageable (repeated review failures, or Codex flags a hard blocker), it closes the PR and flips the status to status: rejected.

The shepherd also runs autonomously on a 30 */2 * * * UTC cron, so on-demand triggers are mainly for "I just merged a fix, advance the queue now" cases.

Parameters: none

Cost / duration: ~$1–5 per active PR; 2–15 minutes total per run.

Concurrency: Contends on the mctl-gitops-main-writes Argo mutex with the implementer and other gitops-writing workflows, so two runs cannot overlap.

Returns: workflow_name

mctl_trigger_shepherd()
# → { "workflow_name": "mctl-agents-shepherd-xyz78" }

Status polling

All trigger tools return a workflow_name. Poll for progress with:

mctl_get_workflow_status(workflow_name="mctl-agents-daily-abc12")

Or check the last few runs at any time:

mctl_list_recent_agent_runs()

Results also appear as chore(agents) commits in the mctl-gitops repository under platform-gitops/agents-state/.


Tool Annotations

Tools are annotated with behavior hints for AI clients:

  • Read (readOnly: true) — safe to call without side effects
  • Write — modifies resources, requires confirmation
  • Destructive (destructive: true) — deletes resources, requires explicit confirmation