Skip to main content
Glama

Harbor AIops

Governed Harbor container-registry operations with 39 MCP tools and corresponding CLI commands. Every call is audited and budgeted by the bundled governance harness. Artifact scan, tag creation and high-risk tag deletion have dry-run previews; uncertain results are reported as outcomeUnknown.

What it checks

  • Component health and system volume use.

  • Projects, repository inventory, artifacts, tags, vulnerability reports, quotas and project audit logs.

  • Registry statistics, project members, tag immutability rules, labels and robot metadata (secrets redacted).

  • Latest registry-wide and scheduled scan metrics, plus bounded artifact scan report logs.

  • Guarded deletion of one proven, mutable tag with an absence post-check.

  • Garbage collection execution history.

  • GC execution details and bounded plain-text logs.

  • Replication policies, executions, tasks and bounded task logs.

  • Retention policy, execution, tasks and bounded task logs by actual IDs.

  • harbor_diagnose combines health, volume, GC and replication observations. Failed probes appear as errors with data: null.

Lists have items, returned, limit, and measured truncated fields. They are capped at 500 records per call.

Related MCP server: cicd-aiops

Setup from source

Requires Python 3.11+, uv, and a Harbor instance. Install locally with uv sync --dev. Run uv run harbor-aiops init to configure an HTTPS target and encrypt its password, or create ~/.harbor-aiops/config.yaml with a targets list:

targets:
  - name: primary
    host: harbor.example.com
    username: robot$ops
    scheme: https
    port: 443
    verify_ssl: true
    timeout: 30

Run uv run harbor-aiops secret set primary, then uv run harbor-aiops doctor and uv run harbor-aiops diagnose. The MCP entry point is uv run harbor-aiops-mcp. Set HARBOR_AIOPS_MASTER_PASSWORD for noninteractive secret-store access. TLS verification is enabled by default; ca_file accepts a custom CA PEM.

Scope and verification

The scan-artifact command starts an asynchronous scan and reports an unknown final outcome until its status is checked. create-tag proves the tag was absent and checks that it appeared after the write. delete-tag requires an exact mutable tag on the specified digest, previews the target and confirms absence after deletion. Neither tag write mints an undo token because immutability and later artifact changes can make the inverse unsafe. Retention execution, replication restart, GC start/stop, artifact deletion and policy changes remain outside this release until their actual outcomes and recovery paths can be verified on disposable Harbor. See verification. Missing operations and live-environment feedback are welcome as issues or PRs.

Development

uv run pytest -q, uv run ruff check ., and uv run bandit -r harbor_aiops -ll are local checks. Root handbook gates must pass before release.

Available Tools

39 tools
harbor_artifactA
Read-only

[READ] Get one artifact with tags, scan overview and immutability status.

Use when one artifact reference is known; use harbor_artifacts to enumerate a repository.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: project (required), reference (required), repository (required), target.

harbor_artifactsA
Read-only

[READ] List artifacts, tags and scan overviews in a repository.

Use to discover artifact references in a repository; use harbor_artifact for one reference.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: project (required), repository (required), limit, target.

harbor_create_tagB
Destructive

[WRITE] Create a tag only if its absence was proven and verify it appeared.

Inputs: tag (required), project (required), reference (required), repository (required), +2 more.

harbor_delete_tagA
Destructive

[WRITE] Delete one verified, mutable tag; no safe undo is minted.

Use only for a verified mutable tag. The operation is destructive and creates no safe undo token.

Result: a guarded outcome; dry_run makes no upstream change, and a real tag change is checked by a follow-up read.

Inputs: tag (required), project (required), reference (required), repository (required), +2 more.

harbor_diagnoseA
Read-only

[READ] Correlate health, volume, GC and replication probes; show partial failures.

Use for a cross-component triage; use harbor_health for component health alone.

Result: probes, failedProbes and complete; a failed probe means unknown status for that area.

Inputs: limit, target.

harbor_gc_executionB
Read-only

[READ] Get one Harbor garbage-collection execution's current state.

Inputs: gc_id (required), target.

harbor_gc_historyA
Read-only

