Category: service
Alibaba Cloud OpenAPI MCP Ops
Use this skill when:
- Codex can see an Alibaba Cloud custom MCP server, but the required tools are missing.
- You need to close SWAS deployment permissions before bootstrap or release.
- You need to verify OAuth, tool loading, region, instance discovery, or Cloud Assistant readiness.
- You are using a project-integrated OpenAPI MCP server instead of an Aliyun plugin.
This skill is based on a verified SWAS deployment-prep workflow against a custom OpenAPI MCP server.
Scope
This skill covers:
- Custom OpenAPI MCP server endpoint and OAuth handling
- Selector updates for SWAS deployment operations
- Codex desktop reload behavior after MCP changes
- SWAS instance readiness checks before deployment
- Low-risk remote command validation through Cloud Assistant
This skill does not cover:
- Full application deployment steps
- Public web ingress setup
- ECS-specific operations outside the SWAS path
Core Lessons
A custom OpenAPI MCP server may authenticate successfully while still missing required tools.
OAuth success does not imply deployment selectors are present.
The custom MCP server id in the endpoint path is case-sensitive.
If the id casing is wrong, the browser flow may still open, but the server will not load correctly.
Codex desktop does not reliably hot-load newly added MCP servers or updated selector sets.
After changing the MCP config or custom server selectors, restart Codex before concluding the tools are still missing.
Read-only SWAS selectors are not enough for deployment.
For deployment preparation, you need remote execution capability.
For SWAS deployment, the minimal useful mutating selectors are:
RunCommand
CreateCommand
InvokeCommand
DeleteCommand
CreateSnapshot (recommended before first deploy)
Firewall write permissions are not required by default for this project.
If the app uses Feishu long connection and does not need inbound public HTTP immediately, do not add firewall write selectors unless a real deployment step needs them.
Alibaba Cloud Linux 3 is an acceptable clean Linux base for this project.
It is suitable for Node + systemd + SQLite + logs + backup scripts.
Recommended Selector Set
Keep existing read-only selectors such as:
ListInstances
ListInstanceStatus
ListFirewallRules
ListSnapshots
DescribeCloudAssistantStatus
DescribeCommands
DescribeInvocations
DescribeInvocationResult
Add deployment selectors:
RunCommand
CreateCommand
InvokeCommand
DeleteCommand
CreateSnapshot
Add firewall write selectors only if actually needed later:
CreateFirewallRule
CreateFirewallRules
ModifyFirewallRule
EnableFirewallRule
DisableFirewallRule
Workflow
Confirm the active custom MCP server name and endpoint.
Example pattern: https://openapi-mcp.<region>.aliyuncs.com/accounts/<account>/custom/<server-name>/id/<server-id>/sse
Verify the server is actually loaded in the current Codex session.
If the config was just added or changed, restart Codex first.
List available tools or attempt a minimal read-only SWAS query.
If only read-only tools exist, do not try to deploy yet.
Close selector gaps on the custom MCP server.
Use Alibaba Cloud OpenAPI Explorer management APIs to update the custom server.
Restart Codex after selector updates.
Do not rely on the current session to pick up new tools.
Validate target instance readiness with read-only checks:
- Instance exists in the expected region
- Instance status is
Running
- Cloud Assistant is installed and healthy
- Public IP is correct
Validate remote execution with one low-risk command:
Fetch invocation results and confirm:
- status is
Success
- exit code is
0
Only after the above passes should you continue to server bootstrap or app deployment.
Credential Policy
- Prefer OAuth-backed MCP for normal operation.
- Use AccessKey only for one-off MCP management when OAuth-backed tools cannot update selectors.
- Never leave AccessKey values in repo files, scripts, docs, or shell profiles after the operation.
- If a user pasted credentials into chat for emergency use, recommend rotation after the task.
Deployment Readiness Checklist
Before claiming the SWAS side is ready, verify all of the following:
- Custom MCP server loads in Codex after restart
- SWAS deployment selectors are present
- Target region is correct
- Target instance id is confirmed
- Instance status is
Running
- Cloud Assistant status is healthy
- Remote command execution succeeds
- Optional recovery snapshot is created if the upcoming step is risky
Official Docs
Validation
This skill is valid if it helps you answer these questions quickly and correctly:
- Is the custom Aliyun MCP server loaded in the current Codex session?
- Are the SWAS deployment selectors present?
- Is the instance actually ready for remote execution?
- Is the next blocker MCP permissions, instance state, or app deployment logic?
1---2name: aliyun-openapi-mcp-ops3description: Category: service4---56Category: service78# Alibaba Cloud OpenAPI MCP Ops910Use this skill when:1112- Codex can see an Alibaba Cloud custom MCP server, but the required tools are missing.13- You need to close SWAS deployment permissions before bootstrap or release.14- You need to verify OAuth, tool loading, region, instance discovery, or Cloud Assistant readiness.15- You are using a project-integrated OpenAPI MCP server instead of an Aliyun plugin.1617This skill is based on a verified SWAS deployment-prep workflow against a custom OpenAPI MCP server.1819## Scope2021This skill covers:2223- Custom OpenAPI MCP server endpoint and OAuth handling24- Selector updates for SWAS deployment operations25- Codex desktop reload behavior after MCP changes26- SWAS instance readiness checks before deployment27- Low-risk remote command validation through Cloud Assistant2829This skill does not cover:3031- Full application deployment steps32- Public web ingress setup33- ECS-specific operations outside the SWAS path3435## Core Lessons36371. A custom OpenAPI MCP server may authenticate successfully while still missing required tools.38 OAuth success does not imply deployment selectors are present.39402. The custom MCP server id in the endpoint path is case-sensitive.41 If the id casing is wrong, the browser flow may still open, but the server will not load correctly.42433. Codex desktop does not reliably hot-load newly added MCP servers or updated selector sets.44 After changing the MCP config or custom server selectors, restart Codex before concluding the tools are still missing.45464. Read-only SWAS selectors are not enough for deployment.47 For deployment preparation, you need remote execution capability.48495. For SWAS deployment, the minimal useful mutating selectors are:50 - `RunCommand`51 - `CreateCommand`52 - `InvokeCommand`53 - `DeleteCommand`54 - `CreateSnapshot` (recommended before first deploy)55566. Firewall write permissions are not required by default for this project.57 If the app uses Feishu long connection and does not need inbound public HTTP immediately, do not add firewall write selectors unless a real deployment step needs them.58597. `Alibaba Cloud Linux 3` is an acceptable clean Linux base for this project.60 It is suitable for `Node + systemd + SQLite + logs + backup scripts`.6162## Recommended Selector Set6364Keep existing read-only selectors such as:6566- `ListInstances`67- `ListInstanceStatus`68- `ListFirewallRules`69- `ListSnapshots`70- `DescribeCloudAssistantStatus`71- `DescribeCommands`72- `DescribeInvocations`73- `DescribeInvocationResult`7475Add deployment selectors:7677- `RunCommand`78- `CreateCommand`79- `InvokeCommand`80- `DeleteCommand`81- `CreateSnapshot`8283Add firewall write selectors only if actually needed later:8485- `CreateFirewallRule`86- `CreateFirewallRules`87- `ModifyFirewallRule`88- `EnableFirewallRule`89- `DisableFirewallRule`9091## Workflow92931. Confirm the active custom MCP server name and endpoint.94 Example pattern: `https://openapi-mcp.<region>.aliyuncs.com/accounts/<account>/custom/<server-name>/id/<server-id>/sse`95962. Verify the server is actually loaded in the current Codex session.97 If the config was just added or changed, restart Codex first.98993. List available tools or attempt a minimal read-only SWAS query.100 If only read-only tools exist, do not try to deploy yet.1011024. Close selector gaps on the custom MCP server.103 Use Alibaba Cloud OpenAPI Explorer management APIs to update the custom server.1041055. Restart Codex after selector updates.106 Do not rely on the current session to pick up new tools.1071086. Validate target instance readiness with read-only checks:109 - Instance exists in the expected region110 - Instance status is `Running`111 - Cloud Assistant is installed and healthy112 - Public IP is correct1131147. Validate remote execution with one low-risk command:115 - `uname -a`116 - `node -v || true`1171188. Fetch invocation results and confirm:119 - status is `Success`120 - exit code is `0`1211229. Only after the above passes should you continue to server bootstrap or app deployment.123124## Credential Policy125126- Prefer OAuth-backed MCP for normal operation.127- Use AccessKey only for one-off MCP management when OAuth-backed tools cannot update selectors.128- Never leave AccessKey values in repo files, scripts, docs, or shell profiles after the operation.129- If a user pasted credentials into chat for emergency use, recommend rotation after the task.130131## Deployment Readiness Checklist132133Before claiming the SWAS side is ready, verify all of the following:134135- Custom MCP server loads in Codex after restart136- SWAS deployment selectors are present137- Target region is correct138- Target instance id is confirmed139- Instance status is `Running`140- Cloud Assistant status is healthy141- Remote command execution succeeds142- Optional recovery snapshot is created if the upcoming step is risky143144## Official Docs145146- [OpenAPI MCP Server 使用指南](https://help.aliyun.com/zh/openapi/user-guide/openapi-mcp-server-guide)147- [CreateApiMcpServer](https://help.aliyun.com/zh/openapi/developer-reference/api-openapiexplorer-2024-11-30-createapimcpserver)148- [UpdateApiMcpServer](https://help.aliyun.com/zh/openapi/developer-reference/api-openapiexplorer-2024-11-30-updateapimcpserver)149- [轻量应用服务器 OpenAPI 集成概览](https://help.aliyun.com/zh/simple-application-server/developer-reference/using-openapi)150- [轻量应用服务器 API 概览](https://help.aliyun.com/zh/simple-application-server/developer-reference/api-swas-open-2020-06-01-overview)151- [重置轻量应用服务器系统](https://help.aliyun.com/zh/simple-application-server/user-guide/reset-a-simple-application-server)152153## Validation154155This skill is valid if it helps you answer these questions quickly and correctly:156157- Is the custom Aliyun MCP server loaded in the current Codex session?158- Are the SWAS deployment selectors present?159- Is the instance actually ready for remote execution?160- Is the next blocker MCP permissions, instance state, or app deployment logic?