io.github.mshegolev/harbor-registry-mcp

Official registry Other

Harbor Registry MCP — projects, repos, artifacts, storage reports, cleanup (with dry-run).

What can you do with io.github.mshegolev/harbor-registry-mcp?

  • Tool annotations — read-only tools get readOnlyHint: True; destructive ones (harbor_delete_*) carry destructiveHint: True so MCP clients ask for confirmation.
  • Dry-run by default on both bulk cleanups (harbor_delete_untagged, harbor_delete_old_artifacts) — the agent must pass dry_run=False to execute.
  • Structured output — every tool returns a typed payload (TypedDict) + a markdown summary.
  • Structured errors — 401 / 403 / 404 / 429 / 5xx mapped to actionable hints.
  • Pydantic input validation for every argument.
  • Vulnerability snapshot — harbor_list_artifacts surfaces scan status and counts if with_scan_overview is enabled.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package harbor-registry-mcp
Claude Code
claude mcp add harbor-registry-mcp -e 'HARBOR_URL=<HARBOR_URL>' -e 'HARBOR_USERNAME=<HARBOR_USERNAME>' -e 'HARBOR_PASSWORD=<your harbor_password>' -e 'HARBOR_SSL_VERIFY=true' -- uvx harbor-registry-mcp==0.1.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "harbor-registry-mcp": {
            "command": "uvx",
            "args": [
                "harbor-registry-mcp==0.1.0"
            ],
            "env": {
                "HARBOR_URL": "<HARBOR_URL>",
                "HARBOR_USERNAME": "<HARBOR_USERNAME>",
                "HARBOR_PASSWORD": "<your harbor_password>",
                "HARBOR_SSL_VERIFY": "true"
            }
        }
    }
}

Environment variables

  • HARBOR_URL required Harbor URL (e.g. https://harbor.example.com)
  • HARBOR_USERNAME required Harbor username (robot account recommended for automation)
  • HARBOR_PASSWORD required secret Harbor password or robot account token
  • HARBOR_SSL_VERIFY Verify SSL certificates (true/false). Set to 'false' for self-signed certs.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. harbor-registry-mcp
  2. Why another Harbor MCP?
  3. Design highlights
  4. Features (8 tools)
  5. Installation
  6. Configuration
  7. Environment variables
  8. Example usage
  9. Safety
  10. Development
  11. License

harbor-registry-mcp

MCP server for Harbor Registry. Lets an LLM agent (Claude Code, Cursor, OpenCode, etc.) list projects, repositories and artifacts, run storage reports, find cleanup candidates, and delete untagged or old artifacts — all with safety rails (dry-run by default for bulk delete).

Python, FastMCP, stdio transport.

Works with any Harbor 2.x instance — SaaS or self-hosted / on-prem.

Why another Harbor MCP?

A couple of community Harbor MCPs exist (nomagicln/mcp-harbor, bupd/harbor-mcp-server) but they expose only the basic list/get endpoints. This one adds storage reports, cleanup candidates, delete untagged, and delete old artifacts with dry-run — the operations DevOps engineers actually need to reclaim disk space.

Design highlights

  • Tool annotations — read-only tools get readOnlyHint: True; destructive ones (harbor_delete_*) carry destructiveHint: True so MCP clients ask for confirmation.
  • Dry-run by default on both bulk cleanups (harbor_delete_untagged, harbor_delete_old_artifacts) — the agent must pass dry_run=False to execute.
  • Structured output — every tool returns a typed payload (TypedDict) + a markdown summary.
  • Structured errors — 401 / 403 / 404 / 429 / 5xx mapped to actionable hints.
  • Pydantic input validation for every argument.
  • Vulnerability snapshot — harbor_list_artifacts surfaces scan status and counts if with_scan_overview is enabled.

Features (8 tools)

Discovery & inspection

  • harbor_list_projects — projects with repo counts and visibility
  • harbor_list_repos — repositories in a project
  • harbor_list_artifacts — artifacts in a repository with tags/size/scan status
  • harbor_storage_report — full project storage breakdown (all repos × all artifacts)

Cleanup planning

  • harbor_cleanup_candidates — suggest what to delete (untagged, never-pulled, old versions)

Cleanup execution (destructive)

  • harbor_delete_artifact — delete a single artifact by tag or digest
  • harbor_delete_untagged — delete all untagged artifacts in a project/repo (dry-run default)
  • harbor_delete_old_artifacts — keep N latest per repo, delete the rest (dry-run default)

Installation

Requires Python 3.10+.

# via uvx (recommended)
uvx --from harbor-registry-mcp harbor-registry-mcp

# or via pipx
pipx install harbor-registry-mcp

Configuration

claude mcp add harbor -s project \
  --env HARBOR_URL=https://harbor.example.com \
  --env HARBOR_USERNAME='robot$your-robot' \
  --env HARBOR_PASSWORD=your-robot-token \
  --env HARBOR_SSL_VERIFY=true \
  -- uvx --from harbor-registry-mcp harbor-registry-mcp

Or in .mcp.json:

{
  "mcpServers": {
    "harbor": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "harbor-registry-mcp", "harbor-registry-mcp"],
      "env": {
        "HARBOR_URL": "https://harbor.example.com",
        "HARBOR_USERNAME": "robot$your-robot",
        "HARBOR_PASSWORD": "${HARBOR_PASSWORD}",
        "HARBOR_SSL_VERIFY": "true"
      }
    }
  }
}

