MCPcopy Index your code
hub / github.com/CursorTouch/Windows-MCP

github.com/CursorTouch/Windows-MCP @v0.8.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.2 ↗ · + Follow
1,696 symbols 4,257 edges 85 files 744 documented · 44% updated 4d agov0.8.2 · 2026-06-09★ 6,3264 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MseeP.ai Security Assessment Badge

🪟 Windows-MCP

License Python Platform: Windows 7 to 11 Last Commit

Follow on Twitter Join us on Discord

Windows-MCP is a lightweight, open-source project that enables seamless integration between AI agents and the Windows operating system. Acting as an MCP server bridges the gap between LLMs and the Windows operating system, allowing agents to perform tasks such as file navigation, application control, UI interaction, QA testing, and more.

mcp-name: io.github.CursorTouch/Windows-MCP

Updates

Supported Operating Systems

  • Windows 7
  • Windows 8, 8.1
  • Windows 10
  • Windows 11

🎥 Demos

https://github.com/user-attachments/assets/d0e7ed1d-6189-4de6-838a-5ef8e1cad54e

https://github.com/user-attachments/assets/d2b372dc-8d00-4d71-9677-4c64f5987485

✨ Key Features

  • Seamless Windows Integration
    Interacts natively with Windows UI elements, opens apps, controls windows, simulates user input, and more.

  • Use Any LLM (Vision Optional) Unlike many automation tools, Windows-MCP doesn't rely on any traditional computer vision techniques or specific fine-tuned models; it works with any LLMs, reducing complexity and setup time.

  • Rich Toolset for UI Automation
    Includes tools for basic keyboard, mouse operation and capturing window/UI state.

  • Lightweight & Open-Source
    Minimal dependencies and easy setup with full source code available under MIT license.

  • Customizable & Extendable
    Easily adapt or extend tools to suit your unique automation or AI integration needs.

  • Real-Time Interaction
    Typical latency between actions (e.g., from one mouse click to the next) ranges from 0.2 to 0.5 secs, and may slightly vary based on the number of active applications and system load, also the inferencing speed of the llm.

  • DOM Mode for Browser Automation
    Special use_dom=True mode for State-Tool that focuses exclusively on web page content, filtering out browser UI elements for cleaner, more efficient web automation. Supports Chrome, Edge, and Firefox (Firefox uses an IAccessible2 fallback since it doesn't expose RootWebArea via UIA).

🛠️Installation

Note: When you install this MCP server for the first time it may take a minute or two because of installing the dependencies in pyproject.toml. In the first run the server may timeout ignore it and restart it.

Prerequisites

  • Python 3.13+
  • UV (Package Manager) from Astra, install with pip install uv or curl -LsSf https://astral.sh/uv/install.sh | sh
  • English as the default language in Windows preferred else disable the App-Tool in the MCP Server for Windows with other languages.

Run at Login

Run the server directly when needed:

uvx windows-mcp serve
uvx windows-mcp serve --transport sse --host localhost --port 8000
uvx windows-mcp serve --transport streamable-http --host localhost --port 8000

Install it as a background task that starts now and at every login:

windows-mcp install

# Or choose the HTTP transport and bind address explicitly
windows-mcp install --transport sse --host 127.0.0.1 --port 8000

This creates a per-user Scheduled Task named windows-mcp-server and a wrapper script at ~/.windows-mcp/start-server.cmd. Use windows-mcp uninstall to remove it. Logs are written to ~/.windows-mcp/server.log and ~/.windows-mcp/server.error.log.

Install in Claude Desktop

  1. Install Claude Desktop.
npm install -g @anthropic-ai/mcpb
  1. Configure the MCP server.

Option A: Install from PyPI (Recommended)

Use uvx to run the latest version directly from PyPI.

Add this to your claude_desktop_config.json: json { "mcpServers": { "windows-mcp": { "command": "uvx", "args": [ "windows-mcp", "serve" ] } } }

Option B: Install from Source

  1. Clone the repository: shell git clone https://github.com/CursorTouch/Windows-MCP.git cd Windows-MCP

  2. Add this to your claude_desktop_config.json: json { "mcpServers": { "windows-mcp": { "command": "uv", "args": [ "--directory", "<path to the windows-mcp directory>", "run", "windows-mcp", "serve" ] } } }

  3. Fully restart Claude Desktop and verify the server appears in the MCP tools list.

Claude Desktop MSIX (Windows Store)

The MSIX-packaged Claude Desktop (Microsoft Store version) virtualizes %APPDATA%. This causes two main issues: 1. The config file is located at: %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json (not %APPDATA%\Claude\). 2. Automatic installation from the "Claude Directory" will fail because the ${__dirname} variable resolves to the incorrect (non-virtualized) path.

To configure Windows-MCP on the Windows Store version of Claude:

You must manually edit the configuration file. Note that Electron apps in the MSIX sandbox do not inherit the system PATH, so you must use the full absolute path to uvx.exe (or uv.exe).

Option A: Using pre-installed executable

  1. In a terminal, run uv tool install windows-mcp.
  2. Use the generated executable in your config: json { "mcpServers": { "windows-mcp": { "command": "C:\\Users\\<user>\\.local\\bin\\windows-mcp.exe", "args": ["serve"] } } }

Option B: Using uvx json { "mcpServers": { "windows-mcp": { "command": "C:\\Users\\<user>\\.local\\bin\\uvx.exe", "args": ["windows-mcp", "serve"] } } }

Option C: Install from Source json { "mcpServers": { "windows-mcp": { "command": "C:\\Users\\<user>\\.local\\bin\\uv.exe", "args": [ "--directory", "C:\\path\\to\\Windows-MCP", "run", "windows-mcp", "serve" ] } } }

Replace <user> with your Windows username. To find the correct paths, run where uvx, where windows-mcp, or where uv. Fully quit Claude Desktop (Tray → Quit) and reopen after saving the config.

For additional Claude Desktop integration troubleshooting, see the MCP documentation.

Install in Perplexity Desktop

  1. Install Perplexity Desktop.
  2. Open Perplexity Desktop and go to Settings -> Connectors -> Add Connector -> Advanced.
  3. Enter the name as Windows-MCP, then paste one of the following configs.

Option A: Install from PyPI (Recommended)

json { "command": "uvx", "args": [ "windows-mcp", "serve" ] }

Option B: Install from Source

json { "command": "uv", "args": [ "--directory", "<path to the windows-mcp directory>", "run", "windows-mcp", "serve" ] }

  1. Click Save, then restart Perplexity Desktop if needed.

For additional Claude Desktop integration troubleshooting, see the Perplexity MCP Support. The documentation includes helpful tips for checking logs and resolving common issues.

Install in Gemini CLI

  1. Install Gemini CLI.
npm install -g @google/gemini-cli
  1. Open %USERPROFILE%/.gemini/settings.json.
  2. Add the windows-mcp config and save it.
{
  "theme": "Default",
  ...
  "mcpServers": {
    "windows-mcp": {
      "command": "uvx",
      "args": [
        "windows-mcp",
        "serve"
      ]
    }
  }
}

Note: To run from source, replace the command with uv and args with ["--directory", "<path>", "run", "windows-mcp", "serve"].

  1. Restart Gemini CLI.

Install in Qwen Code

  1. Install Qwen Code.
npm install -g @qwen-code/qwen-code@latest
  1. Open %USERPROFILE%/.qwen/settings.json.
  2. Add the windows-mcp config and save it.
{
  "mcpServers": {
    "windows-mcp": {
      "command": "uvx",
      "args": [
        "windows-mcp",
        "serve"
      ]
    }
  }
}

Note: To run from source, replace the command with uv and args with ["--directory", "<path>", "run", "windows-mcp", "serve"].

  1. Restart Qwen Code.

Install in Codex CLI

  1. Install Codex CLI.
npm install -g @openai/codex
  1. Open %USERPROFILE%/.codex/config.toml.
  2. Add the windows-mcp config and save it.
[mcp_servers.windows-mcp]
command="uvx"
args=[
  "windows-mcp",
  "serve"
]

Note: To run from source, replace the command with uv and args with ["--directory", "<path>", "run", "windows-mcp", "serve"].

  1. Restart Codex CLI.

Install in Claude Code

  1. Install Claude Code:
npm install -g @anthropic-ai/claude-code
  1. Configure the server:

Option A: Install from PyPI (Recommended)

Use uvx to run the latest version directly from PyPI.

shell claude mcp add --transport stdio windows-mcp -- uvx windows-mcp serve

Option B: Install from Source

  1. Clone the repository: shell git clone https://github.com/CursorTouch/Windows-MCP.git cd Windows-MCP

  2. Run the following command in your terminal: shell claude mcp add --transport stdio windows-mcp -- uv --directory "<path>" run windows-mcp serve

Note: To make the server available across all projects, add --scope user to the command.

  1. Rerun Claude Code in terminal. Enjoy 🥳

Note: On Windows, if you encounter "Connection closed" errors, use the full path to uvx.exe:

shell claude mcp add --transport stdio windows-mcp -- C:\Users\<user>\.local\bin\uvx.exe windows-mcp serve

To verify the server is registered, run claude mcp list. Inside Claude Code, use /mcp to check server status.

WSL (Windows Subsystem for Linux)

If you run Claude Code from WSL, the MCP server must still execute on the Windows side (it needs Windows APIs for UI automation). Use powershell.exe as the command to bridge WSL and Windows:

  1. Install uv on Windows (from a PowerShell terminal): powershell irm https://astral.sh/uv/install.ps1 | iex

  2. From your WSL terminal, register the server: shell claude mcp add windows-mcp --transport stdio -s user -- powershell.exe -Command "C:\Users\<user>\.local\bin\uvx.exe windows-mcp serve"

Replace <user> with your Windows username. The -s user flag makes the server available across all projects.

  1. Restart Claude Code and verify with /mcp.

🖥️ Running Windows-MCP

Windows-MCP runs directly on your Windows machine and exposes its tools to the connected MCP client.

# Runs with stdio transport (default)
uvx windows-mcp serve

# Or with SSE/Streamable HTTP for network access
uvx windows-mcp serve --transport sse --host localhost --port 8000
uvx windows-mcp serve --transport streamable-http --host localhost --port 8000

Optional environment variables can be set to customize behavior — see Environment Variables below.

Security for Remote Access

For network access, enable authentication and TLS:

windows-mcp serve --transport sse --host 0.0.0.0 \
  --auth-key "your_secret_token" \
  --ip-allowlist "203.0.113.0/24" \
  --ssl-certfile cert.pem --ssl-keyfile key.pem

See 🔐 Security & Access Control for all options.

Transport Options

Transport Command Use Case
stdio (default) serve --transport stdio Direct connection from MCP clients like Claude Desktop, Cursor, etc.
sse serve --transport sse --host HOST --port PORT Network-accessible via Server-Sent Events
streamable-http serve --transport streamable-http --host HOST --port PORT Network-accessible via HTTP streaming (recommended for production)

🔐 Security & Access Control

Authentication

windows-mcp serve --transport sse --host 0.0.0.0 --auth-key "your_token"

Requires Authorization: Bearer your_token header on all requests.

IP Allowlist

```shell windows-mcp

Core symbols most depended-on inside this repo

GetPattern
called by 101
src/windows_mcp/uia/controls.py
instance
called by 67
src/windows_mcp/uia/core.py
CreateControlFromElement
called by 41
src/windows_mcp/uia/controls.py
AddProperty
called by 33
src/windows_mcp/uia/core.py
width
called by 25
src/windows_mcp/uia/core.py
height
called by 24
src/windows_mcp/uia/core.py
ps_quote
called by 19
src/windows_mcp/powershell/utils.py
GetCachedPropertyValue
called by 16
src/windows_mcp/uia/controls.py

Shape

Method 970
Function 385
Class 322
Route 19

Languages

Python100%
TypeScript1%

Modules by API surface

src/windows_mcp/uia/controls.py395 symbols
src/windows_mcp/uia/patterns.py220 symbols
src/windows_mcp/uia/core.py156 symbols
src/windows_mcp/uia/enums.py90 symbols
tests/test_screenshot_capture.py53 symbols
src/windows_mcp/desktop/service.py51 symbols
tests/test_tree_ia2.py49 symbols
tests/test_filesystem_service.py42 symbols
src/windows_mcp/vdm/core.py33 symbols
src/windows_mcp/__main__.py29 symbols
tests/test_flash_overlay.py27 symbols
tests/test_registry.py26 symbols

Dependencies from manifests, versioned

@modelcontextprotocol/sdk1.29.0 · 1×
typebox1.1.38 · 1×
click8.2.1 · 1×
comtypes1.4.15 · 1×
dxcam0.3.0 · 1×
fastmcp3.0 · 1×
fuzzywuzzy0.18.0 · 1×
markdownify1.1.0 · 1×
pillow11.2.1 · 1×
platformdirs4.3.8 · 1×
posthog7.4.0 · 1×
psutil7.0.0 · 1×

For agents

$ claude mcp add Windows-MCP \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact