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:
- Navigate to the project directory:
- Install dependencies:
- Build the project:
- Start the application:
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_projects | List all projects in Harbor | None |
get_project | Get project details by ID | id: number |
create_project | Create a new project | name: string, public?: boolean |
delete_project | Delete a project | id: number |
list_repositories | List repositories in a project | projectId: number |
delete_repository | Delete a repository | projectId: number, repoName: string |
list_tags | List tags in a repository | projectId: number, repoName: string |
delete_tag | Delete a tag | projectId: number, repoName: string, tag: string |
list_charts | List Helm charts | projectId: number |
list_chart_versions | List chart versions | projectId: number, chartName: string |
delete_chart | Delete chart version | projectId: number, chartName: string, version: string |
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
- Verify HARBOR_URL is correct and accessible
- Check network connectivity
- Ensure Harbor instance is running
- Authentication Failed
- Verify HARBOR_USERNAME and HARBOR_PASSWORD are correct
- Check if user has required permissions
- Build Errors
- Run
npm install
to ensure all dependencies are installed - Check TypeScript version compatibility
- Clear the
dist
directory and rebuild
- Run
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 -74JavaScriptMIT 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 -392JavaScript
- 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.Last updated -29JavaScript
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that provides endpoints for wallet-based authentication, cluster management, and name registration services.Last updated -TypeScript