parallels-pro-mcp-server 0.2.0__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.
Files changed (37) hide show
  1. parallels_pro_mcp_server-0.2.0/.github/workflows/ci.yml +61 -0
  2. parallels_pro_mcp_server-0.2.0/.github/workflows/release.yml +59 -0
  3. parallels_pro_mcp_server-0.2.0/.gitignore +165 -0
  4. parallels_pro_mcp_server-0.2.0/LICENSE +21 -0
  5. parallels_pro_mcp_server-0.2.0/PKG-INFO +360 -0
  6. parallels_pro_mcp_server-0.2.0/README.md +335 -0
  7. parallels_pro_mcp_server-0.2.0/docs/README.md +197 -0
  8. parallels_pro_mcp_server-0.2.0/docs/RELEASING.md +132 -0
  9. parallels_pro_mcp_server-0.2.0/docs/prlctl-research.md +228 -0
  10. parallels_pro_mcp_server-0.2.0/main.py +5 -0
  11. parallels_pro_mcp_server-0.2.0/parallels_mcp/__init__.py +5 -0
  12. parallels_pro_mcp_server-0.2.0/parallels_mcp/config.py +25 -0
  13. parallels_pro_mcp_server-0.2.0/parallels_mcp/doctor.py +90 -0
  14. parallels_pro_mcp_server-0.2.0/parallels_mcp/guest.py +115 -0
  15. parallels_pro_mcp_server-0.2.0/parallels_mcp/input.py +233 -0
  16. parallels_pro_mcp_server-0.2.0/parallels_mcp/lifecycle.py +116 -0
  17. parallels_pro_mcp_server-0.2.0/parallels_mcp/manage.py +206 -0
  18. parallels_pro_mcp_server-0.2.0/parallels_mcp/prl.py +198 -0
  19. parallels_pro_mcp_server-0.2.0/parallels_mcp/screen.py +46 -0
  20. parallels_pro_mcp_server-0.2.0/parallels_mcp/server.py +386 -0
  21. parallels_pro_mcp_server-0.2.0/parallels_mcp/sharing.py +100 -0
  22. parallels_pro_mcp_server-0.2.0/parallels_mcp/snapshots.py +136 -0
  23. parallels_pro_mcp_server-0.2.0/parallels_mcp/transfer.py +202 -0
  24. parallels_pro_mcp_server-0.2.0/parallels_mcp/vm.py +148 -0
  25. parallels_pro_mcp_server-0.2.0/pyproject.toml +55 -0
  26. parallels_pro_mcp_server-0.2.0/scripts/doctor.sh +70 -0
  27. parallels_pro_mcp_server-0.2.0/tests/test_guest.py +74 -0
  28. parallels_pro_mcp_server-0.2.0/tests/test_input.py +67 -0
  29. parallels_pro_mcp_server-0.2.0/tests/test_manage.py +177 -0
  30. parallels_pro_mcp_server-0.2.0/tests/test_prl.py +53 -0
  31. parallels_pro_mcp_server-0.2.0/tests/test_screen.py +46 -0
  32. parallels_pro_mcp_server-0.2.0/tests/test_server.py +51 -0
  33. parallels_pro_mcp_server-0.2.0/tests/test_sharing.py +63 -0
  34. parallels_pro_mcp_server-0.2.0/tests/test_snapshots.py +65 -0
  35. parallels_pro_mcp_server-0.2.0/tests/test_transfer.py +163 -0
  36. parallels_pro_mcp_server-0.2.0/tests/test_vm.py +84 -0
  37. parallels_pro_mcp_server-0.2.0/uv.lock +1055 -0
