Deploy the 2048 game globally in one minute using ESA Edge Routine, ESA MCP Server, a large model, and an AI programming tool. A single sentence and a simple configuration are all you need.
Solution advantages

Solution overview
To quickly create and deploy the 2048 game, follow these steps:
Activate the ESA Edge Routine service: This provides a runtime environment for the game. ESA Edge Routine offers global deployment, ultra-low latency, automatic scaling, and a serverless architecture.
Configure the Cline AI programming tool: Use Cline to establish an efficient connection between your IDE and the large model. A single instruction generates and debugs code. Cline also calls ESA MCP Server to deploy the code to ESA edge nodes.
Configure ESA MCP Server: MCP (Model Context Protocol) is a standard protocol that establishes bidirectional communication between large models and external systems. With MCP, large models can retrieve context information, such as user identity and device status. They can also call platform APIs to perform remote operations, such as reading and writing data or controlling devices. This helps them respond more accurately to user instructions and needs.
ESA MCP Server is a standard, open API service provided by ESA that integrates with large models. Developers can use a large model-driven approach to trigger Edge Routine operations, such as creation, updates, and publishing, through ESA MCP Server. This enables the intelligent management of edge computing tasks.
Generate and deploy the game code: After you complete the preceding steps, you can use a single sentence to have the large model automatically generate code. The code is then deployed globally to edge nodes through ESA MCP Server.
Activate the ESA Edge Routine service
When you first activate the service, it runs in free mode by default. You can switch to the pay-as-you-go billing method as needed. For more information, see Edge Routine billing.
Open the ESA console and navigate to the Edge Routine page.
If you are a new user, click Activate Now and follow the on-screen instructions.
Configure the Cline AI programming tool
Request an API key
The API key requested here is used for authentication when Cline calls the Alibaba Cloud Model Studio large model. You can first use the free quota for new users provided by Model Studio. After the free quota is used, you are charged based on the billing rules for large model products.
Go to the My API-KEY page and click Create My API-KEY.
In the Operation column for the API key you created, click View to obtain the API KEY.

Install and configure Cline in VS Code
In VS Code Extensions, search for and install Cline.

Open the Cline settings page to configure the API information for the large model. The following four items are required. You can keep the default values for the other items.
API Provider:
Alibaba QwenAlibaba API Line:
International APIQwen API Key: The API key you requested in the previous step.
Model: Use
qwen-max-latest.

Configure ESA MCP Server
Request an AccessKey pair for a RAM account
The AccessKey pair requested here is used for authentication when ESA MCP Server calls ESA Edge Routine.
Go to the RAM console and create a new RAM user.
After the user is created, immediately save the AccessKey ID and AccessKey Secret. You cannot retrieve them after you close the page.

Configure permissions for the RAM account
Based on the principle of least privilege for RAM users, grant only the necessary ESA operation permissions to this account.
Find the user that you created in the previous step and click Add Permissions.

On the Permission Management tab, click Grant Permission.
In the Select Policy section, select
AliyunESAFullAccessand click OK.
Configure ESA MCP Server in Cline
Open the
cline_mcp_settings.jsonfile in Cline.
Copy the following configuration code into the
cline_mcp_settings.jsonfile. Replace the values ofALIBABA_CLOUD_ACCESS_KEY_IDandALIBABA_CLOUD_ACCESS_KEY_SECRETwith the AccessKey ID and AccessKey Secret that you obtained in the previous step. Then, use the keyboard shortcutCtrl+S(Windows/Linux) orCommand+S(Mac) to save the configuration.{ "mcpServers": { "esa-mcp-server": { "command": "npx", "args": ["-y", "mcp-server-esa"], "env": { "ALIBABA_CLOUD_ACCESS_KEY_ID": "Your_AccessKey_ID", "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "Your_AccessKey_Secret" } } } }
After saving, wait for 3 to 5 seconds. The
esa-mcp-serverservice appears in theInstalledlist ofMCP Serverin Cline and shows a green enabled status. This indicates that ESA MCP Server is configured successfully.
Generate and deploy the game code
After everything is ready, send your request to Cline:
Write a 2048 game, deploy it on an Alibaba Cloud ESA routine, and show the default access URL provided by ER.The large model calls the tools provided by ESA MCP Server based on your request. These tools create the function, submit the code, and deploy it globally. Finally, a publicly accessible URL is returned.


After the 2048 game is generated and deployed, you can access the game page using the domain name provided by ESA. The entire process, from sending the request to the AI to accessing the game on the public network, can be completed in minutes.

