Content
# OceanBase Kubernetes Control Tool (okctl) MCP Server
English | [简体中文](README-CN.md)
## Project Overview
This project is the MCP server implementation for the OceanBase Kubernetes Control Tool ([okctl](https://github.com/oceanbase/ob-operator?tab=readme-ov-file#using-cli-tool-okctl)). It provides a suite of utility functions for managing OceanBase clusters, tenants, and backup policies. These functions work by invoking the underlying okctl command-line tool to perform various management operations and expose these capabilities to clients through the MCP protocol.
## Function Modules
The project includes the following main tools:
### 1. Cluster Management (clusters.py)
Provides functionality for creating, deleting, viewing, scaling, updating, and upgrading OceanBase clusters.
- `list_all_clusters()` - List all OceanBase clusters
- `show_cluster()` - Display detailed information about a specific cluster
- `create_cluster()` - Create a new OceanBase cluster
- `delete_cluster()` - Delete a specified OceanBase cluster
- `scale_cluster()` - Scale an OceanBase cluster
- `update_cluster()` - Update OceanBase cluster configuration
- `upgrade_cluster()` - Upgrade OceanBase cluster version
### 2. Tenant Management (tenants.py)
Provides functionality for creating, deleting, viewing, scaling, updating, and managing OceanBase tenants.
- `list_tenants()` - List all tenants
- `create_tenant()` - Create a new tenant
- `delete_tenant()` - Delete a specified tenant
- `show_tenant()` - Display tenant details
- `scale_tenant()` - Scale tenant resources
- `update_tenant()` - Update tenant configuration
- `upgrade_tenant()` - Upgrade tenant version
- `change_tenant_password()` - Modify tenant password
- `activate_tenant()` - Activate standby tenant
- `replay_tenant_log()` - Replay tenant logs
- `switchover_tenant()` - Switch between primary and standby tenants
### 3. Backup Policy Management (backup_policy.py)
Provides functionality for creating, deleting, viewing, updating, and managing OceanBase backup policies.
- `list_backup_policies()` - List all backup policies
- `create_backup_policy()` - Create a new backup policy
- `delete_backup_policy()` - Delete a specified backup policy
- `show_backup_policy()` - Display backup policy details
- `update_backup_policy()` - Update backup policy
- `pause_backup_policy()` - Pause backup policy
- `resume_backup_policy()` - Resume backup policy
### 4. Component Management (components.py)
Provides functionality for installing, updating, and managing OceanBase components.
- `list_components()` - List all installed components
- `install_component()` - Install a new component
- `update_component()` - Update component
## Development Environment Setup
### Prerequisites
- Python 3.10 or higher installed
- uv package manager installed ([uv documentation](https://github.com/astral-sh/uv))
- OceanBase Kubernetes Control Tool (okctl) installed and configured
- Kubernetes environment configured with appropriate access to OceanBase clusters
### Configuring the MCP Server
```json
{
"mcpServers": {
"okctl-mcp-server-py": {
"command": "uv",
"args": ["--directory", "/path/to/okctl-mcp-server-py", "run", "main.py"]
}
}
}
```
## Important Notes
- The server must run in an environment with access to the Kubernetes cluster
- All functions are implemented by calling the underlying okctl command-line tool, so ensure okctl is properly installed and configured
- Most functions provide a namespace parameter with a default value of "default", which can be specified as needed
- Some operations (such as deleting clusters or tenants) may be irreversible, so proceed with caution
- It's recommended to perform backups before executing critical operations
## Contributing
Issues and Pull Requests are welcome to improve this project.
## License
This project is licensed under the [Apache 2.0 License](LICENSE).
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for...
Appwrite
Build like a team of hundreds
claude-flow
Claude-Flow v2.7.0 is an enterprise AI orchestration platform.
semantic-kernel
Build and deploy intelligent AI agents with Semantic Kernel's orchestration...
opik
Opik is a versatile tool for managing and tracking experiments in machine learning.