computer-control-mcp 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/PKG-INFO +23 -2
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/README.md +22 -1
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/core.py +2 -5
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/pyproject.toml +1 -1
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/.gitignore +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/LICENSE +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/FZYTK.TTF +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/__init__.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/__main__.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/cli.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/gui.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/server.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/test.py +0 -0
- {computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/test_image.png +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: computer-control-mcp
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: MCP server that provides computer control capabilities, like mouse, keyboard, OCR, etc. using PyAutoGUI, RapidOCR, ONNXRuntime. Similar to 'computer-use' by Anthropic. With Zero External Dependencies.
|
|
5
5
|
Project-URL: Homepage, https://github.com/AB498/computer-control-mcp
|
|
6
6
|
Project-URL: Issues, https://github.com/AB498/computer-control-mcp/issues
|
|
@@ -88,13 +88,19 @@ computer-control-mcp # instead of uvx computer-control-mcp, so you can use the l
|
|
|
88
88
|
- `click_screen(x: int, y: int)`: Click at specified screen coordinates
|
|
89
89
|
- `move_mouse(x: int, y: int)`: Move mouse cursor to specified coordinates
|
|
90
90
|
- `drag_mouse(from_x: int, from_y: int, to_x: int, to_y: int, duration: float = 0.5)`: Drag mouse from one position to another
|
|
91
|
+
- `mouse_down(button: str = "left")`: Hold down a mouse button ('left', 'right', 'middle')
|
|
92
|
+
- `mouse_up(button: str = "left")`: Release a mouse button ('left', 'right', 'middle')
|
|
91
93
|
|
|
92
94
|
### Keyboard Control
|
|
93
95
|
- `type_text(text: str)`: Type the specified text at current cursor position
|
|
94
96
|
- `press_key(key: str)`: Press a specified keyboard key
|
|
97
|
+
- `key_down(key: str)`: Hold down a specific keyboard key until released
|
|
98
|
+
- `key_up(key: str)`: Release a specific keyboard key
|
|
99
|
+
- `press_keys(keys: Union[str, List[Union[str, List[str]]]])`: Press keyboard keys (supports single keys, sequences, and combinations)
|
|
95
100
|
|
|
96
101
|
### Screen and Window Management
|
|
97
|
-
- `take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60,
|
|
102
|
+
- `take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)`: Capture screen or window
|
|
103
|
+
- `take_screenshot_with_ocr(title_pattern: str = None, use_regex: bool = False, threshold: int = 10, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)`: Extract adn return text with coordinates using OCR from screen or window
|
|
98
104
|
- `get_screen_size()`: Get current screen resolution
|
|
99
105
|
- `list_windows()`: List all open windows
|
|
100
106
|
- `activate_window(title_pattern: str, use_regex: bool = False, threshold: int = 60)`: Bring specified window to foreground
|
|
@@ -113,6 +119,21 @@ pip install -e .
|
|
|
113
119
|
|
|
114
120
|
# Start server
|
|
115
121
|
python -m computer_control_mcp.core
|
|
122
|
+
|
|
123
|
+
# -- OR --
|
|
124
|
+
|
|
125
|
+
# Build
|
|
126
|
+
hatch build
|
|
127
|
+
|
|
128
|
+
# Non-windows
|
|
129
|
+
pip install dist/*.whl --upgrade
|
|
130
|
+
|
|
131
|
+
# Windows
|
|
132
|
+
$latest = Get-ChildItem .\dist\*.whl | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
|
133
|
+
pip install $latest.FullName --upgrade
|
|
134
|
+
|
|
135
|
+
# Run
|
|
136
|
+
computer-control-mcp
|
|
116
137
|
```
|
|
117
138
|
|
|
118
139
|
### Running Tests
|
|
@@ -57,13 +57,19 @@ computer-control-mcp # instead of uvx computer-control-mcp, so you can use the l
|
|
|
57
57
|
- `click_screen(x: int, y: int)`: Click at specified screen coordinates
|
|
58
58
|
- `move_mouse(x: int, y: int)`: Move mouse cursor to specified coordinates
|
|
59
59
|
- `drag_mouse(from_x: int, from_y: int, to_x: int, to_y: int, duration: float = 0.5)`: Drag mouse from one position to another
|
|
60
|
+
- `mouse_down(button: str = "left")`: Hold down a mouse button ('left', 'right', 'middle')
|
|
61
|
+
- `mouse_up(button: str = "left")`: Release a mouse button ('left', 'right', 'middle')
|
|
60
62
|
|
|
61
63
|
### Keyboard Control
|
|
62
64
|
- `type_text(text: str)`: Type the specified text at current cursor position
|
|
63
65
|
- `press_key(key: str)`: Press a specified keyboard key
|
|
66
|
+
- `key_down(key: str)`: Hold down a specific keyboard key until released
|
|
67
|
+
- `key_up(key: str)`: Release a specific keyboard key
|
|
68
|
+
- `press_keys(keys: Union[str, List[Union[str, List[str]]]])`: Press keyboard keys (supports single keys, sequences, and combinations)
|
|
64
69
|
|
|
65
70
|
### Screen and Window Management
|
|
66
|
-
- `take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60,
|
|
71
|
+
- `take_screenshot(title_pattern: str = None, use_regex: bool = False, threshold: int = 60, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)`: Capture screen or window
|
|
72
|
+
- `take_screenshot_with_ocr(title_pattern: str = None, use_regex: bool = False, threshold: int = 10, scale_percent_for_ocr: int = None, save_to_downloads: bool = False)`: Extract adn return text with coordinates using OCR from screen or window
|
|
67
73
|
- `get_screen_size()`: Get current screen resolution
|
|
68
74
|
- `list_windows()`: List all open windows
|
|
69
75
|
- `activate_window(title_pattern: str, use_regex: bool = False, threshold: int = 60)`: Bring specified window to foreground
|
|
@@ -82,6 +88,21 @@ pip install -e .
|
|
|
82
88
|
|
|
83
89
|
# Start server
|
|
84
90
|
python -m computer_control_mcp.core
|
|
91
|
+
|
|
92
|
+
# -- OR --
|
|
93
|
+
|
|
94
|
+
# Build
|
|
95
|
+
hatch build
|
|
96
|
+
|
|
97
|
+
# Non-windows
|
|
98
|
+
pip install dist/*.whl --upgrade
|
|
99
|
+
|
|
100
|
+
# Windows
|
|
101
|
+
$latest = Get-ChildItem .\dist\*.whl | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
|
102
|
+
pip install $latest.FullName --upgrade
|
|
103
|
+
|
|
104
|
+
# Run
|
|
105
|
+
computer-control-mcp
|
|
85
106
|
```
|
|
86
107
|
|
|
87
108
|
### Running Tests
|
|
@@ -242,8 +242,7 @@ def take_screenshot(
|
|
|
242
242
|
save_to_downloads: bool = False,
|
|
243
243
|
) -> Image:
|
|
244
244
|
"""
|
|
245
|
-
Get screenshot Image as MCP Image object.
|
|
246
|
-
If no title pattern is provided, get screenshot of entire screen and all text on the screen.
|
|
245
|
+
Get screenshot Image as MCP Image object. If no title pattern is provided, get screenshot of entire screen and all text on the screen.
|
|
247
246
|
|
|
248
247
|
Args:
|
|
249
248
|
title_pattern: Pattern to match window title, if None, take screenshot of entire screen
|
|
@@ -384,9 +383,7 @@ def take_screenshot_with_ocr(
|
|
|
384
383
|
save_to_downloads: bool = False,
|
|
385
384
|
) -> str:
|
|
386
385
|
"""
|
|
387
|
-
Get OCR text from screenshot with absolute coordinates as JSON string of List[Tuple[List[List[int]], str, float]] (returned after adding the window offset from true (0, 0) of screen to the OCR coordinates, so clicking is on-point. Recommended to click in the middle of OCR Box) and using confidence from window with the specified title pattern.
|
|
388
|
-
If no title pattern is provided, get screenshot of entire screen and all text on the screen.
|
|
389
|
-
Know that OCR takes around 20 seconds on an mid spec pc at 1080p resolution.
|
|
386
|
+
Get OCR text from screenshot with absolute coordinates as JSON string of List[Tuple[List[List[int]], str, float]] (returned after adding the window offset from true (0, 0) of screen to the OCR coordinates, so clicking is on-point. Recommended to click in the middle of OCR Box) and using confidence from window with the specified title pattern. If no title pattern is provided, get screenshot of entire screen and all text on the screen. Know that OCR takes around 20 seconds on an mid-spec pc at 1080p resolution.
|
|
390
387
|
|
|
391
388
|
Args:
|
|
392
389
|
title_pattern: Pattern to match window title, if None, take screenshot of entire screen
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "computer-control-mcp"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.4"
|
|
8
8
|
description = "MCP server that provides computer control capabilities, like mouse, keyboard, OCR, etc. using PyAutoGUI, RapidOCR, ONNXRuntime. Similar to 'computer-use' by Anthropic. With Zero External Dependencies."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{computer_control_mcp-0.3.3 → computer_control_mcp-0.3.4}/computer_control_mcp/test_image.png
RENAMED
|
File without changes
|