Get the FREE Ultimate OpenClaw Setup Guide →

harbor

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bupd-harbor-mcp-server npx -y harbor-mcp \
  --env HARBOR_API_BASE="HARBOR_BASE_URL" \
  --env HARBOR_AUTH_PASS="HARBOR_PASSWORD_OR_SECRET" \
  --env HARBOR_AUTH_USER="HARBOR_USERNAME"

How to use

Harbor MCP Server exposes a set of MCP tools that let AI models and clients interact with a Harbor container registry in real time. The server provides commands such as get-health, get-statistics, list-projects, get-project, get-project-summary, list-project-members, list-repositories-in-project, list-quotas, search, get-configurations, update-configurations, and get-volumes. You can integrate these tools into your MCP client workflows to monitor Harbor health, query project and repository data, manage configurations (admin-only), and inspect storage quotas and volumes. Use the provided environment variables to point the MCP server at your Harbor instance and to authenticate as needed. The project demonstrates two primary runtimes: running via npx harbor-mcp or running the built Node server directly from a local build.

How to install

Prerequisites:

  • Git installed
  • Node.js environment (or Bun) installed if you plan to install via the provided bun/npm workflow
  • Access to a Harbor instance (for API_BASE and credentials)

Option A: Quick start with npm/npx (preferred for experimentation)

  1. Clone the repository and install dependencies git clone https://github.com/bupd/harbor-mcp-server.git cd harbor-mcp-server bun install bun run build

  2. Run the MCP server via npx harbor-mcp Set required env vars, for example:

    • HARBOR_API_BASE=https://your-harbor-instance/api/v2.0
    • HARBOR_AUTH_USER=your-username
    • HARBOR_AUTH_PASS=your-password-or-secret Then start: node build/index.js OR use the MCP entry via npx harbor-mcp as shown in the README example

Option B: Run locally from built Node server

  1. After building, run the server directly: node build/index.js

Option C: Run with Docker

  1. Use the docker command example from the README to run the image with environment variables: docker run -i --rm -e HARBOR_API_BASE -e HARBOR_AUTH_USER -e HARBOR_AUTH_PASS bupd/harbor-mcp-server:latest
  2. Ensure the environment variables are provided to the container, for example: -e HARBOR_API_BASE=https://your-harbor-instance/api/v2.0 -e HARBOR_AUTH_USER=your-username -e HARBOR_AUTH_PASS=your-password-or-secret

Additional notes

Notes and tips:

  • The Harbor MCP Server is marked experimental; verify compatibility with your Harbor version before relying on it in production.
  • If you encounter authentication issues, ensure the API_BASE URL is correct and that the provided user credentials have the needed admin or read permissions for the requested operations.
  • When using Docker, keep the Harbor URL and credentials in a secure manner; avoid embedding secrets directly in commands in shared environments.
  • The tooling exposes a range of capabilities; you can selectively enable commands via the MCP client integration and filter results as needed by your AI workflows.

Related MCP Servers

Sponsor this space

Reach thousands of developers