windows-server-mcp 1.0.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 (75) hide show
  1. windows_server_mcp-1.0.0/.gitattributes +10 -0
  2. windows_server_mcp-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
  3. windows_server_mcp-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
  4. windows_server_mcp-1.0.0/.github/workflows/ci.yml +81 -0
  5. windows_server_mcp-1.0.0/.github/workflows/pages.yml +41 -0
  6. windows_server_mcp-1.0.0/.github/workflows/publish.yml +46 -0
  7. windows_server_mcp-1.0.0/.gitignore +31 -0
  8. windows_server_mcp-1.0.0/CHANGELOG.md +79 -0
  9. windows_server_mcp-1.0.0/CODE_OF_CONDUCT.md +7 -0
  10. windows_server_mcp-1.0.0/CONTRIBUTING.md +46 -0
  11. windows_server_mcp-1.0.0/ExempleDocsForMCP.md +449 -0
  12. windows_server_mcp-1.0.0/ExempleDocsForMCP.pdf +0 -0
  13. windows_server_mcp-1.0.0/LICENSE +21 -0
  14. windows_server_mcp-1.0.0/PKG-INFO +136 -0
  15. windows_server_mcp-1.0.0/README.es.md +108 -0
  16. windows_server_mcp-1.0.0/README.md +109 -0
  17. windows_server_mcp-1.0.0/SECURITY.md +19 -0
  18. windows_server_mcp-1.0.0/SUPPORT.md +12 -0
  19. windows_server_mcp-1.0.0/docs/DEVELOPMENT.md +75 -0
  20. windows_server_mcp-1.0.0/docs/PUBLISHING.md +130 -0
  21. windows_server_mcp-1.0.0/docs/REFERENCE_REVIEW.md +42 -0
  22. windows_server_mcp-1.0.0/docs/SECURITY_MODEL.md +59 -0
  23. windows_server_mcp-1.0.0/docs/TOOLS.md +154 -0
  24. windows_server_mcp-1.0.0/pyproject.toml +43 -0
  25. windows_server_mcp-1.0.0/requirements-dev.txt +1 -0
  26. windows_server_mcp-1.0.0/server.json +23 -0
  27. windows_server_mcp-1.0.0/tests/conftest.py +15 -0
  28. windows_server_mcp-1.0.0/tests/test_resilience.py +66 -0
  29. windows_server_mcp-1.0.0/tests/test_server.py +34 -0
  30. windows_server_mcp-1.0.0/tests/test_shell.py +91 -0
  31. windows_server_mcp-1.0.0/tests/test_text_encoding.py +61 -0
  32. windows_server_mcp-1.0.0/vscode-extension/package-lock.json +3293 -0
  33. windows_server_mcp-1.0.0/vscode-extension/package.json +42 -0
  34. windows_server_mcp-1.0.0/vscode-extension/src/extension.ts +82 -0
  35. windows_server_mcp-1.0.0/vscode-extension/tsconfig.json +15 -0
  36. windows_server_mcp-1.0.0/website/.nojekyll +1 -0
  37. windows_server_mcp-1.0.0/website/assets/app.js +30 -0
  38. windows_server_mcp-1.0.0/website/assets/styles.css +489 -0
  39. windows_server_mcp-1.0.0/website/index.html +200 -0
  40. windows_server_mcp-1.0.0/website/privacy/index.html +81 -0
  41. windows_server_mcp-1.0.0/website/terms/index.html +79 -0
  42. windows_server_mcp-1.0.0/windows_server_mcp/__init__.py +1 -0
  43. windows_server_mcp-1.0.0/windows_server_mcp/registry.py +118 -0
  44. windows_server_mcp-1.0.0/windows_server_mcp/server.py +116 -0
  45. windows_server_mcp-1.0.0/windows_server_mcp/shell.py +200 -0
  46. windows_server_mcp-1.0.0/windows_server_mcp/tools/__init__.py +1 -0
  47. windows_server_mcp-1.0.0/windows_server_mcp/tools/advanced_process.py +184 -0
  48. windows_server_mcp-1.0.0/windows_server_mcp/tools/developer_environment.py +143 -0
  49. windows_server_mcp-1.0.0/windows_server_mcp/tools/disk_health.py +68 -0
  50. windows_server_mcp-1.0.0/windows_server_mcp/tools/driver_maintenance.py +67 -0
  51. windows_server_mcp-1.0.0/windows_server_mcp/tools/event_diagnostics.py +68 -0
  52. windows_server_mcp-1.0.0/windows_server_mcp/tools/execute_powershell.py +135 -0
  53. windows_server_mcp-1.0.0/windows_server_mcp/tools/hardware_drivers.py +217 -0
  54. windows_server_mcp-1.0.0/windows_server_mcp/tools/manage_network.py +56 -0
  55. windows_server_mcp-1.0.0/windows_server_mcp/tools/manage_registry.py +74 -0
  56. windows_server_mcp-1.0.0/windows_server_mcp/tools/media_management.py +131 -0
  57. windows_server_mcp-1.0.0/windows_server_mcp/tools/network_diagnostics.py +198 -0
  58. windows_server_mcp-1.0.0/windows_server_mcp/tools/optimization.py +79 -0
  59. windows_server_mcp-1.0.0/windows_server_mcp/tools/peripherals.py +84 -0
  60. windows_server_mcp-1.0.0/windows_server_mcp/tools/power_hardware.py +84 -0
  61. windows_server_mcp-1.0.0/windows_server_mcp/tools/process_management.py +66 -0
  62. windows_server_mcp-1.0.0/windows_server_mcp/tools/restore_update_controls.py +150 -0
  63. windows_server_mcp-1.0.0/windows_server_mcp/tools/safe_file_operations.py +520 -0
  64. windows_server_mcp-1.0.0/windows_server_mcp/tools/security_updates.py +99 -0
  65. windows_server_mcp-1.0.0/windows_server_mcp/tools/services.py +47 -0
  66. windows_server_mcp-1.0.0/windows_server_mcp/tools/shell_helpers.py +91 -0
  67. windows_server_mcp-1.0.0/windows_server_mcp/tools/software_audit.py +65 -0
  68. windows_server_mcp-1.0.0/windows_server_mcp/tools/software_maintenance.py +119 -0
  69. windows_server_mcp-1.0.0/windows_server_mcp/tools/startup_tasks.py +143 -0
  70. windows_server_mcp-1.0.0/windows_server_mcp/tools/storage_analysis.py +122 -0
  71. windows_server_mcp-1.0.0/windows_server_mcp/tools/system_info.py +69 -0
  72. windows_server_mcp-1.0.0/windows_server_mcp/tools/task_manager.py +98 -0
  73. windows_server_mcp-1.0.0/windows_server_mcp/tools/text_files.py +113 -0
  74. windows_server_mcp-1.0.0/windows_server_mcp/tools/virtualization.py +71 -0
  75. windows_server_mcp-1.0.0/windows_server_mcp/tools/window_management.py +109 -0
