cua-mcp-server is a MCP server for the Computer-Use Agent (CUA), allowing you to run CUA through Claude Desktop or other MCP clients.
cua-mcp-server is a MCP server for the Computer-Use Agent (CUA), allowing you to run CUA through Claude Desktop or other MCP clients.
Install the package from PyPI:
pip install cua-mcp-server
This will install:
cua-mcp-server
script in your PATHIf you want to simplify installation, you can use this one-liner to download and run the installation script:
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/install_mcp_server.sh | bash
This script will:
You can then use the script in your MCP configuration like this:
{
"mcpServers": {
"cua-agent": {
"command": "/bin/bash",
"args": ["~/.cua/start_mcp_server.sh"],
"env": {
"CUA_AGENT_LOOP": "OMNI",
"CUA_MODEL_PROVIDER": "ANTHROPIC",
"CUA_MODEL_NAME": "claude-3-7-sonnet-20250219",
"ANTHROPIC_API_KEY": "your-api-key"
}
}
}
}
To use with Claude Desktop, add an entry to your Claude Desktop configuration (claude_desktop_config.json
, typically found in ~/.config/claude-desktop/
):
For more information on MCP with Claude Desktop, see the official MCP User Guide.
To use with Cursor, add an MCP configuration file in one of these locations:
.cursor/mcp.json
in your project directory~/.cursor/mcp.json
in your home directoryAfter configuration, you can simply tell Cursor's Agent to perform computer tasks by explicitly mentioning the CUA agent, such as "Use the computer control tools to open Safari."
For more information on MCP with Cursor, see the official Cursor MCP documentation.
API Keys: Ensure you have valid API keys:
The server is configured using environment variables (can be set in the Claude Desktop config):
Variable | Description | Default |
---|---|---|
CUA_AGENT_LOOP | Agent loop to use (OPENAI, ANTHROPIC, OMNI) | OMNI |
CUA_MODEL_PROVIDER | Model provider (ANTHROPIC, OPENAI, OLLAMA, OAICOMPAT) | ANTHROPIC |
CUA_MODEL_NAME | Model name to use | None (provider default) |
CUA_PROVIDER_BASE_URL | Base URL for provider API | None |
CUA_MAX_IMAGES | Maximum number of images to keep in context | 3 |
The MCP server exposes the following tools to Claude:
run_cua_task
- Run a single Computer-Use Agent task with the given instructionrun_multi_cua_tasks
- Run multiple tasks in sequenceOnce configured, you can simply ask Claude to perform computer tasks:
Claude will automatically use your CUA agent to perform these tasks.