A Model Context Protocol (MCP) server that enables AI assistants to interact with the Operator SDK for Kubernetes operator development.
This server exposes operator-sdk commands as MCP tools, allowing you to build, test, and manage Kubernetes operators through natural language conversations with AI assistants.
The Operator SDK is powerful but has many commands with complex flags. This MCP server lets you:
- Ask AI to scaffold operators instead of remembering
operator-sdk initflags - Generate APIs naturally - "Create a Database API for group cache.example.com v1alpha1"
- Get help with bundles - AI validates, explains errors, and fixes issues
- Test with scorecard - AI interprets results and suggests fixes
- Learn operator development - AI guides you through the workflow
- Project Initialization: Scaffold new Go, Ansible, or Helm operators
- API Management: Create APIs, controllers, and webhooks
- Bundle Operations: Generate and validate OLM bundles
- Testing: Run scorecard tests and validation
- OLM Integration: Local operator installation with
run bundle - Safety First: Read-only mode by default prevents accidental changes
- Modular: Enable only the toolsets you need
- Go 1.23+ - Install Go
- operator-sdk - Install operator-sdk
- MCP Client - Any MCP-compatible client (e.g., Claude Desktop, Continue, etc.)
- (Optional) Kubernetes cluster with OLM - For
run_bundleoperations
Verify operator-sdk is installed:
operator-sdk versiongit clone https://github.com/operator-framework/operator-sdk-mcp-server.git
cd operator-sdk-mcp-server
make buildThe binary will be created at bin/operator-sdk-mcp-server.
git clone https://github.com/operator-framework/operator-sdk-mcp-server.git
cd operator-sdk-mcp-server
make installThis installs the binary to $GOPATH/bin/operator-sdk-mcp-server.
Add this to your configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"operator-sdk": {
"command": "/absolute/path/to/operator-sdk-mcp-server",
"args": [
"--read-only=false",
"--working-dir=/path/to/your/operator"
]
}
}
}Important: Use absolute paths! Example:
{
"mcpServers": {
"operator-sdk": {
"command": "/Users/yourname/go/bin/operator-sdk-mcp-server",
"args": [
"--read-only=false",
"--working-dir=/Users/yourname/projects/my-operator"
]
}
}
}For other MCP-compatible clients, configure the server with:
- Command: Path to
operator-sdk-mcp-serverbinary - Transport: stdio (default)
- Arguments: See Configuration Options below
| Flag | Default | Description |
|---|---|---|
--working-dir |
. |
Working directory for operator-sdk commands |
--read-only |
true |
Prevents write operations (create, modify, delete) |
--toolsets |
init,api,bundle,scorecard,run |
Comma-separated list of enabled toolsets |
- init: Project initialization (
init_operator,init_go,init_ansible,init_helm) - api: API and webhook management (
create_api,create_webhook) - bundle: Bundle operations (
generate_bundle,validate_bundle,generate_kustomize) - scorecard: Testing (
run_scorecard) - run: OLM integration (
run_bundle,cleanup_bundle)
-
Build and install the MCP server (see Installation above)
-
Configure your MCP client with the server (restart client after editing config)
-
Ask your AI assistant to help you build an operator:
You: Initialize a new Go operator for github.com/example/memcached-operator with domain example.com AI: [Uses init_go tool] ✓ Created operator project! You: Create an API for Memcached with group cache, version v1alpha1 AI: [Uses create_api tool] ✓ Created API and controller! You: Generate an OLM bundle for version 0.1.0 AI: [Uses generate_bundle tool] ✓ Bundle created at ./bundle! You: Validate the bundle AI: [Uses validate_bundle tool] ✓ Bundle is valid!
The server exposes 12 MCP tools:
init_operator- Initialize a new operator project (Go, Ansible, or Helm)init_go- Initialize Go operator projectinit_ansible- Initialize Ansible operator projectinit_helm- Initialize Helm operator project
create_api- Create a new API and controllercreate_webhook- Create admission webhooks (validating, mutating, conversion)
generate_bundle- Generate OLM bundle manifestsvalidate_bundle- Validate bundle format and contentgenerate_kustomize- Runmake generateandmake manifests
run_scorecard- Execute operator scorecard tests
run_bundle- Install operator using OLMcleanup_bundle- Remove operator installation
See USAGE.md for detailed usage examples and workflows.
User: Create a new Go operator for managing databases
AI will:
1. Ask for domain and repo details
2. Run init_go to scaffold the project
3. Guide you through next steps
User: Add an API for a Database resource in the storage group v1alpha1
AI will:
1. Run create_api with the correct parameters
2. Show you the generated files
3. Explain what to do next
User: Generate and validate my OLM bundle for version 0.1.0
AI will:
1. Run generate_bundle
2. Run validate_bundle
3. Report any issues and suggest fixes
- Read-only mode by default: Prevents accidental modifications
- Input validation: Validates parameters before execution
- Error handling: Clear error messages from operator-sdk
- Modular toolsets: Enable only what you need
# Format code
make fmt
# Tidy dependencies
make tidy
# Development build (fmt + tidy + build)
make dev-build
# Clean build artifacts
make cleanInstall operator-sdk: https://sdk.operatorframework.io/docs/installation/
Set --read-only=false in your MCP client config
Use absolute paths in your MCP client config, not relative paths
- Check the config file path is correct for your OS
- Restart your MCP client after editing config
- Check MCP client logs for errors
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- olmv1-mcp-server - MCP server for OLMv1 operations
- operator-sdk - The Operator SDK
- Model Context Protocol - MCP specification
Apache License 2.0 - See LICENSE file for details.
Copyright 2026 The Operator Framework Authors