Skip to main content

Lightweight MCP Server for interacting with Windows Operating System.

Project description

🪟 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.

🎥 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 25 tools for keyboard, mouse, clipboard, shell, window management, element search, UI state capture, notifications, process management, OCR, and audio control.

  • Command Security Built-in protection against dangerous commands (format, shutdown, rm, etc.), injection attacks (blocked operators and encoded command arguments), working directory restrictions, and command length limits.

  • 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 1.5 to 2.3 secs, and may slightly vary based on the number of active applications and system load, also the inferencing speed of the llm.

Supported Operating Systems

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

Installation

Prerequisites

  • Python 3.13+
  • Anthropic Claude Desktop app or other MCP Clients
  • UV (Package Manager) from Astra, install with pip install uv
  • DXT (Desktop Extension) from Antropic, install with npm install -g @anthropic-ai/dxt

🏁 Getting Started

PyPI (Any MCP Client)

Install from PyPI:

pip install windows-mcp-server

Then configure your MCP client to run windows-mcp as the command.

Claude Code

claude mcp add windows-mcp -- windows-mcp

Gemini CLI

  1. Navigate to %USERPROFILE%/.gemini in File Explorer and open settings.json.

  2. Add the windows-mcp config in the settings.json and save it.

{
  "theme": "Default",
  "selectedAuthType": "oauth-personal",
//MCP Server Config
  "mcpServers": {
    "windows-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "<path to the windows-mcp directory>",
        "run",
        "main.py"
      ]
    }
  }
}
  1. Rerun Gemini CLI in terminal. Enjoy 🥳

Claude Desktop

  1. Clone the repository.
git clone https://github.com/CursorTouch/Windows-MCP.git
cd Windows-MCP
  1. Build Desktop Extension DXT:
npx @anthropic-ai/dxt pack
  1. Open Claude Desktop:

Go to Claude Desktop: Settings->Extensions->Install Extension (locate the .dxt file)-> Install

Finally Enjoy 🥳.

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


🛠️MCP Tools

Claude can access the following tools to interact with Windows:

Tool Description
State-Tool Combined snapshot of active apps, interactive/textual/scrollable elements, and optional annotated screenshot
Click-Tool Click on the screen at given coordinates (single, double, or triple click)
Type-Tool Type text on an element (optionally clears existing text)
Clipboard-Tool Copy or paste using the system clipboard
Scroll-Tool Scroll vertically or horizontally on the window or specific regions
Drag-Tool Drag from one point to another
Move-Tool Move mouse pointer
Shortcut-Tool Press keyboard shortcuts (Ctrl+C, Alt+Tab, etc.)
Key-Tool Press a single key
Wait-Tool Pause for a defined duration
Launch-Tool Launch an application from the start menu
Switch-Tool Switch to a running application
Powershell-Tool Execute PowerShell commands with security validation and optional working directory
Command-History-Tool Retrieve history of executed commands with timestamps and exit codes
Screenshot-Tool Take a screenshot of the full screen or a specific region
Window-Tool Minimize, maximize, restore, or close windows by name
Find-Element-Tool Search UI elements by text and return coordinates
Wait-For-Tool Poll until a UI element or text appears, with timeout
Scrape-Tool Scrape a webpage for information (with SSRF protection)
Notification-Tool Show a Windows toast notification
Process-Tool List running processes or kill by name/PID
File-Dialog-Tool Type a path into an open/save file dialog and confirm
Multi-Monitor-Tool Get display count, resolutions, and positions
OCR-Tool Extract text from screen or region using Windows built-in OCR
Audio-Tool Get/set system volume, mute/unmute
System-Info-Tool Get comprehensive system info (OS, CPU, RAM, disks, GPU, network, battery, top processes)

📡 MCP Resources

Resource URI Description
windows-mcp://current-directory Server's current working directory
windows-mcp://security-config Active security rules (blocked commands, arguments, operators, allowed paths)

🔒 Command Security

The Powershell-Tool includes multiple layers of protection:

  • Blocked commands: format, shutdown, rm, del, regedit, net, and more
  • Blocked arguments: -enc, -encodedcommand, --exec, and other injection-risk flags
  • Blocked operators: ; and ` (backtick) to prevent command chaining and injection
  • Path restriction: workingDir limited to user home directory and server working directory
  • Length limit: Commands capped at 2000 characters

Star History

Star History Chart

⚠️Caution

This MCP interacts directly with your Windows operating system to perform actions. Use with caution and avoid deploying it in environments where such risks cannot be tolerated.

📝 Limitations

  • Selecting specific sections of the text in a paragraph, as the MCP is relying on a11y tree. (⌛ Working on it.)
  • Type-Tool is meant for typing text, not programming in IDE because of it types program as a whole in a file. (⌛ Working on it.)

🪪License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝Contributing

Contributions are welcome! Please see CONTRIBUTING for setup instructions and development guidelines.

Made with ❤️ by Jeomon George

Citation

@software{
  author       = {George, Jeomon},
  title        = {Windows-MCP: Lightweight open-source project for integrating LLM agents with Windows},
  year         = {2024},
  publisher    = {GitHub},
  url={https://github.com/CursorTouch/Windows-MCP}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

windows_mcp_server-0.5.1.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windows_mcp_server-0.5.1-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file windows_mcp_server-0.5.1.tar.gz.

File metadata

  • Download URL: windows_mcp_server-0.5.1.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for windows_mcp_server-0.5.1.tar.gz
Algorithm Hash digest
SHA256 489549628e4821a4e4b9655a831b85d2df17094f714e9debed62953b51b124c0
MD5 3702453e904be665b8d027cbe8c42d9f
BLAKE2b-256 38e04aa19688bba156b5bd3662c86554db2992435f8982c8a2637f63edeeaeff

See more details on using hashes here.

File details

Details for the file windows_mcp_server-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for windows_mcp_server-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a064153da913bd877e8edec156b72f475486f8faa2658b62fc9f69072d37e8cf
MD5 627a97cd802d603bc0e69525f6c72a62
BLAKE2b-256 898307da84f18e7cdc93913bba2545c4ce1f33588a4aa3512a60cd629b583b8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page