Files
computer/libs/python/mcp-server
Aditya Bavadekar c33517a42d chore: consolidate Ruff configs, add prettier dependancy and updated documentation usage
- Remove per-package Black, Ruff, and MyPy settings in individual pyproject.toml files
- Centralize Ruff configuration in root pyproject.toml under [tool.ruff.lint] with selected ignores
- Add Prettier setup and usage instructions to Development.md
- Include pnpm install instructions for JS/TS dependencies
- Ensure pre-commit hooks enforce Python and JS/TS formatting consistently
2025-10-22 11:10:21 -07:00
..

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-3-5-sonnet-20241022'; ~/.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

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.