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 activated your Alibaba Cloud account.
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, click 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 obtain your MCP URL, see Get your MCP URL.
Select the latest image
When you configure your environment to use the latest image, it always uses the latest image for that environment.
Cloud desktop (Windows):
windows_latestCloud desktop (Linux):
linux_latestCloud browser:
browser_latestCode sandbox:
code_latestCloud phone:
mobile_latest
Select a specific version image
Set the IMAGEID field to a specific version of an OS image or a custom image.
OS images
Log on to the AgentBay console.
In the navigation pane on the left, click Image Management (Beta).
In Image Management (Beta), click the OS Images tab. Then copy the image ID from the image list.
Custom images
Log on to the AgentBay console.
In the navigation pane on the left, click Image Management (Beta).
In Image Management (Beta), click the Custom Images 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, click 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 your MCP URL 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 obtained in Get an API key.Set
IMAGEIDto the image ID you obtained in Select an image.
{ "mcpServers": { "wuying_mcp_server": { "url": "https://agentbay-intl.wuying.aliyuncs.com/v2/sse?APIKEY=YOUR_API_KEY&IMAGEID=browser_latest" } } }Streamable
Set
YOUR_API_KEYto the API key you obtained in Get an API key.Set
IMAGEIDto the image ID you obtained in Select an image.
{ "mcpServers": { "wuying_mcp_server": { "url": "https://agentbay-intl.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.
The examples below use IMAGEID set to browser_latest.
Run this command. The agent opens the Alibaba Cloud website in a cloud browser session.
Visit the Alibaba Cloud websiteRun this command 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.
What to do next
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 summary.