CUA MCP Server MCP server

Enables LLMs to run Computer-Use Agent (CUA) workflows on Apple Silicon macOS.
Back to servers
Provider
CUA
Release date
Apr 07, 2025
Language
Python
Package
Stats
3.3K downloads
6.3K stars

The MCP server for Computer-Use Agent (CUA) allows you to run CUA through Claude Desktop or other MCP clients, enabling AI assistants to perform tasks on your computer through a standardized interface.

Installation

Prerequisites

Before installing the MCP server, you need to set up the full Computer-Use Agent capabilities, which includes:

  1. Installing the Lume CLI
  2. Pulling the latest macOS CUA image
  3. Starting the Lume daemon service

Make sure these prerequisites are completed and working before proceeding.

Basic Installation

Install the package from PyPI:

pip install cua-mcp-server

This will install:

  • The MCP server
  • CUA agent and computer dependencies
  • An executable cua-mcp-server script in your PATH

Easy Setup Script

For a simplified installation, use this one-liner:

curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/install_mcp_server.sh | bash

This script will:

  • Create the ~/.cua directory if it doesn't exist
  • Generate a startup script at ~/.cua/start_mcp_server.sh
  • Make the script executable

Configuration

Environment Variables

The server is configured using environment variables:

Variable Description Default
CUA_AGENT_LOOP Agent loop to use (OPENAI, ANTHROPIC, UITARS, 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

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/):

{ 
  "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",
        "CUA_PROVIDER_API_KEY": "your-api-key"
      }
    }
  }
}

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.json in your project directory
  • Global: Create ~/.cursor/mcp.json in your home directory

For more information on MCP with Cursor, see the official Cursor MCP documentation.

Usage

Once configured, you can simply ask Claude to perform computer tasks:

  • "Open Chrome and go to github.com"
  • "Create a folder called 'Projects' on my desktop"
  • "Find all PDFs in my Downloads folder"
  • "Take a screenshot and highlight the error message"

Available Tools

The MCP server exposes the following tools to Claude:

  1. run_cua_task - Run a single Computer-Use Agent task with the given instruction
  2. run_multi_cua_tasks - Run multiple tasks in sequence

Troubleshooting

If you get a path error, try changing the path to the script to be absolute instead of relative.

To see the logs:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

First-time Usage Notes

API Keys: Ensure you have valid API keys:

  • Add your Anthropic API key or other model provider API key in the Claude Desktop config
  • Or set it as an environment variable in your shell profile

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later