The AgentBay platform uses the open standard Model Context Protocol (MCP) to provide a unified interface between AI models and runtime environments. It integrates deeply with cloud environments, enabling direct access to cloud features through MCP, such as session management, file operations, command execution, application management, and window control.
Prerequisites
Accounts and permissions: You have registered an Alibaba Cloud account and completed individual identity verification or enterprise identity verification.
New user trial: If this is your first time trying AgentBay on Alibaba Cloud, apply for a new user trial.
Get an API key
Log on to the AgentBay console.
In the navigation pane on the left, choose Service Management.
On the Service Management page, click Create API Key.
In the Create API Key dialog box, enter a name and click OK.
ImportantTo protect data security, do not share your API key.
Select an image
Set the IMAGEID field in your MCP URL to the image that matches your business needs. The MCP URLs shown below are code examples only. Use the actual code from the console. For more information about how to get your MCP URL, see Get an MCP address.
Select the latest image
When you configure your environment to use the latest image, it always uses the latest image for that environment.
Cloud computer (Windows):
windows_latestCloud computer (Linux):
linux_latestCloud browser:
browser_latestCode sandbox:
code_latestCloud phone:
mobile_latest
Select an image of a specific version
Set the IMAGEID field to a specific version of an OS image or a custom image.
System image
Log on to the AgentBay console.
In the navigation pane on the left, choose Image Management.
On the Images (Beta) page, on the System Image tab, copy the image ID from the image list.
Custom image
Log on to the AgentBay console.
In the navigation pane on the left, choose Image Management.
On the Images (Beta) page, click the Custom Image tab. Then copy the image ID from the image list.
Configure the MCP server
Add your MCP URL to any tool that supports MCP, such as Cline or Cursor. The steps below use Cursor v0.50.5.
Open the Cursor Settings panel. In the navigation pane on the left, choose MCP.
In the MCP Servers panel, click Add new global MCP server in the top-right corner.
Paste the MCP URL code block from Get an MCP address into your mcp.json file. Save the file to complete the configuration. Three connection methods are supported: SSE, Stdio, and Streamable. Choose the one that fits your project needs.
SSE
Set
YOUR_API_KEYto the API key you got in Get an API key.Set
IMAGEIDto the image ID you got in Select an image.
{ "mcpServers": { "wuying_mcp_server": { "url": "https://agentbay.wuying.aliyuncs.com/v2/sse?APIKEY=YOUR_API_KEY&IMAGEID=browser_latest" } } }Stdio
Set
API_KEYto the API key you got in Get an API key.Set
IMAGEIDto the image ID you got in Select an image.
{ "mcpServers": { "wuying_mcp_server": { "command": "npx", "args": ["-y", "wuying-agentbay-mcp-server"], "env": { "APIKEY": "akm—*****", "IMAGEID": "browser_latest" } } } }Streamable
Set
YOUR_API_KEYto the API key you got in Get an API key.Set
IMAGEIDto the image ID you got in Select an image.
{ "mcpServers": { "wuying_mcp_server": { "url": "https://agentbay.wuying.aliyuncs.com/v2/mcp?APIKEY=YOUR_API_KEY&IMAGEID=browser_latest" } } }
Try AgentBay
Use the cloud browser image to visit the Alibaba Cloud website
After you configure the AgentBay MCP in a tool that supports MCP, you can interact with the tool’s agent to run tasks on AgentBay MCP.
In the following example, IMAGEID is set to browser_latest.
Run this instruction. The agent opens the Alibaba Cloud website in a cloud browser session.
Visit the Alibaba Cloud websiteRun this instruction to retrieve the sandbox environment URL. Use the URL to view the task status.
Return the URL of the Wuying MCP service sandbox environmentThis URL expires and has a limit on how many times it can be opened. Use it immediately.
You can use the URL parameters
&input=true&keyboard=trueto enable or disable keyboard and mouse interaction. You can also change these settings in real time using the Web SDK. For details, see Web SDK.
Next steps
Use a custom image: If you encounter issues such as poor network performance or missing applications in the default image, use a custom image. For details, see Create an image.
Learn about MCP tools: To learn which MCP tools are supported and how to use them, see MCP tools overview.