home / mcp / harbor mcp server
Experimental MCP server enabling real-time Harbor interactions via MCP tools (health, projects, repositories, quotas, configurations).
Configuration
View docs{
"mcpServers": {
"bupd-harbor-mcp-server": {
"command": "npx",
"args": [
"-y",
"harbor-mcp"
],
"env": {
"HARBOR_API_BASE": "YOUR_HARBOR_URL",
"HARBOR_AUTH_PASS": "HARBOR_PASSWORD_OR_SECRET",
"HARBOR_AUTH_USER": "HARBOR_USERNAME"
}
}
}
}You can run a Harbor MCP Server to let AI models and tools interact with a Harbor container registry in real time. This server acts as a bridge that exposes Harbor operations as MCP endpoints, enabling streamlined automation and integrations.
Start by choosing how you want to run the Harbor MCP Server locally or in Docker. You will configure your MCP client to connect to the server using either a local runtime or a Docker-based runtime. The server exposes a set of Harbor operations as MCP tools, such as health checks, project and repository queries, and configuration management. Ensure you have valid Harbor credentials and the API base URL. Then, run one of the provided MCP server entry points and point your MCP client to it using the same environment variables for authentication and API access.
Prerequisites you need before installing:
- Node.js (for local runtime) or a JavaScript runtime capable of executing the MCP server build
- npm or a similar package manager
- Access to your Harbor instance with API credentials (username and password or token)Step-by-step install and start options are provided below. Pick the approach you prefer and follow the exact commands.
Option A: Run with npx (quick start) - uses the Harbor MCP server package directly
Option B: Build locally and run with Node.js
Option C: Run via Docker
Environment variables you will provide to the MCP server are used to connect to Harbor. Typical variables include the Harbor API base URL, a username, and a password or secret. Ensure these are properly set in both the runtime environment and the MCP server configuration.
If the server fails to start, verify that the Harbor API base URL is reachable and that credentials are correct. Check that the port or connection target used by your MCP client is accessible and that any required network policies allow traffic between the MCP server and Harbor.
Treat Harbor credentials as sensitive information. Use secure storage for passwords or tokens and avoid exporting credentials in plaintext where possible. Restrict admin-level operations to trusted clients and monitor access to the MCP server.
- Use get-health to confirm Harbor is healthy before performing bulk operations - List projects and repositories to inventory access control and storage quotas - Update configurations as an admin to enforce organizational policies
Check Harbor instance health to verify it is up and running.
Retrieve project and repository statistics from Harbor.
List projects with optional filters and pagination.
Get detailed information for a specific project.
Get a concise summary of a project.
List members of a given project.
List repositories within a specified project.
List storage quotas for projects.
Search for projects and repositories by name.
Get system configurations (admin only).
Update system configurations (admin only, requires confirmation).
Get system volume information (total and free size).