Harbor AIops
Provides governed operations for Harbor container registries, including health and volume checks, project and repository inventory, artifacts, tags, vulnerability reports, quotas, audit logs, scan metrics, GC history, replication and retention policies, and guarded tag deletion.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Harbor AIops what's the health of my Harbor registry?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_diagnosecombines health, volume, GC and replication observations. Failed probes appear as errors withdata: 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: 30Run 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 toolsharbor_artifactARead-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_artifactsARead-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_tagBDestructive
[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_tagADestructive
[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_diagnoseARead-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_executionBRead-only
[READ] Get one Harbor garbage-collection execution's current state.
Inputs: gc_id (required), target.
harbor_gc_historyARead-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_logBRead-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_healthARead-only
[READ] Get Harbor component health; unknown components remain visible.
Inputs: target.
harbor_immutable_rulesARead-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_labelsARead-only
[READ] List Harbor labels with measured truncation.
Result: items, returned, limit and measured truncated; follow pagination until complete.
Inputs: limit, target.
harbor_projectARead-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_logsBRead-only
[READ] List a project's Harbor audit logs; not the MCP governance audit.
Inputs: project (required), limit, target.
harbor_project_membersBRead-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_projectsBRead-only
[READ] List visible Harbor projects with measured truncation.
Inputs: limit, target.
harbor_project_summaryBRead-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_quotasARead-only
[READ] List registry quota usage and limits.
Result: items, returned, limit and measured truncated; follow pagination until complete.
Inputs: limit, target.
harbor_replication_executionARead-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_executionsARead-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_policiesARead-only
[READ] List replication policies with measured truncation.
Result: items, returned, limit and measured truncated; follow pagination until complete.
Inputs: limit, target.
harbor_replication_policyBRead-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_logBRead-only
[READ] Read the bounded plain-text log of a replication task.
Inputs: task_id (required), execution_id (required), target.
harbor_replication_tasksARead-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_repositoriesARead-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_executionsARead-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_policyBRead-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_logBRead-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_tasksBRead-only
[READ] List tasks of a retention execution, including per-task failures.
Inputs: policy_id (required), execution_id (required), limit, target.
harbor_robot_accountsBRead-only
[READ] List robot account metadata with any returned secret redacted.
Inputs: limit, target.
harbor_scan_all_metricsARead-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_artifactBDestructive
[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_logBRead-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_metricsBRead-only
[READ] Get metrics from the latest scheduled registry-wide scan.
Inputs: target.
harbor_statisticsBRead-only
[READ] Get registry-wide project and repository counts.
Inputs: target.
harbor_tagsBRead-only
[READ] List tags and their immutable status for an artifact.
Inputs: project (required), reference (required), repository (required), limit, +1 more.
harbor_volumesARead-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_vulnerabilitiesBRead-only
[READ] Get Harbor's stored vulnerability report for an artifact.
Inputs: project (required), reference (required), repository (required), target.
undo_applyADestructive
[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_listARead-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
Scored across 39 tools
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.
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.
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.
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
Related MCP Connectors
Read-only AI/LLM cost tools with current MCP discovery and attributable Registry transport.
45 MCP tools (7 free, 16 x402): AI guardrails, PII/secrets, MCP lint, SSRF, Omnibar & Nutrition.
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables users to define and run MCP tools using declarative YAML configs with built-in trust enforcement, credential brokering, and tamper-evident audit logging.14MIT
- AlicenseAqualityBmaintenanceGoverned 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.28MIT
- AlicenseAqualityBmaintenanceGoverned 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.48MIT
- AlicenseAqualityBmaintenanceGoverned 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.381MIT