Harbor

io.github.oreondev由 GitHub 帳號 oreondev 發布v0.1.1更新於 Nov 5, 2026

Read-only access to a Harbor registry: projects, artifacts, vulnerabilities, robots and replication.

發布方自己的服務:Harbor Notes

概覽

AI 產生的概覽

針對 Harbor 容器映像倉庫的唯讀 MCP 伺服器,讓助理檢視專案、成品、弱點、機器人帳號與複寫狀態。

可以做什麼
  • 檢視倉庫本身:版本、驗證模式以及伺服器所使用的身分
  • 列出專案,並讀取單一專案的配額、CVE 允許清單、保留與不可變設定
  • 列出儲存庫與成品,含標籤、大小、推送與拉取時間及掃描摘要
  • 取得某個成品的弱點清單,依嚴重程度排序
  • 檢視存取權限:帶角色的專案成員,以及帶權限與到期時間的機器人帳號
  • 檢視複寫端點與原則及最近一次執行、Webhook 原則和垃圾回收排程
適用情境
適合讓助理回答關於執行中 Harbor 倉庫的問題,例如有哪些映像、哪些成品有未修補的弱點、誰能存取某個專案,或複寫與垃圾回收是否正常,同時不授予寫入權限。
執行需求
以本機程序透過 stdio 執行,通常使用已發佈的容器映像(Docker)或下載的執行檔。需要 HARBOR_URL、HARBOR_USERNAME 與 HARBOR_PASSWORD(建議使用唯讀系統機器人帳號)。選用:HARBOR_CA_FILE、HARBOR_INSECURE_SKIP_VERIFY、HARBOR_MCP_RATE,以及 HTTP 模式下的 HARBOR_MCP_HTTP_TOKEN。需要能連線至 Harbor 執行個體的網路。
安裝前請注意
需透過環境變數提供 Harbor 憑證,機器人密鑰僅在建立時顯示一次。管理員帳號也可使用,但會給助理遠超所需的權限,建議改用唯讀機器人。HARBOR_INSECURE_SKIP_VERIFY 會關閉對 Harbor 的 TLS 驗證。十二個工具皆為唯讀,沒有任何工具會刪除內容;寫入類工具規劃僅在明確開啟後提供。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Harbor,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Harbor MCP server

A Model Context Protocol server for Harbor, the open-source container registry. It lets AI assistants such as Claude, Cursor and VS Code answer questions about a running Harbor: projects and quotas, repositories and artifacts, vulnerability scan results, robot accounts, replication health and garbage collection.

Documentation: https://www.oreonit.com/harbor-mcp/

This is an independent community project. It is not affiliated with or endorsed by the Harbor project or the CNCF; Harbor is a trademark of The Linux Foundation.

Status

Changes per release are in the release notes. The twelve read tools work over stdio and streamable HTTP, and are tested against a fake Harbor, Harbor 2.15 on every pull request and Harbor 2.12 to 2.15 nightly, as an administrator and as the read-only robot below. The design is in docs/DESIGN.md.

  • Read-only: twelve tools covering projects, repositories, artifacts, vulnerabilities, robots, members, registries, replication, webhooks and garbage collection. Write tools (scan, start replication, add a label, create a project) will come later, only with an explicit opt-in. No tool deletes anything.
  • Secrets stay out of the conversation: Harbor credentials, robot secrets and webhook authorization headers never appear in tool results, logs or errors.
  • stdio for desktop clients, and streamable HTTP with a bearer token for running in a cluster.
  • A signed multi-arch image, ghcr.io/oreondev/harbor-mcp, listed in the official MCP Registry as io.github.oreondev/harbor-mcp.
  • Uses the Harbor client of harbor-resource-operator, the Kubernetes operator that manages Harbor projects, robot accounts and replication as code.

Tools

