BH

bupd/harbor-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

6 stars 5 forks Качество 62 Тренд 14MIT

mcp-server for harbor built by the community for the community

Обзор

We welcome and rely on community contributions—join us to improve and expand this tool! A Model Context Protocol (MCP) server for Harbor, enabling AI models and tools to interact with a Harbor container registry in real time. 2. - export HARBOR_API_BASE=YOUR_HARBOR_URL (e.g. https://demo.goharbor.io/api/v2.0) - export HARBOR_AUTH_USER=YOUR_USERNAME - export HARBOR_AUTH_PASS=YOUR_PASSWORD (or token or secret or whatever you call it) 4. (e.g. Claude Desktop, Cursor) using the appropriate command and environment variables. The following Harbor operations are available as MCP tools: - get-health: Check Harbor instance health. - get-statistics: Get project and repository statistics. - list-projects: List projects (with filters/pagination). - get-project: Get details for a specific project. - get-project-summary: Get a summary of a project. - list-project-members: List members of a project. - list-repositories-in-project: List repositories in a project.

README

Показан фрагмент оригинального README. Открыть оригинал.

Harbor MCP Server (Experimental 🧪)

This is an experimental, community-driven MCP server for Harbor. It is not an official Harbor project.
We welcome and rely on community contributions—join us to improve and expand this tool!


What is this?

A Model Context Protocol (MCP) server for Harbor, enabling AI models and tools to interact with a Harbor container registry in real time.


GitHub Repository

Harbor-MCP on NPM

Docker Hub Image

Official Harbor Project

Quick Start

  1. Clone & Install:

    git clone https://github.com/bupd/harbor-mcp-server.git
    cd harbor-mcp-server
    bun install
    bun run build
    
  2. Set Environment Variables:

    • export HARBOR_API_BASE=YOUR_HARBOR_URL (e.g. https://demo.goharbor.io/api/v2.0)
    • export HARBOR_AUTH_USER=YOUR_USERNAME
    • export HARBOR_AUTH_PASS=YOUR_PASSWORD (or token or secret or whatever you call it)
  3. Run:

    node build/index.js
    
  4. Integrate with your MCP client (e.g. Claude Desktop, Cursor) using the appropriate command and environment variables.

{
  "mcpServers": {
    "harbor": {
      "command": "npx",
      "args": [
        "-y",
        "harbor-mcp"
      ],  
      "env": {
        "HARBOR_API_BASE": "HARBOR_URL",
        "HARBOR_AUTH_USER": "HARBOR_USERNAME",
        "HARBOR_AUTH_PASS": "HARBOR_PASSWORD_OR_SECRET"
      }
    }
  }
}

If you have it locally use the below

{
  "mcpServers": {
    "harbor": {
      "command": "node",
      "args": [
        "YOUR_ABSOLUTE_PATH/harbor-mcp-server/build/index.js"
      ],
      "env": {
        "HARBOR_API_BASE": "HARBOR_URL",
        "HARBOR_AUTH_USER": "HARBOR_USERNAME",
        "HARBOR_AUTH_PASS": "HARBOR_PASSWORD_OR_SECRET"
      }
    }
  }
}

Run with Docker

"mcpServers": {
  "harbor-mcp": {
    "command": "docker",
    "args": [
      "run",
      "-i",
      "--rm",
      "-e", "HARBOR_API_BASE",
      "-e", "HARBOR_AUTH_USER",
      "-e", "HARBOR_AUTH_PASS",
      "bupd/harbor-mcp-server:latest"
    ],
    "env": {
Открыть полный README на GitHub

Установка

npx -y harbor-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "harbor": { "command": "npx", "args": [ "-y", "harbor-mcp" ], "env": { "HARBOR_API_BASE": "HARBOR_URL", "HARBOR_AUTH_USER": "HARBOR_USERNAME", "HARBOR_AUTH_PASS": "HARBOR_PASSWORD_OR_SECRET" } } } }