Provides tools for interacting with Harbor container registry, enabling operations on projects, repositories, tags, and Helm charts such as listing, creating, and deleting resources.
Enables management of Helm charts within Harbor registry, including listing available charts, viewing chart versions, and deleting chart versions.
MCP Harbor
MCP Harbor is a Node.js application that provides a Model Context Protocol (MCP) server for interacting with Harbor container registry. It also includes a REST API for Harbor operations.
Table of Contents
Features
MCP Server: Exposes tools for interacting with Harbor through the Model Context Protocol
REST API: Provides RESTful endpoints for Harbor operations
Harbor Operations: Supports operations for projects, repositories, tags, and Helm charts
TypeScript: Written in TypeScript for better type safety and developer experience
Automated Tests: Comprehensive test suite for reliable functionality
Prerequisites
Before installing MCP Harbor, ensure you have:
Node.js 18.x or higher
npm 8.x or higher
Access to a Harbor registry instance
Git (for cloning the repository)
Installation
Clone the repository:
git clone https://github.com/nomagicln/mcp-harbor.gitNavigate to the project directory:
cd mcp-harborInstall dependencies:
npm installBuild the project:
npm run buildStart the application:
npm start
Configuration
Environment Variables
Create a .env
file in the root directory with the following variables:
Configuration File
Additional configuration options can be set in src/config/harbor.config.ts
:
API Endpoints
Projects
GET /projects
- List all projectsGET /projects/:id
- Get project detailsPOST /projects
- Create a new projectDELETE /projects/:id
- Delete a project
Repositories
GET /projects/:projectId/repositories
- List repositories in a projectDELETE /projects/:projectId/repositories/:repositoryName
- Delete a repository
Tags
GET /projects/:projectId/repositories/:repositoryName/tags
- List tags in a repositoryDELETE /projects/:projectId/repositories/:repositoryName/tags/:tag
- Delete a tag
Helm Charts
GET /projects/:projectId/charts
- List Helm charts in a projectGET /projects/:projectId/charts/:chartName/versions
- List versions of a Helm chartDELETE /projects/:projectId/charts/:chartName/versions/:version
- Delete a Helm chart version
MCP Tools
The MCP server exposes the following tools:
Tool Name | Description | Parameters |
| List all projects in Harbor | None |
| Get project details by ID |
|
| Create a new project |
|
| Delete a project |
|
| List repositories in a project |
|
| Delete a repository |
|
| List tags in a repository |
|
| Delete a tag |
|
| List Helm charts |
|
| List chart versions |
|
| Delete chart version |
|
Development
Running in Development Mode
Running Tests
Debug Tools
The project includes debug tools in the tools
directory:
Project Structure
Troubleshooting
Common Issues
Connection Failed
Error: Unable to connect to Harbor instanceVerify HARBOR_URL is correct and accessible
Check network connectivity
Ensure Harbor instance is running
Authentication Failed
Error: Invalid credentialsVerify HARBOR_USERNAME and HARBOR_PASSWORD are correct
Check if user has required permissions
Build Errors
Error: TypeScript compilation failedRun
npm install
to ensure all dependencies are installedCheck TypeScript version compatibility
Clear the
dist
directory and rebuild
Debug Mode
Enable debug logging by setting:
Support
For additional help:
Check the DEBUG.md file
Run the connection test:
npm run test:connection
Review the application logs in
logs/
directory
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Node.js application that provides a Model Context Protocol server for interacting with Harbor container registry, supporting operations for projects, repositories, tags, and Helm charts.
Related MCP Servers
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.Last updated -75MIT License
- AsecurityFlicenseAqualityA comprehensive Model Context Protocol server that enables users to interact with the ShipStation API for managing orders, shipments, carriers, warehouses, products, customers, stores, webhooks, and fulfillments through structured tools.Last updated -392
- AsecurityFlicenseAqualityA comprehensive server that enables interaction with the ShipHero API through the Model Context Protocol, providing tools for managing orders, products, inventory, shipping, warehouses, vendors, and webhooks.
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that provides endpoints for wallet-based authentication, cluster management, and name registration services.Last updated -1