Files
trycua--cua/libs/python/mcp-server/scripts/test_mcp_server.sh
T
wehub-resource-sync 91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:19 +08:00

47 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Test script to run the MCP server and see all errors
# This is for LOCAL DEVELOPMENT ONLY - helps debug issues before connecting from Claude
set -e # Exit on error, but we'll see the error
echo "=========================================="
echo "CUA MCP Server - Development Test"
echo "=========================================="
echo ""
# Get the repo root
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
CUA_REPO_DIR="$( cd "$SCRIPT_DIR/../../../.." &> /dev/null && pwd )"
echo "Repo directory: $CUA_REPO_DIR"
# Find Python
if [ -f "$CUA_REPO_DIR/.venv/bin/python" ]; then
PYTHON="$CUA_REPO_DIR/.venv/bin/python"
elif [ -f "$CUA_REPO_DIR/libs/.venv/bin/python" ]; then
PYTHON="$CUA_REPO_DIR/libs/.venv/bin/python"
else
PYTHON="python3"
fi
echo "Using Python: $PYTHON"
$PYTHON --version
echo ""
# Set up environment
export PYTHONPATH="$CUA_REPO_DIR/libs/python/mcp-server:$CUA_REPO_DIR/libs/python/agent:$CUA_REPO_DIR/libs/python/computer:$CUA_REPO_DIR/libs/python/core"
export CUA_MODEL_NAME="${CUA_MODEL_NAME:-anthropic/claude-sonnet-4-5-20250929}"
echo "Environment:"
echo " PYTHONPATH: $PYTHONPATH"
echo " CUA_MODEL_NAME: $CUA_MODEL_NAME"
echo ""
echo "=========================================="
echo "Starting MCP server..."
echo "Press Ctrl+C to stop"
echo "=========================================="
echo ""
# Run the server WITHOUT redirecting stderr, so we can see all errors
exec "$PYTHON" -m mcp_server.server