desktop-touch-mcp — Windows MCP server: what it does, how to install
An MCP server that lets Claude or Cursor see and control a Windows 10/11 desktop: screenshots, UI Automation, mouse, keyboard, Chrome.
claude mcp add --env DESKTOP_TOUCH_AUTO_GUARD=<DESKTOP_TOUCH_AUTO_GUARD> --env DESKTOP_TOUCH_PERCEPTION_RESOURCES=<DESKTOP_TOUCH_PERCEPTION_RESOURCES> --env DESKTOP_TOUCH_PERCEPTION_IDLE_MS=<DESKTOP_TOUCH_PERCEPTION_IDLE_MS> --env DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE=<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE> --env DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE=<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE> --transport stdio desktop-touch-mcp -- npx -y @harusame64/desktop-touch-mcpWhat desktop-touch-mcp does
The server exposes 32 tools: screen capture, UI Automation reads, keyboard and mouse input, terminal runs, Chrome work. The agent does not guess pixel positions. It calls desktop_discover first and gets back interactive entities with short-lived leases and clickAt coordinates, then desktop_act targets what the element is rather than where it sat.
Per-action guards check the window's identity and bounds before input lands. Typing aimed at a covered window, a closed one or a window on another virtual desktop never gets sent; the reply names the reason. When UI Automation sees nothing, the server falls back to Windows OCR, clusters the hits and returns numbered boxes over a PNG. Each act also reports what changed on screen, so the agent can skip a follow-up screenshot.
Windows 10/11 64-bit only. Without the Rust addon every function runs through PowerShell — slower, same surface. Sending input to Windows Terminal requires an MCP client that supports elicitation over stdio, since the server asks the user each time. Start it with npx -y @harusame64/desktop-touch-mcp.
What it helps with
- read a window's controls through UI Automation and click the right one
- type into an app field that ignores background input
- capture a screen in native resolution so pixels match coordinates
- fill an SSH password from the credential locker during a console session
- map an interface by OCR when no accessibility tree exists
Example prompts for the agent
- Open Chrome, find the address bar with
desktop_discoverand type the local server URL - Capture the Excel window with
dotByDot=trueand show which cells changed - Start
sshin a console throughkey_lockerand let it fill the password
How to install desktop-touch-mcp
Platform CLI
claude mcp add --env DESKTOP_TOUCH_AUTO_GUARD=<DESKTOP_TOUCH_AUTO_GUARD> --env DESKTOP_TOUCH_PERCEPTION_RESOURCES=<DESKTOP_TOUCH_PERCEPTION_RESOURCES> --env DESKTOP_TOUCH_PERCEPTION_IDLE_MS=<DESKTOP_TOUCH_PERCEPTION_IDLE_MS> --env DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE=<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE> --env DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE=<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE> --transport stdio desktop-touch-mcp -- npx -y @harusame64/desktop-touch-mcpReplace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
codex mcp add desktop-touch-mcp --env DESKTOP_TOUCH_AUTO_GUARD=<DESKTOP_TOUCH_AUTO_GUARD> --env DESKTOP_TOUCH_PERCEPTION_RESOURCES=<DESKTOP_TOUCH_PERCEPTION_RESOURCES> --env DESKTOP_TOUCH_PERCEPTION_IDLE_MS=<DESKTOP_TOUCH_PERCEPTION_IDLE_MS> --env DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE=<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE> --env DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE=<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE> -- npx -y @harusame64/desktop-touch-mcpReplace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"mcpServers": {
"desktop-touch-mcp": {
"command": "npx",
"args": [
"-y",
"@harusame64/desktop-touch-mcp"
],
"env": {
"DESKTOP_TOUCH_AUTO_GUARD": "<DESKTOP_TOUCH_AUTO_GUARD>",
"DESKTOP_TOUCH_PERCEPTION_RESOURCES": "<DESKTOP_TOUCH_PERCEPTION_RESOURCES>",
"DESKTOP_TOUCH_PERCEPTION_IDLE_MS": "<DESKTOP_TOUCH_PERCEPTION_IDLE_MS>",
"DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE": "<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE>",
"DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE": "<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Config file
{
"servers": {
"desktop-touch-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@harusame64/desktop-touch-mcp"
],
"env": {
"DESKTOP_TOUCH_AUTO_GUARD": "<DESKTOP_TOUCH_AUTO_GUARD>",
"DESKTOP_TOUCH_PERCEPTION_RESOURCES": "<DESKTOP_TOUCH_PERCEPTION_RESOURCES>",
"DESKTOP_TOUCH_PERCEPTION_IDLE_MS": "<DESKTOP_TOUCH_PERCEPTION_IDLE_MS>",
"DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE": "<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE>",
"DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE": "<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE>"
}
}
}
}Replace <…> with your own values. 3 more environment variables are in the server README
Platform CLI
gemini mcp add -e DESKTOP_TOUCH_AUTO_GUARD=<DESKTOP_TOUCH_AUTO_GUARD> -e DESKTOP_TOUCH_PERCEPTION_RESOURCES=<DESKTOP_TOUCH_PERCEPTION_RESOURCES> -e DESKTOP_TOUCH_PERCEPTION_IDLE_MS=<DESKTOP_TOUCH_PERCEPTION_IDLE_MS> -e DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE=<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE> -e DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE=<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE> desktop-touch-mcp npx -y @harusame64/desktop-touch-mcpReplace <…> with your own values. 3 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about desktop-touch-mcp
How do I install desktop-touch-mcp in Claude Code?
Run claude mcp add desktop-touch-mcp -- npx -y @harusame64/desktop-touch-mcp. To pass the environment variables, use `claude mcp add --env DESKTOP_TOUCH_AUTO_GUARD=<DESKTOP_TOUCH_AUTO_GUARD> --env DESKTOP_TOUCH_PERCEPTION_RESOURCES=<DESKTOP_TOUCH_PERCEPTION_RESOURCES> --env DESKTOP_TOUCH_PERCEPTION_IDLE_MS=<DESKTOP_TOUCH_PERCEPTION_IDLE_MS> --env DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE=<DESKTOP_TOUCH_PERCEPTION_DORMANCY_DISABLE> --env DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE=<DESKTOP_TOUCH_DIAGNOSTIC_LOG_DISABLE> --transport stdio desktop-touch-mcp -- npx -y @harusame64/desktop-touch-mcp`.
What does desktop-touch-mcp do?
It hands an agent control over a Windows desktop: look at a window, locate a control, click it, type, then read what happened. The point is to skip manual switching between apps when the task can be stated in words.
Which systems does it support?
Windows 10 and 11, 64-bit. Chrome, Edge, VS Code, Word and Explorer are read through UI Automation; other apps go through OCR and set-of-marks boxes.