Tencent Cloud Sub-account Mode
Provide isolated AI development environments for employees. Each employee gets a Tencent Cloud sub-account with independent isolation and can log in to the Tencent Cloud console.
This article describes one possible reference implementation. The sub-account mode can be implemented in various ways, for example:
- Develop cloud functions + web pages + authentication on the management environment to automatically assign sub-accounts and resources
- Manually create sub-accounts and distribute resources via local scripts
Both approaches are valid reference implementations. Enterprises can choose the implementation method that best fits their tech stack and operational processes.
Solution Overview
Provide enterprises with a unified AI development resource management platform. Independent CloudBase environments and AI assistant servers are allocated for each employee, achieving:
- Unified resource allocation: Enterprise administrators allocate independent CloudBase environments and servers for employees through the management environment
- Fully isolated resources: Each employee has an independent CloudBase environment and server, without interference from others
- Out-of-the-box AI capabilities: Each server comes pre-installed with the OpenClaw AI assistant, with CloudBase integration configured
- Fine-grained permission control: Employees can only access their own resources and cannot accidentally operate on others' environments
- Unified management view: Enterprises can view all resource usage, with controllable costs
- Manageable and auditable by humans: Employees can log in to the Tencent Cloud console via sub-accounts to manually manage/inspect cloud resources
Overall Architecture
Core Process
Configure Permission Policy
Configure CAM permission policies for each sub-account, restricting them to only access their own CloudBase environment. For detailed policy structure and field descriptions, see the policy template below.
Create a custom policy in the CAM Console, replace the placeholders in the policy template with actual values, and associate it with the sub-account. See the complete policy template and placeholder descriptions below.
Log in to Console
A unique advantage of sub-account mode: employees can directly use their Tencent Cloud sub-account to log in to the CloudBase Console and manage their own CloudBase environment — viewing databases, debugging cloud functions, inspecting storage, etc. The permission policy automatically restricts sub-accounts to only see and operate their own environment.
Configure MCP and Skill
Sub-account mode supports two MCP connection methods. After configuration, MCP and Skill can be used:
- Auth Code Login (Recommended)
- Sub-account Keys
Employees do not need to manually configure any keys. After MCP starts, it automatically initiates device code authorization and completes login in the browser. The environments accessible after login are controlled by the CAM permission policy — sub-accounts can only see the environments allowed by the policy.
Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.
Step 1: Install / Configure CloudBase
Install in one click:
Or manual configuration:
Or add this configuration to .cursor/mcp.json:
1{2 "mcpServers": {3 "cloudbase": {4 "command": "npx",5 "args": ["@cloudbase/cloudbase-mcp@latest"],6 "env": {7 "INTEGRATION_IDE": "Cursor"8 }9 }10 }11}Step 2: Chat with AI
Enter the following in your AI chat in order:
Install CloudBase Skills: run npx skills add tencentcloudbase/cloudbase-skills -yUse CloudBase Skills: 创建一个使用 CloudBase Auth 支持微信登录的小程序应用Configure the sub-account's API key in MCP, suitable for automated scenarios.
Configure your AI tool to connect with CloudBase capabilities. Supports local and hosted connection. See connection modes.
Step 1: Install / Configure CloudBase
Install in one click:
Or manual configuration:
Or add this configuration to .cursor/mcp.json:
1{2 "mcpServers": {3 "cloudbase": {4 "command": "npx",5 "args": [6 "@cloudbase/cloudbase-mcp@latest"7 ],8 "env": {9 "INTEGRATION_IDE": "Cursor",10 "CLOUDBASE_ENV_ID": "<this employee's environment ID>",11 "TENCENTCLOUD_SECRETID": "<sub-account SecretId>",12 "TENCENTCLOUD_SECRETKEY": "<sub-account SecretKey>"13 }14 }15 }16}Step 2: Chat with AI
Enter the following in your AI chat in order:
Install CloudBase Skills: run npx skills add tencentcloudbase/cloudbase-skills -yUse CloudBase Skills: Use CloudBase to operate the environment, sub-account keys configured via MCPCost Estimation
| Item | Unit Price | Quantity | Subtotal |
|---|---|---|---|
| Management Environment (CloudBase Personal) | ¥19.9/month | 1 | ¥19.9 |
| Employee Environment (CloudBase Personal, including OpenClaw Server) | ¥19.9/month | N | ¥19.9 × N |
Examples:
- 10 employees: ¥19.9 × (1 + 10) = ¥219/month
- 50 employees: ¥19.9 × (1 + 50) = ¥1,015/month
Responsibilities of All Parties
| Role | Responsibilities |
|---|---|
| Enterprise Internal System | Employee identity authentication, create CAM sub-accounts and CloudBase environments for employees, create Lighthouse servers and install CloudBase Skill/MCP via TAT, configure CAM permission policies |
| OpenClaw | As the employee's operation entry point, provide AI assistant capabilities, operate cloud resources via CloudBase Skill/MCP |
| Tencent Cloud CAM | Provide capabilities such as sub-account creation, API key generation, and permission policy management |
| Tencent Cloud CloudBase | Provide cloud resource capabilities such as environment creation, database, cloud functions, and storage |
Verify Isolation Effect
After configuration is complete, verify that isolation is effective:
- Use the sub-account key to call
DescribeEnvs, confirm that only the user's own environment can be seen - Try to access resources of other environments, should return insufficient permission error
- Operate cloud resources in MCP, confirm that only resources within the user's own environment can be operated