You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
Best practices
ChatOps: Using the MCP service to manage VKE clusters
Copy page
Download PDF
ChatOps: Using the MCP service to manage VKE clusters
VKE allows you to manage resources in clusters by using Model Context Protocol (MCP). You can use natural language to drive clusters to create and query resources in the clusters. This achieves more efficient cluster operations and maintenance.​
Background information​
Introduction to MCP​
MCP allows large language models (LLMs) to access custom tools and services. Essentially, an MCP server, such as VKE MCP, provides a set of tools. In an AI IDE, such as Trae and Cursor, an Agent is used for executing specific tasks by using the tools provided by an MCP server based on the natural language instructions of users. The communication between the Agent and the MCP server is maintained by an MCP client.​
The process for managing VKE clusters by using an MCP server is as follows:​
  1. Configure an MCP server: You need to add the VKE MCP server to your AI IDE or application and configure the API key of your Volcano Engine root user.​
  1. Prepare the local environment required by the MCP server: Make sure that the add-ons, such as Node.js and uvx, required to run the MCP server that you select are installed and configured in your local development environment.​
  1. Natural language interaction: Send instructions to the Agent configured with the VKE MCP server with natural language by using the chat interface of the AI IDE. For example, the instruction can be "Query add-ons in the cluster".​
  1. Tool invocation and result return: The Agent parses your instructions and invokes the corresponding tools provided by the VKE MCP server. After the MCP server completes a task, it returns the result to the Agent, which is then presented to you.​
Feature introduction​
VKE MCP is the official MCP server released by VKE. It allows you to manage VKE clusters by using natural language through AI IDEs or applications that support the MCP protocol. VKE MCP provides the following core features:​
​
Feature category​
Feature description​
Cluster management​
  • CreateCluster: Create a VKE cluster.​
  • ListClusters: Query the details of clusters that meet the criteria.​
  • ListSupportedResourceTypes: Query the types of resources for related services supported by VKE.​
  • CreateKubeconfig: Generate the Kubeconfig credentials for a cluster.​
  • ListKubeconfigs: Query the list of Kubeconfig details for clusters that meet the specified criteria.​
Node pool management​
  • CreateNodePool: Create a node pool in the specified cluster.​
  • CreateDefaultNodePool: Create a default node pool in the specified cluster.​
  • ListNodePools: Query the list of node pools that meet the criteria.​
Node management​
  • CreateNodes: Add existing ECS instances to the specified cluster.​
  • ListNodes: Query the list and information of nodes that meet the criteria.​
  • CreateVirtualNode: Create a virtual node.​
  • ListVirtualNodes: Query the list and information of virtual nodes that meet the criteria.​
Add-on management​
  • ListSupportedAddons: Query the details of add-ons that are supported by VKE.​
  • CreateAddon: Install an add-on for a specified cluster.​
  • UpdateAddonConfig: Update the configurations of a specified add-on in a specified cluster.​
  • UpdateAddonVersion: Update the version of a specified add-on in a specified cluster.​
  • ListAddons: Query the details of installed add-ons that meet the criteria.​
Others​
  • list_k8s_resource: Query Kubernetes resources of a specific type in a cluster.​
  • manage_k8s_resource: Manage Kubernetes resources of a specific type in a cluster.​
  • apply_yaml: Perform the apply operation in a cluster.​
​
tip​
To prevent accidental deletion of infrastructure due to misinterpretation of instructions by AI Agents, you cannot delete cluster resources.​
Prerequisites​
  • A Volcano Engine root user has been created, and the API key of the account has been obtained. For details, see Access key management.​
tip​
When you create an account for VKE MCP, we recommend that you follow the following principles:​
  • Dedicated account: We recommend that you create a dedicated IAM user to only perform MCP server-related operations.​
  • Least-privilege permissions: Make sure that your account has permissions on VKE-related APIs, such as CreateCluster and CreateNodePool. Attach the corresponding policies based on the principle of least privilege. For details, see Configuring IAM user permissions.​
  • An AI IDE platform and environment, such as Trae, Cursor, and Cline, have been installed in your local environment.​
  • The following dependencies required by the MCP server have been installed in the local environment:​
  • uv: a fast Python package installation and management tool that provides the uvx command-line tool. For details, see the official documentation of uv.​