@@ -0,0 +1,61 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [macos-latest, ubuntu-latest]
17
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
18
+
19
+ steps:
20
+ - name: Check out repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ enable-cache: true
27
+ version: "latest"
28
+
29
+ - name: Set up Python ${{ matrix.python-version }}
30
+ run: uv python install ${{ matrix.python-version }}
31
+
32
+ - name: Install dependencies
33
+ run: uv sync --python ${{ matrix.python-version }}
34
+
35
+ - name: Run unit test suite with coverage
36
+ run: |
37
+ uv run --python ${{ matrix.python-version }} coverage run --source=parallels_mcp -m unittest discover -s tests
38
+ uv run --python ${{ matrix.python-version }} coverage report -m
39
+
40
+ - name: Report coverage summary
41
+ run: |
42
+ echo "### 📊 Test Coverage Report (Python ${{ matrix.python-version }} on ${{ matrix.os }})" >> $GITHUB_STEP_SUMMARY
43
+ echo "" >> $GITHUB_STEP_SUMMARY
44
+ uv run --python ${{ matrix.python-version }} coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
45
+ uv run --python ${{ matrix.python-version }} coverage xml -o coverage.xml
46
+
47
+ - name: Upload coverage artifact
48
+ uses: actions/upload-artifact@v4
49
+ with:
50
+ name: coverage-${{ matrix.os }}-py${{ matrix.python-version }}
51
+ path: coverage.xml
52
+ retention-days: 14
53
+
54
+ - name: Verify compilation
55
+ run: uv run --python ${{ matrix.python-version }} python -m compileall -q parallels_mcp main.py
56
+
57
+ - name: Validate lockfile consistency
58
+ run: uv lock --check
59
+
60
+ - name: Validate doctor script syntax
61
+ run: bash -n scripts/doctor.sh
@@ -0,0 +1,59 @@
1
+ name: Release & Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ python_version:
10
+ description: "Python version used to build release distributions"
11
+ required: false
12
+ default: "3.12"
13
+
14
+ env:
15
+ PYTHON_VERSION: ${{ inputs.python_version || '3.12' }}
16
+
17
+ permissions:
18
+ contents: write
19
+ id-token: write
20
+
21
+ jobs:
22
+ release:
23
+ name: Build, Release & Publish
24
+ runs-on: ubuntu-latest
25
+ environment:
26
+ name: pypi
27
+ url: https://pypi.org/p/parallels-pro-mcp-server
28
+
29
+ steps:
30
+ - name: Check out repository
31
+ uses: actions/checkout@v4
32
+ with:
33
+ fetch-depth: 0
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v5
37
+ with:
38
+ enable-cache: true
39
+ version: "latest"
40
+
41
+ - name: Set up Python ${{ env.PYTHON_VERSION }}
42
+ run: uv python install ${{ env.PYTHON_VERSION }}
43
+
44
+ - name: Build distribution packages
45
+ run: uv build --python ${{ env.PYTHON_VERSION }}
46
+
47
+ - name: Create GitHub Release
48
+ uses: softprops/action-gh-release@v2
49
+ with:
50
+ files: dist/*
51
+ generate_release_notes: true
52
+ env:
53
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54
+
55
+ - name: Publish to PyPI
56
+ uses: pypa/gh-action-pypi-publish@release/v1
57
+ with:
58
+ packages-dir: dist/
59
+ skip-existing: true
@@ -0,0 +1,165 @@
1
+ ### Python template
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # poetry
99
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103
+ #poetry.lock
104
+
105
+ # pdm
106
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107
+ #pdm.lock
108
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109
+ # in version control.
110
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
111
+ .pdm.toml
112
+ .pdm-python
113
+ .pdm-build/
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ .idea/
164
+
165
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jarod Wong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,360 @@
1
+ Metadata-Version: 2.5
2
+ Name: parallels-pro-mcp-server
3
+ Version: 0.2.0
4
+ Summary: A Model Context Protocol (MCP) server for Parallels Desktop VM automation, lifecycle, execution, snapshots, and screenshots on macOS.
5
+ Author: Jarod Wong
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: ai,automation,llm,macos,mcp,parallels,virtualization
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Topic :: Software Development :: Build Tools
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: mcp<3,>=2.0
23
+ Requires-Dist: pydantic<3,>=2.0
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Parallels Pro MCP Server
27
+
28
+ [![CI](https://github.com/PopBot/parallels-pro-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/PopBot/parallels-pro-mcp-server/actions/workflows/ci.yml)
29
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
30
+ [![Python >=3.10](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
31
+
32
+ A Model Context Protocol (MCP) server for Parallels Desktop on macOS. It enables LLM agents—such as Claude Desktop, ChatGPT Codex, Cursor, and Antigravity—to discover, control, automate, and inspect Parallels virtual machines over standard MCP stdio.
33
+
34
+ ## Highlights
35
+
36
+ - **Full Lifecycle Management**: Start, gracefully stop (ACPI), and suspend virtual machines.
37
+ - **Cross-Platform Guest Execution**: Execute commands inside Windows, Linux, or macOS guests with explicit argument vectors (`argv`), avoiding host shell injection risks.
38
+ - **Readiness Probing**: Automatically detects guest OS and polls until Parallels Tools and the guest execution layer respond.
39
+ - **Bi-Directional File Transfer**: Stream files and directories directly between host and guest over stdin/stdout tar archives without requiring network mounts or SMB credentials (`vm_copy_to_guest`, `vm_copy_from_guest`).
40
+ - **Dynamic Host Folder Sharing**: Mount and unmount host directories into guest VMs at runtime with read-only or read-write permissions (`vm_share_folder`, `vm_unshare_folder`).
41
+ - **Instant Sandboxing & Ephemeral Clones**: Spin up fast linked clones in seconds for disposable agent test environments, and permanently delete sandboxes with confirmation (`vm_clone`, `vm_delete`).
42
+ - **Headless Execution & Network Simulation**: Run VMs headlessly in the background, or simulate network degradation (edge, 3g, wifi, 100% packet loss, offline) for resilience testing (`vm_set_headless`, `vm_set_network_condition`).
43
+ - **Visual VM Inspection**: Capture real-time screenshots of the VM display buffer for multimodal AI analysis (`vm_screenshot`).
44
+ - **Synthetic Input & Hotkeys**: Send keyboard events and hotkey combinations (`Ctrl+Alt+Del`, `Win+R`, `Enter`, `Esc`) to interact with GUI dialogs and prompts (`vm_send_keys`).
45
+ - **Snapshot Lifecycle**: List, create, safely revert, and delete snapshots with mandatory confirmation flags (`confirm: true`).
46
+ - **Pre-flight Diagnostic Doctor**: Built-in environment and license validator (`parallels-pro-mcp doctor` and `scripts/doctor.sh`).
47
+
48
+ ---
49
+
50
+ ## Tool Reference
51
+
52
+ | Tool | Purpose | Confirmation Required | Annotations |
53
+ |---|---|---|---|
54
+ | `vm_list` | Discover registered VMs and power states | No | Read-Only |
55
+ | `vm_status` | Inspect detailed VM status, OS, tools version, and uptime | No | Read-Only |
56
+ | `vm_start` | Start a VM by name or UUID | No | Power Change |
57
+ | `vm_stop` | Request graceful ACPI shutdown (never force-kills) | No | Destructive |
58
+ | `vm_suspend` | Suspend VM and preserve guest memory | No | Destructive |
59
+ | `vm_wait_ready` | Poll until the guest OS answers execution probes | No | Readiness |
60
+ | `vm_exec` | Run an argv vector in the guest (supports custom `user`) | No (Privileged) | Guest Command |
61
+ | `vm_copy_to_guest` | Stream files or directories from host into guest filesystem | No | File Transfer |
62
+ | `vm_copy_from_guest` | Stream files or directories from guest onto host filesystem | No | File Transfer |
63
+ | `vm_share_folder` | Mount a host directory into the guest (`rw` or `ro`) | No | State Mutating |
64
+ | `vm_unshare_folder` | Remove a previously shared host directory | No | State Mutating |
65
+ | `vm_clone` | Clone a VM (fast linked clone or deep copy) | No | State Mutating |
66
+ | `vm_delete` | Permanently delete a VM and its disks | `confirm: true` | Destructive |
67
+ | `vm_set_headless` | Configure headless vs GUI window startup mode | No | State Mutating |
68
+ | `vm_set_network_condition` | Simulate degraded network profiles (3g, wifi, loss, off) | No | State Mutating |
69
+ | `vm_screenshot` | Capture current VM screen to host PNG | No | Read-Only |
70
+ | `vm_send_keys` | Send synthetic keystrokes or chords (e.g. `ctrl+alt+del`, `win+r`) | No | Guest Command |
71
+ | `snapshot_list` | List all snapshots for a VM | No | Read-Only |
72
+ | `snapshot_create` | Create a snapshot with name and optional description | `confirm: true` | State Mutating |
73
+ | `snapshot_revert` | Revert VM state to a specified snapshot | `confirm: true` | State Mutating |
74
+ | `snapshot_delete` | Permanently delete a snapshot to reclaim host disk space | `confirm: true` | State Mutating |
75
+
76
+ ---
77
+
78
+ ## Tool Usage & Cookbook
79
+
80
+ ### 1. Instant Ephemeral Sandboxing
81
+ Create an isolated linked clone in seconds, run tests headlessly, and destroy it when finished:
82
+
83
+ ```python
84
+ # Spin up an instant linked clone sharing the base disk
85
+ vm_clone(vm="Windows 11", name="Win11-Worker-1", linked=True)
86
+
87
+ # Run headlessly without displaying a GUI window on the desktop
88
+ vm_set_headless(vm="Win11-Worker-1", enabled=True)
89
+
90
+ # Boot and wait until guest tools are ready
91
+ vm_start(vm="Win11-Worker-1")
92
+ vm_wait_ready(vm="Win11-Worker-1", timeout_s=120)
93
+
94
+ # ... perform testing or build tasks ...
95
+
96
+ # Graceful stop and permanent teardown
97
+ vm_stop(vm="Win11-Worker-1")
98
+ vm_delete(vm="Win11-Worker-1", confirm=True)
99
+ ```
100
+
101
+ ### 2. Bi-Directional File Transfer
102
+ Stream files or entire directory trees between host and guest over stdin/stdout tar archives without needing network mounts or SMB credentials:
103
+
104
+ ```python
105
+ # Push local build artifact into the guest Windows Temp folder
106
+ vm_copy_to_guest(
107
+ vm="Windows 11",
108
+ host_path="./dist/myapp.exe",
109
+ guest_path=r"C:\Temp\myapp.exe"
110
+ )
111
+
112
+ # Pull test logs or crash dumps back onto the host
113
+ vm_copy_from_guest(
114
+ vm="Windows 11",
115
+ guest_path=r"C:\Temp\test-results",
116
+ host_path="./reports/test-results"
117
+ )
118
+ ```
119
+
120
+ ### 3. Dynamic Host Folder Sharing
121
+ Mount local host directories directly into the VM at runtime:
122
+
123
+ ```python
124
+ # Share a host repository with read-only protection
125
+ vm_share_folder(
126
+ vm="Windows 11",
127
+ name="source_code",
128
+ host_path="~/projects/myapp",
129
+ mode="ro"
130
+ )
131
+
132
+ # Unmount the share when done
133
+ vm_unshare_folder(vm="Windows 11", name="source_code")
134
+ ```
135
+
136
+ ### 4. GUI Interaction & Screen Analysis
137
+ Interact with native GUI dialogs, installers, or Windows UAC prompts:
138
+
139
+ ```python
140
+ # Capture what is currently on the VM screen
141
+ vm_screenshot(vm="Windows 11")
142
+
143
+ # Press Win+R to open the Run dialog
144
+ vm_send_keys(vm="Windows 11", combination="win+r")
145
+
146
+ # Type a command and press Enter
147
+ vm_send_keys(vm="Windows 11", text="notepad.exe", keys=["enter"])
148
+
149
+ # Dismiss a modal with Escape
150
+ vm_send_keys(vm="Windows 11", keys=["esc"])
151
+ ```
152
+
153
+ ### 5. Network Simulation & Resilience Testing
154
+ Simulate poor connections or complete offline states:
155
+
156
+ ```python
157
+ # Throttle bandwidth and latency to emulate a 3G mobile link
158
+ vm_set_network_condition(vm="Windows 11", profile="3g")
159
+
160
+ # Simulate a network blackout (100% packet loss)
161
+ vm_set_network_condition(vm="Windows 11", profile="100-percent-loss")
162
+
163
+ # Restore normal network conditions
164
+ vm_set_network_condition(vm="Windows 11", profile="off")
165
+ ```
166
+
167
+ ### 6. Snapshot Baselines
168
+ Create rollback points before mutating system state:
169
+
170
+ ```python
171
+ # List snapshots
172
+ snapshot_list(vm="Windows 11")
173
+
174
+ # Create a checkpoint
175
+ snapshot_create(
176
+ vm="Windows 11",
177
+ name="clean-state",
178
+ description="Clean baseline before test execution",
179
+ confirm=True
180
+ )
181
+
182
+ # Revert back to the checkpoint
183
+ snapshot_revert(vm="Windows 11", snapshot="clean-state", confirm=True)
184
+
185
+ # Delete snapshot to reclaim host disk space
186
+ snapshot_delete(vm="Windows 11", snapshot="clean-state", confirm=True)
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Prerequisites
192
+
193
+ 1. **macOS** with [Parallels Desktop](https://www.parallels.com/) Pro or Business Edition installed.
194
+ - *Note*: Parallels Desktop Pro or Business is required for the `prlctl` command-line utility and `prlctl exec` guest execution.
195
+ 2. **Parallels Tools** installed inside each target guest VM.
196
+ 3. **Python 3.10+** and [`uv`](https://docs.astral.sh/uv/) (recommended).
197
+
198
+ ### Verify Your Environment
199
+
200
+ Before connecting an MCP client, run the pre-flight diagnostic:
201
+
202
+ ```bash
203
+ # Using uv:
204
+ uv run parallels-pro-mcp doctor
205
+
206
+ # Or using the standalone script:
207
+ ./scripts/doctor.sh
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Client Configuration
213
+
214
+ ### Claude Desktop
215
+
216
+ Add the following to `~/Library/Application Support/Claude/claude_desktop_config.json`:
217
+
218
+ ```json
219
+ {
220
+ "mcpServers": {
221
+ "parallels-pro": {
222
+ "command": "uvx",
223
+ "args": ["parallels-pro-mcp-server"],
224
+ "env": {
225
+ "PARALLELS_DEFAULT_VM": "Windows 11",
226
+ "PARALLELS_ARTIFACT_DIR": "~/.cache/parallels-mcp"
227
+ }
228
+ }
229
+ }
230
+ }
231
+ ```
232
+
233
+ Or when running from a local checkout:
234
+
235
+ ```json
236
+ {
237
+ "mcpServers": {
238
+ "parallels-pro": {
239
+ "command": "uv",
240
+ "args": [
241
+ "run",
242
+ "--directory",
243
+ "/path/to/parallels-pro-mcp-server",
244
+ "parallels-pro-mcp"
245
+ ]
246
+ }
247
+ }
248
+ }
249
+ ```
250
+
251
+ ### Codex / ChatGPT Desktop
252
+
253
+ In `~/.codex/config.toml`:
254
+
255
+ ```toml
256
+ [mcp_servers.parallels-pro]
257
+ command = "uv"
258
+ args = ["run", "--project", "/path/to/parallels-pro-mcp-server", "parallels-pro-mcp"]
259
+ startup_timeout_sec = 30
260
+ tool_timeout_sec = 600
261
+
262
+ [mcp_servers.parallels-pro.env]
263
+ PARALLELS_DEFAULT_VM = "Windows 11"
264
+ PARALLELS_ARTIFACT_DIR = "~/.cache/parallels-mcp"
265
+ ```
266
+
267
+ ### Google Antigravity (Gemini CLI)
268
+
269
+ Add the server to `~/.gemini/config/mcp_config.json`:
270
+
271
+ ```json
272
+ {
273
+ "mcpServers": {
274
+ "parallels-pro": {
275
+ "command": "uv",
276
+ "args": [
277
+ "run",
278
+ "--directory",
279
+ "/path/to/parallels-pro-mcp-server",
280
+ "parallels-pro-mcp"
281
+ ],
282
+ "env": {
283
+ "PARALLELS_DEFAULT_VM": "Windows 11",
284
+ "PARALLELS_ARTIFACT_DIR": "~/.cache/parallels-mcp"
285
+ }
286
+ }
287
+ }
288
+ }
289
+ ```
290
+
291
+ Or using `uvx`:
292
+
293
+ ```json
294
+ {
295
+ "mcpServers": {
296
+ "parallels-pro": {
297
+ "command": "uvx",
298
+ "args": ["parallels-pro-mcp-server"]
299
+ }
300
+ }
301
+ }
302
+ ```
303
+
304
+ ---
305
+
306
+ ## Environment Variables
307
+
308
+ | Variable | Description | Default |
309
+ |---|---|---|
310
+ | `PARALLELS_DEFAULT_VM` | Fallback VM name or UUID used when a tool argument is omitted | None |
311
+ | `PARALLELS_ARTIFACT_DIR` | Host directory where captured screenshots and artifacts are stored | `~/.cache/parallels-pro-mcp-server` |
312
+
313
+ ---
314
+
315
+ ## Safe Operating Sequence for Agents
316
+
317
+ 1. **Discover**: Call `vm_list` to see available VMs and states.
318
+ 2. **Inspect**: Call `vm_status(vm="...")` to verify guest tools and power status.
319
+ 3. **Optional Sandbox**: For risky or destructive test sessions, call `vm_clone(vm="...", name="agent-sandbox", linked=true)` to create a fast, isolated linked clone.
320
+ 4. **Power Up**: If stopped, call `vm_start` followed by `vm_wait_ready` to ensure guest tools are responsive.
321
+ 5. **Inspect Desktop**: Call `vm_screenshot` to visually check if dialogs or login prompts are blocking the session.
322
+ 6. **Snapshot Baseline**: Call `snapshot_create(vm="...", name="clean-baseline", confirm=true)` before performing major tasks.
323
+ 7. **Transfer & Execute**: Use `vm_copy_to_guest` to stage scripts, `vm_exec` with explicit argv arrays to run commands, and `vm_copy_from_guest` to retrieve build artifacts.
324
+ 8. **Teardown**: Revert via `snapshot_revert` or destroy ephemeral sandboxes via `vm_delete(vm="agent-sandbox", confirm=true)`.
325
+
326
+ ---
327
+
328
+ ## Security Model
329
+
330
+ - **Automation Bridge**: This server delegates guest execution directly to `prlctl exec`.
331
+ - **Privilege & Shared Folders**: If your VM has Parallels Shared Folders enabled (e.g. `\\Mac\Home` on Windows or `/media/psf/` on Linux), guest commands can read and write to your host filesystem. Always run only on trusted virtual machines.
332
+ - **Explicit Argv Only**: `vm_exec` only accepts argument vectors (`list[str]`), preventing shell injection on the host.
333
+
334
+ ---
335
+
336
+ ## Development & Testing
337
+
338
+ ```bash
339
+ # Clone the repository
340
+ git clone https://github.com/PopBot/parallels-pro-mcp-server.git
341
+ cd parallels-pro-mcp-server
342
+
343
+ # Install dependencies and sync environment
344
+ uv sync
345
+
346
+ # Run diagnostic doctor
347
+ uv run parallels-pro-mcp doctor
348
+
349
+ # Run test suite with test coverage reporting
350
+ uv run coverage run --source=parallels_mcp -m unittest discover -s tests
351
+ uv run coverage report -m
352
+ ```
353
+
354
+ For instructions on semantic versioning, GitHub Releases, and PyPI distribution, see the [Releasing & Publishing Guide](docs/RELEASING.md).
355
+
356
+ ---
357
+
358
+ ## License
359
+
360
+ This project is licensed under the [MIT License](LICENSE).