mirror of
https://github.com/trycua/computer.git
synced 2026-01-07 14:00:04 -06:00
changed dev guide to use a .sh script
This commit is contained in:
@@ -83,10 +83,9 @@ If you want to develop with the cua-mcp-server directly without installation, yo
|
||||
{
|
||||
"mcpServers": {
|
||||
"cua-agent": {
|
||||
"command": "/Users/YOURUSERNAME/cua/.venv/bin/python",
|
||||
"args": ["-m", "mcp_server.server"],
|
||||
"command": "/bin/bash",
|
||||
"args": ["~/cua/libs/mcp-server/scripts/start_mcp_server.sh"],
|
||||
"env": {
|
||||
"PYTHONPATH": "/Users/YOURUSERNAME/cua/libs/mcp-server:/Users/YOURUSERNAME/cua/libs/agent:/Users/YOURUSERNAME/cua/libs/computer:/Users/YOURUSERNAME/cua/libs/core:/Users/YOURUSERNAME/cua/libs/pylume",
|
||||
"CUA_AGENT_LOOP": "UITARS",
|
||||
"CUA_MODEL_PROVIDER": "OAICOMPAT",
|
||||
"CUA_MODEL_NAME": "ByteDance-Seed/UI-TARS-1.5-7B",
|
||||
@@ -98,19 +97,22 @@ If you want to develop with the cua-mcp-server directly without installation, yo
|
||||
}
|
||||
```
|
||||
|
||||
To see the logs:
|
||||
```
|
||||
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
|
||||
```
|
||||
|
||||
This configuration:
|
||||
- Uses your local Python virtual environment to run the server module directly
|
||||
- Sets the Python path to include all necessary library dependencies
|
||||
- Uses the start_mcp_server.sh script which automatically sets up the Python path and runs the server module
|
||||
- Works with Claude Desktop, Cursor, or any other MCP client
|
||||
- Automatically uses your development code without requiring installation
|
||||
|
||||
Just add this to your MCP client's configuration and it will use your local development version of the server.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
If you get a `/bin/bash: ~/cua/libs/mcp-server/scripts/start_mcp_server.sh: No such file or directory` 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
|
||||
```
|
||||
|
||||
## 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/`):
|
||||
|
||||
14
libs/mcp-server/scripts/start_mcp_server.sh
Executable file
14
libs/mcp-server/scripts/start_mcp_server.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Set the CUA repository path based on script location
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
CUA_REPO_DIR="$( cd "$SCRIPT_DIR/../../.." &> /dev/null && pwd )"
|
||||
PYTHON_PATH="${CUA_REPO_DIR}/.venv/bin/python"
|
||||
|
||||
# Set Python path to include all necessary libraries
|
||||
export PYTHONPATH="${CUA_REPO_DIR}/libs/mcp-server:${CUA_REPO_DIR}/libs/agent:${CUA_REPO_DIR}/libs/computer:${CUA_REPO_DIR}/libs/core:${CUA_REPO_DIR}/libs/pylume"
|
||||
|
||||
# Run the MCP server directly as a module
|
||||
$PYTHON_PATH -m mcp_server.server
|
||||
Reference in New Issue
Block a user