Check:

claude mcp list
# harbor: uvx --from harbor-registry-mcp harbor-registry-mcp - ✓ Connected

Environment variables

VariableRequiredDescription
HARBOR_URLyesHarbor URL (no trailing slash)
HARBOR_USERNAMEyesHarbor username — robot account recommended
HARBOR_PASSWORDyesPassword or robot token
HARBOR_SSL_VERIFYnotrue/false. Default: true.

Example usage

  • "Storage report for project einvy-pub"
  • "Find cleanup candidates in qa-assistant — keep latest 3"
  • "Delete all untagged artifacts in qa-assistant"
  • "Dry-run delete of old artifacts in qa-assistant/pgvector-rag, keep 1 latest"
  • "What's in einvy-pub/my-image?"

Safety

  • Read tools use readOnlyHint: True — no confirmation needed.
  • Delete tools use destructiveHint: True — clients should confirm.
  • harbor_delete_untagged and harbor_delete_old_artifacts both default to dry_run=True; the agent must explicitly set dry_run=False to actually delete.
  • harbor_cleanup_candidates is read-only — it only suggests candidates, never deletes.

Development

git clone https://github.com/mshegolev/harbor-registry-mcp.git
cd harbor-registry-mcp
pip install -e '.[dev]'
pytest

License

MIT © Mikhail Shchegolev

Frequently asked questions

What is io.github.mshegolev/harbor-registry-mcp?

Harbor Registry MCP — projects, repos, artifacts, storage reports, cleanup (with dry-run).

How do I install io.github.mshegolev/harbor-registry-mcp?

It runs on your machine. In Claude Code: claude mcp add harbor-registry-mcp -e 'HARBOR_URL=<HARBOR_URL>' -e 'HARBOR_USERNAME=<HARBOR_USERNAME>' -e 'HARBOR_PASSWORD=<your harbor_password>' -e 'HARBOR_SSL_VERIFY=true' -- uvx harbor-registry-mcp==0.1.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.mshegolev/harbor-registry-mcp need an API key?

Yes. It expects HARBOR_URL, HARBOR_USERNAME, HARBOR_PASSWORD, which you set in its configuration.

Is io.github.mshegolev/harbor-registry-mcp open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.mshegolev/harbor-registry-mcp?

It is published by mshegolev. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.