[READ] List garbage-collection executions with measured truncation.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: limit, target.

harbor_gc_logB
Read-only

[READ] Read the bounded plain-text log of a GC execution.

Result: bounded text with a measured truncated flag.

Inputs: gc_id (required), target.

harbor_healthA
Read-only

[READ] Get Harbor component health; unknown components remain visible.

Inputs: target.

harbor_immutable_rulesA
Read-only

[READ] List tag immutability rules for a project.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: project (required), limit, target.

harbor_labelsA
Read-only

[READ] List Harbor labels with measured truncation.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: limit, target.

harbor_projectA
Read-only

[READ] Get one Harbor project by name or ID.

Use for one known resource; call harbor_projects to discover IDs.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: name (required), target.

harbor_project_audit_logsB
Read-only

[READ] List a project's Harbor audit logs; not the MCP governance audit.

Inputs: project (required), limit, target.

harbor_project_membersB
Read-only

[READ] List a Harbor project's members with measured truncation.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: project (required), limit, target.

harbor_projectsB
Read-only

[READ] List visible Harbor projects with measured truncation.

Inputs: limit, target.

harbor_project_summaryB
Read-only

[READ] Get Harbor's repository, artifact and storage summary for a project.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: name (required), target.

harbor_quotasA
Read-only

[READ] List registry quota usage and limits.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: limit, target.

harbor_replication_executionA
Read-only

[READ] Get the current state of one replication execution.

Use for one known resource; call harbor_replication_executions to discover IDs.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: execution_id (required), target.

harbor_replication_executionsA
Read-only

[READ] List replication executions, optionally filtered by upstream status.

Use to discover IDs before calling harbor_replication_execution for a single resource.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: limit, status, target.

harbor_replication_policiesA
Read-only

[READ] List replication policies with measured truncation.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: limit, target.

harbor_replication_policyB
Read-only

[READ] Get a replication policy by its Harbor ID.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: policy_id (required), target.

harbor_replication_task_logB
Read-only

[READ] Read the bounded plain-text log of a replication task.

Inputs: task_id (required), execution_id (required), target.

harbor_replication_tasksA
Read-only

[READ] List tasks for one replication execution.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: execution_id (required), limit, target.

harbor_repositoriesA
Read-only

[READ] List repositories inside a Harbor project.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: project (required), limit, target.

harbor_retention_executionsA
Read-only

[READ] List executions of one retention policy with measured truncation.

Result: items, returned, limit and measured truncated; follow pagination until complete.

Inputs: policy_id (required), limit, target.

harbor_retention_policyB
Read-only

[READ] Get one retention policy by its actual Harbor policy id.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: policy_id (required), target.

harbor_retention_task_logB
Read-only

[READ] Read the bounded plain-text log of a retention task.

Result: bounded text with a measured truncated flag.

Inputs: task_id (required), policy_id (required), execution_id (required), target.

harbor_retention_tasksB
Read-only

[READ] List tasks of a retention execution, including per-task failures.

Inputs: policy_id (required), execution_id (required), limit, target.

harbor_robot_accountsB
Read-only

[READ] List robot account metadata with any returned secret redacted.

Inputs: limit, target.

harbor_scan_all_metricsA
Read-only

[READ] Get metrics from the latest registry-wide scan.

Use for the latest registry-wide scan; use harbor_scheduled_scan_metrics for the scheduled-scan subset.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: target.

harbor_scan_artifactB
Destructive

[WRITE] Start an artifact scan; accepted does not mean scan completed.

Use to request a scan of one artifact; a request acceptance does not establish scan completion.

Result: a guarded outcome; dry_run makes no upstream change, and scan acceptance does not prove completion.

Inputs: project (required), reference (required), repository (required), target, +1 more.

harbor_scan_logB
Read-only

[READ] Read a bounded artifact scan report log by report ID.

Inputs: project (required), reference (required), report_id (required), repository (required), +1 more.

harbor_scheduled_scan_metricsB
Read-only

[READ] Get metrics from the latest scheduled registry-wide scan.

Inputs: target.

harbor_statisticsB
Read-only

[READ] Get registry-wide project and repository counts.