Deployment method​
tip​
  • You can deploy the VKE MCP server on your on-premises computer or ModelArk based on your business requirements.​
  • You can only manually add the VKE MCP server in Trae. You cannot add it from the marketplace.​
Deploying the MCP server in your local environment​
Step 1: Deploy the MCP server​
This topic provides an example of how to configure and use the VKE MCP server in Trae.​
  1. Log in to the Trae platform in your local environment.​
  1. On the IDE mode page, click the settings icon in the upper-right corner to go to the configuration center.​
  1. In the top navigation bar, click MCP. Then, click Add > Add Manually.​
  1. Paste the following JSON configurations into the text box. Replace the values of YOUR_AK and YOUR_SK in the code with the actual access key ID (AK) and secret access key (SK) of your account.​
  • ​
    {​
    "mcpServers": {​
    "vke": {​
    "command": "uvx",​
    "args": [​
    "--from",​
    "git+https@github.com/volcengine/mcp-server#subdirectory=server/mcp_server_vke",​
    "mcp-server-vke"​
    ],​
    "env": {​
    "VOLCENGINE_ACCESS_KEY": "YOUR_AK", // The account AK.​
    "VOLCENGINE_SECRET_KEY": "YOUR_SK", // The account SK.​
    "VOLCENGINE_SESSION_TOKEN": "YOUR_ST", // (Optional) The temporary session token.​
    "ALLOW_WRITE": "false" // (Optional) Whether to enable write permissions. Valid values: true and false.​
    }​
    }​
    }​
    }​
    ​
  • ​
    Environment variable​
    Description​
    Required​
    VOLCENGINE_ACCESS_KEY​
    The AK of your Volcano Engine root user. For instructions on obtaining the AK, see Managing access keys.​
    Yes​
    VOLCENGINE_SECRET_KEY​
    The SK of your Volcano Engine root user. For instructions on obtaining the SK, see Managing access keys.​
    Yes​
    VOLCENGINE_SESSION_TOKEN​
    The temporary session token.​
    no​
    ALLOW_WRITE​
    Whether to enable write permissions. Valid values:​
    • true: Enables write permissions, which allows operations, such as creation and update.​
    • false: Disables write permissions, which does not allow operations, such as creation and update. This value is used by default.​
    Warning​
    We recommend that you enable write permissions only when necessary to prevent data loss due to accidental operations.​
    no​
    ​
  1. Click Confirm to save the configuration.​
Step 2: Associate an Agent​
After you configure the MCP server, you need to associate it with an Agent. In this way, you can use the tools provided by the VKE MCP service.​
  1. In the top navigation bar of the configuration center, click Agents to create or edit an Agent.​
  1. In the Tool - MCP list, select the configured VKE MCP server.​
  1. Click Create to complete the configuration.​
Deploying the MCP server in ModelArk​
  1. Access the MCP marketplace.​
  1. Search for and select VKE MCP in the service list and then click the service card to go to the service details page.​
  1. Click the Install tab, specify the tool to be used, and then click Generate to obtain the MCP URL.​
  1. Use basic MCP tools and manage VKE clusters. For details about how to invoke the tools, see Cloud-deployed MCP/Remote MCP.​
Validating results​
Interaction process​
After you complete the preceding configuration, you can interact with the Agent associated with the VKE MCP server and manage clusters.​
  1. Open the chat window with the Agent.​
  1. Enter natural language instructions, such as "Check node status" or "Query add-on status".​
  1. After the Agent receives the instructions, it analyzes and determines which tool provided by the VKE MCP server needs to be used.​
  1. The Agent automatically constructs API request parameters and calls the tool provided by the VKE MCP server through the MCP protocol.​
  1. After the MCP server executes the query, it returns the result to the Agent.​
  1. The Agent organizes the result and presents it to you in an easy-to-understand format, such as charts and text.​
​
Last updated: 2026.10.23 10:41:06