Files
computer/libs/python/mcp-server

Shows my svg

Python macOS Discord PyPI

cua-mcp-server

cua-mcp-server is an MCP server for the Computer-Use Agent (CUA). It enables CUA to run through MCP clients such as Claude Desktop and Cursor.

Prerequisites

Install

Download and run the installation script:

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

Add this to your MCP client configuration:

{
  "mcpServers": {
    "cua-agent": {
      "command": "/usr/bin/env",
      "args": [
        "bash",
        "-lc",
        "export CUA_MODEL_NAME='anthropic/claude-sonnet-4-5-20250929'; ~/.cua/start_mcp_server.sh"
      ]
    }
  }
}

Development (run from a local checkout)

Use an absolute path to the repository root in the arguments below.

{
  "mcpServers": {
    "cua-agent": {
      "command": "/usr/bin/env",
      "args": [
        "bash",
        "-lc",
        "export CUA_MODEL_NAME='huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B'; /Users/your-username/Documents/GitHub/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"
      ]
    }
  }
}

Notes:

  • Replace /Users/your-username/Documents/GitHub/cua with the absolute path to your clone.
  • The script sets PYTHONPATH for local libs and runs the server module.

Quick Start

After configuring your MCP client, restart it and invoke one of these tools:

  • Take a screenshot
{
  "tool": "screenshot_cua",
  "args": {}
}
  • Run a task
{
  "tool": "run_cua_task",
  "args": { "task": "Open Safari and search for University of Toronto" }
}

Expected results:

  • Assistant messages streamed during execution
  • A final screenshot image

Desktop Extension

CUA also provides a Claude Desktop Extension (.mcpb file) for easy one-click installation.

Building the Desktop Extension

To build the desktop extension from source:

cd libs/python/mcp-server
python3 build-extension.py

This creates desktop-extension/cua-extension.mcpb which can be installed directly in Claude Desktop.

Installing the Desktop Extension

  1. Build the extension (see above)
  2. Open Claude Desktop Settings
  3. Go to Extensions
  4. Drop the cua-extension.mcpb file into the window
  5. Follow the installation prompts

See desktop-extension/README.md for more details.

Documentation

Troubleshooting

Server reports disconnected in MCP client:

  • Use an absolute path in the args command.
  • Launch via /usr/bin/env bash -lc so the shell initializes and expands paths.
  • Run the script manually to verify:
    /usr/bin/env bash -lc '/Users/your-username/Documents/GitHub/cua/libs/python/mcp-server/scripts/start_mcp_server.sh'
    

pip not found in venv:

python3 -m ensurepip --upgrade
python3 -m pip install -U pip setuptools wheel

Pydantic schema error related to Image:

python3 -m pip install -U "mcp>=1.2.0" "fastmcp>=0.4.7" "pydantic>=2.7,<2.12"

If issues persist, capture logs from your MCP client and the server startup script for diagnosis.