Inputs: target.

harbor_tagsB
Read-only

[READ] List tags and their immutable status for an artifact.

Inputs: project (required), reference (required), repository (required), limit, +1 more.

harbor_volumesA
Read-only

[READ] Get Harbor storage volume usage from the system-info endpoint.

Result: the selected Harbor object, or an explicit sanitized operation error.

Inputs: target.

harbor_vulnerabilitiesB
Read-only

[READ] Get Harbor's stored vulnerability report for an artifact.

Inputs: project (required), reference (required), repository (required), target.

undo_applyA
Destructive

[WRITE][risk=medium] Apply a recorded undo by dispatching its inverse tool.

The inverse runs through its own governed tool, so it is audited under its own risk tier. Pass dry_run=True to preview the inverse call without executing it. A token can only be applied once.

Args: undo_id: The undoId from undo_list (or an _undo_id in a write result). dry_run: If True, preview the inverse tool + params without running it. target: Passed through to the inverse tool when it accepts a target.

Inputs: undo_id (required), target, dry_run.

undo_listA
Read-only

[READ] List recorded, not-yet-applied undo tokens (most recent first).

Each entry names the original tool, the inverse tool that undo_apply would run, and a human note. Use the undoId with undo_apply.

One extra row is read so truncated is measured rather than guessed from the row count matching the limit; when it is true, older tokens exist.

Each entry carries effectVerified. False means the original write lost its response, so the change it reverses is PROBABLE, not confirmed — check the live state before applying, and do not report the result as a restore of a state that may never have been reached.

Args: limit: Max rows to return (default 50, capped at 500). target: Unused (undo state is host-local); accepted for CLI uniformity.

Inputs: limit, target.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 39 tools

    Disambiguation4/5

    Most tools target distinct resources or explicitly explain the singleton-vs-list split (harbor_artifact vs harbor_artifacts, harbor_replication_execution vs harbor_replication_executions). The description text proactively disambiguates tricky pairs like harbor_scan_all_metrics vs harbor_scheduled_scan_metrics and harbor_diagnose vs harbor_health. A few near-neighbors exist (harbor_gc_log/harbor_gc_history/harbor_gc_execution, various *_task_log vs *_tasks), but they are resource-distinct enough to keep selection clear.

    Naming Consistency4/5

    Nearly all tools follow the snake_case harbor_<resource> convention with predictable singular/plural get-vs-list semantics. The undo_list/undo_apply pair drops the harbor_ prefix, which is a deliberate but visible break from the pattern. Otherwise consistent throughout.

    Tool Count2/5

    At 39 tools this is heavy for the domain, and many are narrow log/metrics readers rather than core operations. Several could be consolidated (e.g. the various *_log, *_tasks, *_execution readers) into parameterized calls. The count exceeds a comfortable scoped surface.

    Completeness3/5

    Read coverage is strong and broad—projects, repos, artifacts, scans, GC, retention, replication, quotas, audit logs, plus a diagnose roll-up. However, the write surface is thin: only scan_artifact, delete_tag, and create_tag exist, with no create/update/delete for projects, replication policies, retention policies, or robot accounts. This leaves notable lifecycle gaps for a full registry admin surface.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables users to define and run MCP tools using declarative YAML configs with built-in trust enforcement, credential brokering, and tamper-evident audit logging.
      14
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Governed CI/CD operations for self-hosted GitLab and Gitea — pipeline-failure, runner, artifact-bloat, and stale-branch RCA, with unbypassable audit logging (MCP + CLI), budget/runaway guards, dry-run, and undo/rollback.
      28
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Governed MinIO object-storage operations — capacity, exposure-surface audit, lifecycle, and healing RCA, with guarded bucket writes, unbypassable audit logging (MCP + CLI), budget/runaway guards, dry-run, and undo/rollback.
      48
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Governed Docker + Portainer container-host operations (non-Kubernetes) — restart-loop, resource-pressure, and image/volume-bloat RCA, with guarded lifecycle writes, unbypassable audit logging (MCP + CLI), budget/runaway guards, dry-run, and undo/rollback.
      38
      1
      MIT