Client Integrations
Claude Desktop Integration
To use with Claude Desktop, add an entry to your Claude Desktop configuration (claude_desktop_config.json, typically found in ~/.config/claude-desktop/):
Package Installation Method
{
"mcpServers": {
"cua-agent": {
"command": "/bin/bash",
"args": ["~/.cua/start_mcp_server.sh"],
"env": {
"CUA_MODEL_NAME": "anthropic/claude-sonnet-4-20250514",
"ANTHROPIC_API_KEY": "your-anthropic-api-key-here",
"CUA_MAX_IMAGES": "3",
"CUA_USE_HOST_COMPUTER_SERVER": "false"
}
}
}
}Development Method
If you're working with the CUA source code:
Standard VM Mode:
{
"mcpServers": {
"cua-agent": {
"command": "/usr/bin/env",
"args": [
"bash",
"-lc",
"export CUA_MODEL_NAME='anthropic/claude-sonnet-4-20250514'; export ANTHROPIC_API_KEY='your-anthropic-api-key-here'; /path/to/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"
]
}
}
}Host Computer Control Mode:
{
"mcpServers": {
"cua-agent": {
"command": "/usr/bin/env",
"args": [
"bash",
"-lc",
"export CUA_MODEL_NAME='anthropic/claude-sonnet-4-20250514'; export ANTHROPIC_API_KEY='your-anthropic-api-key-here'; export CUA_USE_HOST_COMPUTER_SERVER='true'; export CUA_MAX_IMAGES='1'; /path/to/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"
]
}
}
}Note: Replace /path/to/cua with the absolute path to your CUA repository directory.
⚠️ Host Computer Control Setup: When using CUA_USE_HOST_COMPUTER_SERVER='true', you must also:
- Install computer server dependencies:
python3 -m pip install uvicorn fastapi - Install the computer server:
python3 -m pip install -e libs/python/computer-server --break-system-packages - Start the computer server:
python -m computer_server --log-level debug - The AI will have direct access to your desktop - use with caution!
For more information on MCP with Claude Desktop, see the official MCP User Guide.
Cursor Integration
To use with Cursor, add an MCP configuration file in one of these locations:
- Project-specific: Create
.cursor/mcp.jsonin your project directory - Global: Create
~/.cursor/mcp.jsonin your home directory
Example configuration for Cursor:
{
"mcpServers": {
"cua-agent": {
"command": "/bin/bash",
"args": ["~/.cua/start_mcp_server.sh"],
"env": {
"CUA_MODEL_NAME": "anthropic/claude-sonnet-4-20250514",
"ANTHROPIC_API_KEY": "your-anthropic-api-key-here"
}
}
}
}After 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.
Other MCP Clients
The MCP server is compatible with any MCP-compliant client. The server exposes the following tools:
run_cua_task- Execute single computer tasksrun_multi_cua_tasks- Execute multiple tasks (sequential or concurrent)screenshot_cua- Capture screenshotsget_session_stats- Monitor session statisticscleanup_session- Manage session lifecycle
Configuration Options
All MCP clients can configure the server using environment variables:
CUA_MODEL_NAME- Model to use for task executionCUA_MAX_IMAGES- Maximum images to keep in contextCUA_USE_HOST_COMPUTER_SERVER- Use host system instead of VM
See the Configuration page for detailed configuration options.
Was this page helpful?