Update to install script

This commit is contained in:
f-trycua
2025-04-06 21:04:00 -07:00
parent 5b90cbe686
commit 887546a669
2 changed files with 27 additions and 6 deletions
+10 -6
View File
@@ -33,20 +33,26 @@ This will install:
## Easy Setup Script
If you want to simplify installation, you can use this one-liner to download and run a setup script:
If you want to simplify installation, you can use this one-liner to download and run the installation script:
```bash
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/run_mcp_server.sh | bash
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/install_mcp_server.sh | bash
```
Or use the script directly in your MCP configuration like this:
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
- The startup script automatically manages Python virtual environments and installs/updates the cua-mcp-server package
You can then use the script in your MCP configuration like this:
```json
{
"mcpServers": {
"cua-agent": {
"command": "/bin/bash",
"args": ["-c", "curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/run_mcp_server.sh | bash"],
"args": ["~/.cua/start_mcp_server.sh"],
"env": {
"CUA_AGENT_LOOP": "OMNI",
"CUA_MODEL_PROVIDER": "ANTHROPIC",
@@ -58,8 +64,6 @@ Or use the script directly in your MCP configuration like this:
}
```
This script will automatically check if cua-mcp-server is installed, install it if needed, and run it.
## 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/`):
@@ -2,6 +2,15 @@
set -e
# Create the ~/.cua directory if it doesn't exist
mkdir -p "$HOME/.cua"
# Create start_mcp_server.sh script in ~/.cua directory
cat > "$HOME/.cua/start_mcp_server.sh" << 'EOF'
#!/bin/bash
set -e
# Function to check if a directory is writable
is_writable() {
[ -w "$1" ]
@@ -30,11 +39,13 @@ fi
# Check if Python is installed
if ! command_exists python3; then
echo "Error: Python 3 is not installed." >&2
exit 1
fi
# Check if pip is installed
if ! command_exists pip3; then
echo "Error: pip3 is not installed." >&2
exit 1
fi
@@ -54,3 +65,9 @@ pip install --upgrade "cua-mcp-server" >/dev/null 2>&1
cd "$VENV_DIR" # Change to venv directory to avoid current directory in path
python3 -c "from mcp_server.server import main; main()"
EOF
# Make the script executable
chmod +x "$HOME/.cua/start_mcp_server.sh"
echo "MCP server startup script created at $HOME/.cua/start_mcp_server.sh"