harbor-registry-mcp
v0.1.0Harbor Registry MCP — projects, repos, artifacts, storage reports, cleanup (with dry-run).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
harbor_list_projects
List Harbor projects, sorted by repository count (descending *within the page*). Use this first to discover which Harbor projects exist before drilling in with ``harbor_list_repos`` / ``harbor_list_artifacts``. Pagination: if ``has_more`` is ``True``, call again with ``page + 1``. Note that sorting is per-page — agents that need a global ranking should aggregate across pages. Returns: dict with keys ``projects_count`` / ``page`` / ``page_size`` / ``has_more`` / ``next_page`` / ``projects`` (list).
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (1-based). |
page_size | integer | Items per page (1-100). |
harbor_list_repos
List repositories in a Harbor project. Each repository is reported with artifact count and total pull count (useful for spotting unused repos before cleanup). Pagination: if ``has_more`` is ``True``, call again with ``page + 1``.
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
page | integer | Page number (1-based). |
page_size | integer | Items per page (1-100). |
harbor_list_artifacts
List artifacts (tags) in a repository, newest first. Each artifact carries digest, size, push/pull timestamps, scan status and vulnerability counts (if scanned). Pagination: if ``has_more`` is ``True``, call again with ``page + 1``. For repositories with hundreds of artifacts prefer ``harbor_storage_report`` or ``harbor_cleanup_candidates`` which paginate internally.
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
repository_name * | string | Repository name within the project. |
page | integer | Page number (1-based). |
page_size | integer | Items per page (1-100). |
harbor_storage_report
Full storage breakdown for a Harbor project. Iterates every repository × every artifact and returns a sorted-by-size report — the canonical view for "what's eating up our quota?". Performs O(repos × artifacts) API calls; emits progress events through MCP Context.
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
harbor_cleanup_candidates
Suggest which artifacts could be deleted to reclaim space. **READ-ONLY** — never deletes anything; just produces a list with reasons. Use ``harbor_delete_artifact`` / ``harbor_delete_untagged`` / ``harbor_delete_old_artifacts`` to act on the results. Reasons emitted: - ``untagged`` — artifact has no tags (orphaned layer) - ``never_pulled`` — artifact has never been pulled (and is past the ``keep_latest_per_repo`` cutoff) - ``old_version`` — artifact is older than the ``keep_latest_per_repo`` newest tagged artifacts…
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
include_untagged | boolean | Suggest deleting untagged artifacts (orphaned layers). |
include_zero_pulls | boolean | Suggest deleting artifacts that have never been pulled. |
keep_latest_per_repo | integer | How many newest artifacts to always keep per repository. |
harbor_delete_artifact
Delete a single artifact by tag or digest. **DESTRUCTIVE & IRREVERSIBLE** — Harbor immediately removes the manifest from its catalogue; the underlying blobs are reclaimed by the next GC sweep. There is no soft-delete or undo. Returns the freed space and tag list for confirmation.
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
reference * | string | Tag (e.g. 'v1.0') or digest (e.g. 'sha256:...'). |
repository_name * | string | Repository name within the project. |
harbor_delete_untagged
Delete all untagged artifacts in a project (or single repository). **DESTRUCTIVE.** Untagged artifacts are typically orphaned layers left behind after pushing a new tag of the same image — generally safe to delete. The full project sweep is opaque, so the response includes ``repos_scanned`` for visibility.
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
repository_name | If set, only that repository is processed; otherwise every repository in the project. |
harbor_delete_old_artifacts
Keep the N newest artifacts in a repository, delete the rest. **DESTRUCTIVE.** ``dry_run=True`` is the default — the agent must explicitly set ``dry_run=False`` to actually delete. Each entry in ``to_delete`` carries a ``deleted`` field (``True``/``False`` after real run, ``None`` in dry-run).
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Harbor project name. |
repository_name * | string | Repository name within the project. |
dry_run | boolean | If True (default) — only report what would be deleted, do not delete. |
keep_count | integer | Number of newest artifacts to keep. |