@@ -0,0 +1,10 @@
1
+ * text=auto
2
+
3
+ *.py text eol=lf
4
+ *.md text eol=lf
5
+ *.json text eol=lf
6
+ *.toml text eol=lf
7
+ *.yml text eol=lf
8
+ *.yaml text eol=lf
9
+ *.ts text eol=lf
10
+ *.js text eol=lf
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a problem with a Windows MCP tool
4
+ title: "[Bug]: "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ ## Tool
12
+
13
+ ## Environment
14
+
15
+ - Windows version:
16
+ - Python version:
17
+ - MCP client:
18
+ - Administrator terminal: yes/no
19
+
20
+ ## Steps to Reproduce
21
+
22
+ ## Expected Behavior
23
+
24
+ ## Actual Behavior
25
+
26
+ ## Logs or Output
27
+
28
+ Remove secrets, tokens, and private paths before posting.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new Windows management tool or improvement
4
+ title: "[Feature]: "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem
10
+
11
+ ## Proposed Tool or Behavior
12
+
13
+ ## Safety Considerations
14
+
15
+ Should this be read-only, dry-run by default, reversible, or destructive?
@@ -0,0 +1,81 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ python:
14
+ name: Python ${{ matrix.python-version }} / ${{ matrix.mcp }}
15
+ runs-on: windows-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.10", "3.13"]
20
+ # Test both generations of the official MCP SDK:
21
+ # 1.x exposes FastMCP, 2.x renamed it to MCPServer.
22
+ mcp: ["mcp>=1.12,<2", "mcp>=2,<3"]
23
+ defaults:
24
+ run:
25
+ shell: pwsh
26
+ steps:
27
+ - name: Checkout
28
+ uses: actions/checkout@v4
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+
35
+ - name: Install package
36
+ run: |
37
+ python -m pip install --upgrade pip
38
+ pip install -e . pytest
39
+ pip install "${{ matrix.mcp }}"
40
+
41
+ - name: Compile Python
42
+ run: python -m compileall windows_server_mcp
43
+
44
+ - name: Run tests (imports, 100 registered tools)
45
+ run: python -m pytest -q tests
46
+
47
+ package:
48
+ name: Build package
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - uses: actions/setup-python@v5
53
+ with:
54
+ python-version: "3.12"
55
+ - run: |
56
+ python -m pip install --upgrade pip build twine
57
+ python -m build
58
+ python -m twine check dist/*
59
+
60
+ vscode-extension:
61
+ name: VS Code extension
62
+ runs-on: windows-latest
63
+ defaults:
64
+ run:
65
+ shell: pwsh
66
+ steps:
67
+ - name: Checkout
68
+ uses: actions/checkout@v4
69
+
70
+ - name: Set up Node
71
+ uses: actions/setup-node@v4
72
+ with:
73
+ node-version: "20"
74
+
75
+ - name: Install dependencies
76
+ working-directory: vscode-extension
77
+ run: npm ci
78
+
79
+ - name: Compile extension
80
+ working-directory: vscode-extension
81
+ run: npm run compile
@@ -0,0 +1,41 @@
1
+ name: Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "website/**"
9
+ - ".github/workflows/pages.yml"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ concurrency:
18
+ group: pages
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ deploy:
23
+ environment:
24
+ name: github-pages
25
+ url: ${{ steps.deployment.outputs.page_url }}
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v4
30
+
31
+ - name: Setup Pages
32
+ uses: actions/configure-pages@v5
33
+
34
+ - name: Upload artifact
35
+ uses: actions/upload-pages-artifact@v3
36
+ with:
37
+ path: website
38
+
39
+ - name: Deploy to GitHub Pages
40
+ id: deployment
41
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,46 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build:
10
+ name: Build distributions
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+
19
+ - name: Build sdist and wheel
20
+ run: |
21
+ python -m pip install --upgrade pip build twine
22
+ python -m build
23
+ python -m twine check dist/*
24
+
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: dist
28
+ path: dist/
29
+
30
+ publish:
31
+ name: Upload to PyPI
32
+ needs: build
33
+ runs-on: ubuntu-latest
34
+ environment:
35
+ name: pypi
36
+ url: https://pypi.org/project/windows-server-mcp/
37
+ permissions:
38
+ id-token: write # required for PyPI Trusted Publishing (no API token needed)
39
+ steps:
40
+ - uses: actions/download-artifact@v4
41
+ with:
42
+ name: dist
43
+ path: dist/
44
+
45
+ - name: Publish to PyPI
46
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,31 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ .Python
7
+ .venv/
8
+ venv/
9
+ build/
10
+ dist/
11
+ *.egg-info/
12
+
13
+ # Node / VS Code extension
14
+ vscode-extension/node_modules/
15
+ vscode-extension/out/
16
+ vscode-extension/*.vsix
17
+ .vscode-test/
18
+
19
+ # Local tooling
20
+ .env
21
+ .env.*
22
+ !.env.example
23
+ .pytest_cache/
24
+ .mypy_cache/
25
+ .ruff_cache/
26
+
27
+ # OS/editor
28
+ .DS_Store
29
+ Thumbs.db
30
+ .vscode/
31
+ !.vscode/extensions.json
@@ -0,0 +1,79 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 — first release as `windows-server-mcp`
4
+
5
+ ### Added
6
+
7
+ - **Encoding-safe file tools** (100 tools in total): `read_text_file`, `write_text_file`
8
+ and `normalize_text_file_encoding` always use UTF-8 **without BOM**, so source code and
9
+ emojis are never corrupted by PowerShell 5.1's UTF-16 / ANSI / BOM defaults.
10
+
11
+ ### Fixed
12
+
13
+ - **Garbled characters in tool output** (accents, emojis, Chinese-looking text): every
14
+ PowerShell call now forces UTF-8 on the console and `$OutputEncoding`, and the output is
15
+ decoded as UTF-8.
16
+ - `_harden_stdio` no longer re-points foreign `StreamHandler`s (e.g. pytest's capture
17
+ handlers), which broke test teardown.
18
+
19
+ ### Fixed
20
+
21
+ - **Tool calls could hang forever and freeze the server.** About half of the
22
+ PowerShell/subprocess calls had no timeout, and children inherited the MCP
23
+ stdio `stdin`. Every external command now goes through
24
+ `windows_server_mcp.shell.run`, which enforces a deadline (60 s by default),
25
+ closes `stdin`, hides console windows and kills the whole process tree on
26
+ timeout, returning a clear "timed out" message instead of hanging.
27
+ - `execute_powershell` gains `timeout_seconds` (default 60, max 3600). With
28
+ `require_admin=true` it no longer waits forever on an unseen UAC prompt, runs
29
+ the script from a temp file (fixes quoting breakage) and now returns the
30
+ command's output.
31
+ - Tools now run in a worker thread, so on `mcp` 1.x a slow call can no longer
32
+ block the event loop and make the whole server unresponsive.
33
+ - **Logging can no longer freeze the server.** Under `pythonw.exe` (launched by a
34
+ bridge), `stderr` is often an unread pipe; once it filled, the next log write
35
+ blocked forever. The server now writes its logs and `stderr` to
36
+ `%LOCALAPPDATA%\windows-server-mcp\server.log` / `stderr.log`. Each tool call
37
+ logs `tool start` / `tool finished`, so a `start` with no `finished` shows
38
+ which tool hung.
39
+ - Tool calls have a hard deadline (180 s; longer for installs and for
40
+ `execute_powershell` with a big `timeout_seconds`). If a thread blocks inside
41
+ Python itself the call is abandoned with an error and the server stays alive.
42
+ - `find_process_locking_file` scans in a separate, killable process, because
43
+ `psutil.open_files()` can block forever on some Windows handles.
44
+ - `get_gpu_usage` and similar tools report a timeout instead of a misleading
45
+ "no data" result.
46
+ - **Compatibility with `mcp` 2.x.** The MCP Python SDK v2 (released 2026-07-28)
47
+ renamed `FastMCP` to `MCPServer` and removed the `mcp.server.fastmcp` module
48
+ with no deprecation shim, so a fresh `pip install` crashed on start-up with
49
+ `ModuleNotFoundError`. `server.py` now imports `MCPServer` from
50
+ `mcp.server.mcpserver` and falls back to `FastMCP` on `mcp` 1.x.
51
+ - Removed the unused `fastmcp` dependency (the standalone package was never
52
+ imported; the server always used the SDK's built-in class).
53
+
54
+ ### Changed
55
+
56
+ - Dependency range is now `mcp>=1.12,<3` so the next major release cannot break
57
+ installs silently again.
58
+ - Server name shown to clients is now `Windows Management` and the package
59
+ version is reported in the MCP `serverInfo`.
60
+ - CI runs on Python 3.10 and 3.13 against both `mcp` 1.x and `mcp` 2.x.
61
+
62
+ ### Added
63
+
64
+ - `get_server_status` tool (97 tools in total): server and MCP SDK versions, loaded tool count and whether the server is elevated.
65
+ - `tests/` with import, tool-count and `list_tools()` checks (they can also be
66
+ run on Linux/macOS thanks to a `conftest.py` that stubs `winreg`/`windll`).
67
+ - English and Spanish READMEs (`README.md`, `README.es.md`).
68
+
69
+ ## 0.3.0
70
+
71
+ - Expanded the server to 96 Windows management tools.
72
+ - Added storage cleanup reports and safer Recycle Bin deletion workflows.
73
+ - Added GPU, driver, disk health, Windows Update, restore point, WSL, Hyper-V, printer, audio, Bluetooth, firewall, and uninstall maintenance tools.
74
+ - Added VS Code extension wrapper.
75
+ - Added MCP Registry metadata and publishing documentation.
76
+
77
+ ---
78
+
79
+ Original project by [Ahmed Laminou Amadou](https://github.com/AhmedLaminou).
@@ -0,0 +1,7 @@
1
+ # Code of Conduct
2
+
3
+ This project expects respectful, constructive collaboration.
4
+
5
+ Be kind, assume good intent, and focus critique on the work rather than the person. Harassment, threats, hate speech, and sustained disruptive behavior are not acceptable.
6
+
7
+ Maintainers may remove comments, issues, or contributions that violate this standard.
@@ -0,0 +1,46 @@
1
+ # Contributing
2
+
3
+ Thanks for helping improve Windows Management MCP Server.
4
+
5
+ ## Development Workflow
6
+
7
+ 1. Create a virtual environment.
8
+ 2. Install the package in editable mode.
9
+ 3. Make focused changes.
10
+ 4. Run the Python compile check.
11
+ 5. Compile the VS Code extension if extension files changed.
12
+ 6. Update docs when tools or behavior change.
13
+
14
+ ```powershell
15
+ python -m venv venv
16
+ .\venv\Scripts\Activate.ps1
17
+ pip install -e .
18
+ .\venv\Scripts\python.exe -m compileall windows_server_mcp
19
+ pip install pytest
20
+ .\venv\Scripts\python.exe -m pytest -q tests
21
+ ```
22
+
23
+ For the VS Code extension:
24
+
25
+ ```powershell
26
+ cd vscode-extension
27
+ npm install
28
+ npm run compile
29
+ ```
30
+
31
+ ## Tool Safety Guidelines
32
+
33
+ - Prefer read-only report tools first.
34
+ - Add `dry_run` defaults for destructive or broad mutation tools.
35
+ - Clearly document privilege requirements.
36
+ - Avoid permanent deletion when Recycle Bin behavior is possible.
37
+ - Keep PowerShell commands scoped and parameterized.
38
+
39
+ ## Pull Requests
40
+
41
+ Please include:
42
+
43
+ - What changed.
44
+ - Which tools are affected.
45
+ - Verification commands run.
46
+ - Any Administrator privilege requirements.