ToolAnswers
harbor_system_infoHarbor version, authentication mode, and the user or robot the server acts as
harbor_list_projects, harbor_get_projectprojects; quota, CVE allowlist, retention and immutability of one
harbor_list_repositories, harbor_list_artifactsrepositories; artifacts with tags, size, push and pull times and scan summary
harbor_get_vulnerabilitiesthe vulnerabilities of one artifact, worst first
harbor_list_members, harbor_list_robotswho has access: members with roles, robot accounts with permissions and expiry
harbor_list_registries, harbor_list_replicationsreplication endpoints and policies, with the last run
harbor_list_webhooks, harbor_get_gcwebhook policies; the garbage collection schedule

Set up a read-only Harbor identity

Run the server as a system robot account that can only read. docs/read-only-robot.json is the request body for Harbor's API, with the permissions the tools need (the end-to-end tests use the same file):

sh
curl -u admin -H 'Content-Type: application/json' -d @docs/read-only-robot.json \  https://harbor.example.com/api/v2.0/robots

Harbor shows the secret once, in the response; the user name is robot$harbor-mcp. An administrator account also works, but gives the assistant more than it needs.

Use it

Configuration comes from environment variables; each except HARBOR_CA_FILE can instead be read from a file named by <NAME>_FILE, for mounted secrets:

VariableMeaning
HARBOR_URLHarbor base URL, for example https://harbor.example.com (required)
HARBOR_USERNAME, HARBOR_PASSWORDthe robot name and secret (required)
HARBOR_CA_FILEextra CA bundle (PEM) for Harbor's certificate
HARBOR_INSECURE_SKIP_VERIFYtrue to skip TLS verification of Harbor
HARBOR_MCP_RATErequests per second to Harbor, default 10
HARBOR_MCP_HTTP_TOKENbearer token for HTTP mode

One-click install (the client asks for the URL and credentials, or you fill them in afterwards):

[Install in VS Code] [Add to Cursor]

Claude Code, with the image (replace 0.1.1 with the latest release):

sh
claude mcp add harbor -e HARBOR_URL=https://harbor.example.com -e 'HARBOR_USERNAME=robot$harbor-mcp' -e HARBOR_PASSWORD=... \  -- docker run -i --rm -e HARBOR_URL -e HARBOR_USERNAME -e HARBOR_PASSWORD ghcr.io/oreondev/harbor-mcp:0.1.1

Claude Desktop, Cursor and other clients that read an mcpServers file:

json
{  "mcpServers": {    "harbor": {      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "HARBOR_URL", "-e", "HARBOR_USERNAME", "-e", "HARBOR_PASSWORD",               "ghcr.io/oreondev/harbor-mcp:0.1.1"],      "env": {        "HARBOR_URL": "https://harbor.example.com",        "HARBOR_USERNAME": "robot$harbor-mcp",        "HARBOR_PASSWORD": "..."      }    }  }}

Without Docker, download a binary from the releases (or go install github.com/oreondev/harbor-mcp/cmd/harbor-mcp@latest) and use harbor-mcp as the command.

HTTP mode

For a shared server, for example a Deployment next to Harbor, start it with -http and a token:

sh
docker run -d -p 8080:8080 -e HARBOR_URL -e HARBOR_USERNAME -e HARBOR_PASSWORD -e HARBOR_MCP_HTTP_TOKEN \  ghcr.io/oreondev/harbor-mcp:0.1.1 -http :8080claude mcp add --transport http harbor https://harbor-mcp.example.com/mcp -H "Authorization: Bearer $HARBOR_MCP_HTTP_TOKEN"

MCP is served at /mcp and every request needs the token; GET /healthz is open for probes. Without a token the server only listens on a loopback address. Put TLS in front of it (an ingress or a mesh).

Verify the image

sh
cosign verify ghcr.io/oreondev/harbor-mcp:0.1.1 \  --certificate-identity-regexp '^https://github.com/oreondev/harbor-mcp/\.github/workflows/release\.yml@' \  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Maintainers

Maintained by Oreon IT. Issues and pull requests are welcome.

Security

Report vulnerabilities privately; see SECURITY.md.

Licence

Apache-2.0.

來源:README.md,提交 d4b969f

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

2
  1. v0.1.1最新Nov 5, 2026
  2. v0.1.0Nov 5, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Harbor 整合