anik120/olmv1-mcp-server
If you are the rightful owner of olmv1-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for Operator Lifecycle Manager (OLM) v1, providing AI assistants with the ability to interact with OLM v1 resources and migrate from OLM v0 to v1.
OLM v1 MCP Server
A Model Context Protocol (MCP) server for Operator Lifecycle Manager (OLM) v1, providing AI assistants with the ability to interact with OLM v1 resources and migrate from OLM v0 to v1.
Overview
The OLM v1 MCP Server exposes OLM v1-specific resources and operations through the Model Context Protocol, allowing AI assistants to help users manage operators using the new OLM v1 architecture. This server provides tools for managing ClusterExtensions, ClusterCatalogs, and includes powerful migration capabilities to help users transition from OLM v0 to v1.
Features
- ClusterExtension Operations: List, get, create, update, and delete ClusterExtensions
- ClusterCatalog Operations: List and inspect ClusterCatalogs
- Migration Tools: Plan, validate, and execute migrations from OLM v0 to v1
- MCP Protocol Support: Standard stdio-based MCP communication
- Read-only Mode: Safe operation with no write capabilities by default
- Migration Validation: Pre-migration checks and dry-run capabilities
Available Tools
ClusterExtension Tools
list_cluster_extensions: List ClusterExtensions in the clusterget_cluster_extension: Get detailed information about a specific ClusterExtensioncreate_cluster_extension: Create a new ClusterExtensionupdate_cluster_extension: Update an existing ClusterExtension (channel/version)delete_cluster_extension: Delete a ClusterExtension
ClusterCatalog Tools
list_cluster_catalogs: List ClusterCatalogs in the clusterget_cluster_catalog: Get detailed information about a specific ClusterCatalog
Migration Tools
plan_migration: Plan migration from OLM v0 Subscriptions to v1 ClusterExtensionsvalidate_migration: Validate migration readiness and cluster stateexecute_migration: Execute the migration (with dry-run support)
Installation
From Source
git clone https://github.com/operator-framework/olmv1-mcp-server.git
cd olmv1-mcp-server
make build
Usage
Basic Usage
# Start the server (stdio mode for MCP clients)
./bin/olmv1-mcp-server
# Use a specific kubeconfig
./bin/olmv1-mcp-server --kubeconfig /path/to/kubeconfig
# Enable write operations (disabled by default for safety)
./bin/olmv1-mcp-server --read-only=false
# Enable only specific toolsets
./bin/olmv1-mcp-server --toolsets clusterextension,migration
Command Line Options
--kubeconfig: Path to kubeconfig file (default: $HOME/.kube/config)--read-only: Prevent write operations (default: true)--toolsets: Enable specific toolsets (default: clusterextension,clustercatalog,migration)
Migration from OLM v0 to v1
This server's key feature is helping users migrate from OLM v0 (Subscriptions) to OLM v1 (ClusterExtensions).
Migration Workflow
-
Validate Migration Readiness
validate_migration --namespace=<namespace>This checks that both OLM v0 and v1 are accessible, ClusterCatalogs are available, etc.
-
Plan the Migration
plan_migration --namespace=<namespace>This analyzes existing Subscriptions and shows what ClusterExtensions will be created.
-
Execute Migration (Dry Run)
execute_migration --namespace=<namespace> --dryRun=trueThis shows what would happen without making changes.
-
Execute Migration
execute_migration --namespace=<namespace>This creates ClusterExtensions based on existing Subscriptions.
Migration Process
The migration process:
- Discovers all Subscriptions in the specified namespace
- Maps OLM v0 CatalogSources to OLM v1 ClusterCatalogs
- Creates corresponding ClusterExtensions with appropriate settings
- Preserves package, channel, and version information
- Adds migration annotations for tracking
Important Notes
- Backup First: Always backup your OLM v0 resources before migration
- Test Environment: Test the migration in a non-production environment first
- Service Accounts: Ensure appropriate ServiceAccounts exist with necessary RBAC permissions
- Manual Cleanup: After successful migration and validation, manually remove old Subscriptions
- Read-Only Mode: The server runs in read-only mode by default for safety
Claude Desktop Integration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"olmv1": {
"command": "/path/to/olmv1-mcp-server/bin/olmv1-mcp-server"
}
}
}
Security Considerations
- Read-only by default: The server operates in read-only mode by default
- Migration safety: Migration includes validation and dry-run capabilities
- Cluster access: Requires valid Kubernetes credentials with appropriate RBAC permissions
- No authentication: The stdio server does not implement authentication (intended for local use)
Development
Prerequisites
- Go 1.24.4 or later
- Access to a Kubernetes cluster with OLM v1 installed
- kubectl configured for cluster access
- For migration features: OLM v0 also installed
Building
# Download dependencies
make deps
# Build the binary
make build
# Run tests
make test
# Format code
make fmt
# Run linter
make lint
Examples
Creating a ClusterExtension
create_cluster_extension \
--name=my-operator \
--namespace=default \
--packageName=my-package \
--serviceAccount=my-service-account \
--channel=stable \
--catalog=operatorhub
Migration Example
# Check if migration is possible
validate_migration --namespace=operators
# See what will be migrated
plan_migration --namespace=operators
# Perform dry run
execute_migration --namespace=operators --dryRun=true
# Execute migration
execute_migration --namespace=operators
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the Apache License 2.0 - see the file for details.
Related Projects
- operator-controller - OLM v1 implementation
- olmv0-mcp-server - OLM v0 MCP server
- Model Context Protocol - MCP specification