Skip to content
Back to search

DesktopCommanderMCP

This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/wonderwhy-er/DesktopCommanderMCP with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/wonderwhy-er/DesktopCommanderMCP'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wonderwhy-er--desktopcommandermcp/badge.svg)](/listings/wonderwhy-er--desktopcommandermcp)

HTML

<a href="/listings/wonderwhy-er--desktopcommandermcp"><img src="/api/listings/wonderwhy-er--desktopcommandermcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Install in Claude Desktop

Desktop Commander offers multiple installation methods for Claude Desktop.

> **๐Ÿ“‹ Update & Uninstall Information:** Options 1, 2, 3, 4, and 6 have automatic updates. Option 5 requires manual updates. See below for details.

<details> <summary><b>Option 1: Install through npx โญ Auto-Updates (Requires Node.js)</b></summary>

Just run this in terminal:

npx @wonderwhy-er/desktop-commander@latest setup

For debugging mode (allows Node.js inspector connection):

npx @wonderwhy-er/desktop-commander@latest setup --debug

**Command line options during setup:** - `--debug`: Enable debugging mode for Node.js inspector - `--no-onboarding`: Disable onboarding prompts for new users

Restart Claude if running.

**โœ… Auto-Updates:** Yes - automatically updates when you restart Claude **๐Ÿ”„ Manual Update:** Run the setup command again **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`

</details>

<details> <summary><b>Option 2: Using bash script installer (macOS) โญ Auto-Updates (Installs Node.js if needed)</b></summary>

curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash

This script handles all dependencies and configuration automatically.

**โœ… Auto-Updates:** Yes **๐Ÿ”„ Manual Update:** Re-run the bash installer command above **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`

</details>

<details> <summary><b>Option 3: Installing via Smithery โญ Auto-Updates (Requires Node.js)</b></summary>

1. **Visit:** https://smithery.ai/server/@wonderwhy-er/desktop-commander 2. **Login to Smithery** if you haven't already 3. **Select your client** (Claude Desktop) on the right side 4. **Install with the provided key** that appears after selecting your client 5. **Restart Claude Desktop**

**โœ… Auto-Updates:** Yes - automatically updates when you restart Claude **๐Ÿ”„ Manual Update:** Visit the Smithery page and reinstall

</details>

<details> <summary><b>Option 4: Add to claude_desktop_config manually โญ Auto-Updates (Requires Node.js)</b></summary>

Add this entry to your claude_desktop_config.json:

- On Mac: `~/Library/Application Support/Claude/claude_desktop_config.json` - On Windows: `%APPDATA%\Claude\claude_desktop_config.json` - On Linux: `~/.config/Claude/claude_desktop_config.json`

{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander@latest"
      ]
    }
  }
}

Restart Claude if running.

**โœ… Auto-Updates:** Yes - automatically updates when you restart Claude **๐Ÿ”„ Manual Update:** Run the setup command again **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the entry from your claude_desktop_config.json

</details>

<details> <summary><b>Option 5: Checkout locally โŒ Manual Updates (Requires Node.js)</b></summary>

git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
cd DesktopCommanderMCP
npm run setup

Restart Claude if running.

The setup command will install dependencies, build the server, and configure Claude's desktop app.

**โŒ Auto-Updates:** No - requires manual git updates **๐Ÿ”„ Manual Update:** `cd DesktopCommanderMCP && git pull && npm run setup` **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and MCP server entry from Claude config

</details>

<details> <summary><b>Option 6: Docker Installation ๐Ÿณ โญ Auto-Updates (No Node.js Required)</b></summary>

Perfect for users who want isolation or don't have Node.js installed. Runs in a sandboxed Docker container with a persistent work environment.

**Prerequisites:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**, Claude Desktop app installed.

**macOS/Linux:**

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json ยท Manifest ยท 20 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "desktop-commander",
  3. "displayName": "Desktop Commander",
  4. "owner": {
  5. "name": "Desktop Commander",
  6. "email": "es@desktopcommander.app"
  7. },
  8. "metadata": {
  9. "description": "MCP server for terminal, command-line access, process management, and file operations across text, code, PDF, DOCX, Excel, images, and structured data",
  10. "version": "0.2.0"
  11. },
  12. "plugins": [
  13. {
  14. "name": "desktop-commander",
  15. "displayName": "Desktop Commander",
  16. "source": "./plugins/claude",
  17. "description": "MCP server for terminal shell commands, process management, and file operations across text, coding, PDF, DOCX, Excel, images, and structured data"
  18. }
  19. ]
  20. }
README.md ยท README ยท 1,154 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Desktop Commander MCP
  2. ### Search, update, manage files and run terminal commands with AI
  3. [![npm downloads](https://img.shields.io/npm/dw/@wonderwhy-er/desktop-commander)](https://www.npmjs.com/package/@wonderwhy-er/desktop-commander)
  4. [![AgentAudit Verified](https://agentaudit.dev/api/badge/desktop-commander)](https://agentaudit.dev/skills/desktop-commander)
  5. [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/wonderwhy-er/DesktopCommanderMCP)](https://archestra.ai/mcp-catalog/wonderwhy-er__desktopcommandermcp)
  6. [![smithery badge](https://smithery.ai/badge/@wonderwhy-er/desktop-commander)](https://smithery.ai/server/@wonderwhy-er/desktop-commander)
  7. [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-support-yellow.svg)](https://www.buymeacoffee.com/wonderwhyer)
  8. [![Discord](https://img.shields.io/badge/Join%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/kQ27sNnZr7)
  9. Work with code and text, run processes, and automate tasks, going far beyond other AI editors - while using host client subscriptions instead of API token costs.
  10. <a href="https://glama.ai/mcp/servers/zempur9oh4">
  11. <img width="380" height="200" src="https://glama.ai/mcp/servers/zempur9oh4/badge" alt="Desktop Commander MCP" />
  12. </a>
  13. ## Table of Contents
  14. - [Features](#features)
  15. - [How to install](#how-to-install)
  16. - [Getting Started](#getting-started)
  17. - [Usage](#usage)
  18. - [File Preview UI & Markdown Editor](#file-preview-ui--markdown-editor)
  19. - [Handling Long-Running Commands](#handling-long-running-commands)
  20. - [Work in Progress and TODOs](#roadmap)
  21. - [Sponsors and Supporters](#support-desktop-commander)
  22. - [Website](#website)
  23. - [Media](#media)
  24. - [Testimonials](#testimonials)
  25. - [Frequently Asked Questions](#frequently-asked-questions)
  26. - [Contributing](#contributing)
  27. - [License](#license)
  28. All of your AI development tools in one place.
  29. Desktop Commander puts all dev tools in one chat.
  30. Execute long-running terminal commands on your computer and manage processes through Model Context Protocol (MCP). Built on top of [MCP Filesystem Server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) to provide additional search and replace file editing capabilities.
  31. ## Features
  32. - **Remote AI Control** - Use Desktop Commander from ChatGPT, Claude web, and other AI services via [Remote MCP](https://mcp.desktopcommander.app)
  33. - **File Preview UI** - Visual file previews in Claude Desktop with rendered markdown, inline images, expandable content, built-in markdown editor, and quick "Open in folder" access
  34. - **Enhanced terminal commands with interactive process control**
  35. - **Execute code in memory (Python, Node.js, R) without saving files**
  36. - **Instant data analysis - just ask to analyze CSV/JSON/Excel files**
  37. - **Native Excel file support** - Read, write, edit, and search Excel files (.xlsx, .xls, .xlsm) without external tools
  38. - **PDF support** - Read PDFs with text extraction, create new PDFs from markdown, modify existing PDFs
  39. - **DOCX support** - Read, create, edit, and search Word documents (.docx) with surgical XML editing and markdown-to-DOCX conversion
  40. - **Interact with running processes (SSH, databases, development servers)**
  41. - Execute terminal commands with output streaming
  42. - Command timeout and background execution support
  43. - Process management (list and kill processes)
  44. - Session management for long-running commands
  45. - **Process output pagination** - Read terminal output with offset/length controls to prevent context overflow
  46. - Server configuration management:
  47. - Get/set configuration values
  48. - Update multiple settings at once
  49. - Dynamic configuration changes without server restart
  50. - Full filesystem operations:
  51. - Read/write files (text, Excel, PDF, DOCX)
  52. - Create/list directories
  53. - **Recursive directory listing** with configurable depth and context overflow protection for large folders
  54. - Move files/directories
  55. - Search files and content (including Excel content)
  56. - Get file metadata
  57. - **Negative offset file reading**: Read from end of files using negative offset values (like Unix tail)
  58. - Code editing capabilities:
  59. - Surgical text replacements for small changes
  60. - Full file rewrites for major changes
  61. - Multiple file support
  62. - Pattern-based replacements
  63. - vscode-ripgrep based recursive code or text search in folders
  64. - Local tool-call history and audit logs:
  65. - Tool calls and arguments are recorded locally on the machine running Desktop Commander
  66. - Recent call history with bounded output previews is available through `get_recent_tool_calls`
  67. - Size-based rotation/trimming keeps the active history files bounded
  68. - Safety guardrails (not a sandbox โ€” see [SECURITY.md](SECURITY.md)):
  69. - Symlink traversal prevention on file operations
  70. - Command blocklist for accidental execution
  71. - [Docker isolation](#option-6-docker-installation--auto-updates-no-nodejs-required) for complete isolation
  72. ## How to install
  73. For ChatGPT, Claude web, and other remote clients, see the [Remote device launchers](scripts/remote/README.md). They install Node.js when missing and run Desktop Commander Remote on macOS, Linux, or Windows.
  74. ### Install in Claude Desktop
  75. Desktop Commander offers multiple installation methods for Claude Desktop.
  76. > **๐Ÿ“‹ Update & Uninstall Information:** Options 1, 2, 3, 4, and 6 have automatic updates. Option 5 requires manual updates. See below for details.
  77. <details>
  78. <summary><b>Option 1: Install through npx โญ Auto-Updates (Requires Node.js)</b></summary>
  79. Just run this in terminal:
  80. ```
  81. npx @wonderwhy-er/desktop-commander@latest setup
  82. ```
  83. For debugging mode (allows Node.js inspector connection):
  84. ```
  85. npx @wonderwhy-er/desktop-commander@latest setup --debug
  86. ```
  87. **Command line options during setup:**
  88. - `--debug`: Enable debugging mode for Node.js inspector
  89. - `--no-onboarding`: Disable onboarding prompts for new users
  90. Restart Claude if running.
  91. **โœ… Auto-Updates:** Yes - automatically updates when you restart Claude
  92. **๐Ÿ”„ Manual Update:** Run the setup command again
  93. **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
  94. </details>
  95. <details>
  96. <summary><b>Option 2: Using bash script installer (macOS) โญ Auto-Updates (Installs Node.js if needed)</b></summary>
  97. ```
  98. curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
  99. ```
  100. This script handles all dependencies and configuration automatically.
  101. **โœ… Auto-Updates:** Yes
  102. **๐Ÿ”„ Manual Update:** Re-run the bash installer command above
  103. **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`
  104. </details>
  105. <details>
  106. <summary><b>Option 3: Installing via Smithery โญ Auto-Updates (Requires Node.js)</b></summary>
  107. 1. **Visit:** https://smithery.ai/server/@wonderwhy-er/desktop-commander
  108. 2. **Login to Smithery** if you haven't already
  109. 3. **Select your client** (Claude Desktop) on the right side
  110. 4. **Install with the provided key** that appears after selecting your client
  111. 5. **Restart Claude Desktop**
  112. **โœ… Auto-Updates:** Yes - automatically updates when you restart Claude
  113. **๐Ÿ”„ Manual Update:** Visit the Smithery page and reinstall
  114. </details>
  115. <details>
  116. <summary><b>Option 4: Add to claude_desktop_config manually โญ Auto-Updates (Requires Node.js)</b></summary>
  117. Add this entry to your claude_desktop_config.json:
  118. - On Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
  119. - On Windows: `%APPDATA%\Claude\claude_desktop_config.json`
  120. - On Linux: `~/.config/Claude/claude_desktop_config.json`
  121. ```json
  122. {
  123. "mcpServers": {
  124. "desktop-commander": {
  125. "command": "npx",
  126. "args": [
  127. "-y",
  128. "@wonderwhy-er/desktop-commander@latest"
  129. ]
  130. }
  131. }
  132. }
  133. ```
  134. Restart Claude if running.
  135. **โœ… Auto-Updates:** Yes - automatically updates when you restart Claude
  136. **๐Ÿ”„ Manual Update:** Run the setup command again
  137. **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the entry from your claude_desktop_config.json
  138. </details>
  139. <details>
  140. <summary><b>Option 5: Checkout locally โŒ Manual Updates (Requires Node.js)</b></summary>
  141. ```bash
  142. git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
  143. cd DesktopCommanderMCP
  144. npm run setup
  145. ```
  146. Restart Claude if running.
  147. The setup command will install dependencies, build the server, and configure Claude's desktop app.
  148. **โŒ Auto-Updates:** No - requires manual git updates
  149. **๐Ÿ”„ Manual Update:** `cd DesktopCommanderMCP && git pull && npm run setup`
  150. **๐Ÿ—‘๏ธ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and MCP server entry from Claude config
  151. </details>
  152. <details>
  153. <summary><b>Option 6: Docker Installation ๐Ÿณ โญ Auto-Updates (No Node.js Required)</b></summary>
  154. Perfect for users who want isolation or don't have Node.js installed. Runs in a sandboxed Docker container with a persistent work environment.
  155. **Prerequisites:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**, Claude Desktop app installed.
  156. **macOS/Linux:**
  157. ```bash
  158. bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)
  159. ```
  160. **Windows PowerShell:**
  161. ```powershell
  162. iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))
  163. ```
  164. The installer will check Docker, pull the image, prompt for folder mounting, and configure Claude Desktop.
  165. **Docker persistence:** Your tools, configs, work files, and package caches all survive restarts.
  166. <details>
  167. <summary>Manual Docker Configuration</summary>
  168. **Basic setup (no file access):**
  169. ```json
  170. {
  171. "mcpServers": {
  172. "desktop-commander-in-docker": {
  173. "command": "docker",
  174. "args": ["run", "-i", "--rm", "mcp/desktop-commander:latest"]
  175. }
  176. }
  177. }
  178. ```
  179. **With folder mounting:**
  180. ```json
  181. {
  182. "mcpServers": {
  183. "desktop-commander-in-docker": {
  184. "command": "docker",
  185. "args": [
  186. "run", "-i", "--rm",
  187. "-v", "/Users/username/Desktop:/mnt/desktop",
  188. "-v", "/Users/username/Documents:/mnt/documents",
  189. "mcp/desktop-commander:latest"
  190. ]
  191. }
  192. }
  193. }
  194. ```
  195. **Advanced folder mounting:**
  196. ```json
  197. {
  198. "mcpServers": {
  199. "desktop-commander-in-docker": {
  200. "command": "docker",
  201. "args": [
  202. "run", "-i", "--rm",
  203. "-v", "dc-system:/usr",
  204. "-v", "dc-home:/root",
  205. "-v", "dc-workspace:/workspace",
  206. "-v", "dc-packages:/var",
  207. "-v", "/Users/username/Projects:/mnt/Projects",
  208. "-v", "/Users/username/Downloads:/mnt/Downloads",
  209. "mcp/desktop-commander:latest"
  210. ]
  211. }
  212. }
  213. }
  214. ```
  215. </details>
  216. <details>
  217. <summary>Docker Management Commands</summary>
  218. **macOS/Linux:**
  219. ```bash
  220. # Check status
  221. bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --status
  222. # Reset all persistent data
  223. bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset
  224. ```
  225. **Windows PowerShell:**
  226. ```powershell
  227. # Check status
  228. $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Status
  229. # Reset all data
  230. $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Reset
  231. # Show help
  232. $script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Help
  233. ```
  234. **Troubleshooting:** Reset and reinstall from scratch:
  235. ```bash
  236. bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset && bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)
  237. ```
  238. </details>
  239. **โœ… Auto-Updates:** Yes - `latest` tag automatically gets newer versions
  240. **๐Ÿ”„ Manual Update:** `docker pull mcp/desktop-commander:latest` then restart Claude
  241. </details>
  242. ### Install in Other Clients
  243. Desktop Commander works with any MCP-compatible client. The standard JSON configuration is:
  244. ```json
  245. {
  246. "mcpServers": {
  247. "desktop-commander": {
  248. "command": "npx",
  249. "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
  250. }
  251. }
  252. }
  253. ```
  254. Add this to your client's MCP configuration file at the locations below:
  255. <details>
  256. <summary><b>Cursor</b></summary><br>
  257. [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=desktop-commander&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3b25kZXJ3aHktZXIvZGVza3RvcC1jb21tYW5kZXJAbGF0ZXN0Il19)
  258. [View MCP Server in Directory](https://cursor.directory/mcp/desktop-commander-mcp)
  259. Or add manually to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in your project folder (project-specific).
  260. See [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) for more info.
  261. </details>
  262. <details>
  263. <summary><b>Windsurf</b></summary>
  264. Add to `~/.codeium/windsurf/mcp_config.json`. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) for more info.
  265. </details>
  266. <details>
  267. <summary><b>VS Code / GitHub Copilot</b></summary>
  268. Add to `.vscode/mcp.json` in your project or VS Code User Settings (JSON). Make sure MCP is enabled under Chat > MCP. Works in Agent mode.
  269. See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info.
  270. </details>
  271. <details>
  272. <summary><b>Cline</b></summary>
  273. Configure through the Cline extension settings in VS Code. Open the Cline sidebar, click the MCP Servers icon, and add the JSON configuration above. See [Cline MCP docs](https://docs.cline.bot/mcp/configuring-mcp-servers) for more info.
  274. </details>
  275. <details>
  276. <summary><b>Roo Code</b></summary>
  277. Add to your Roo Code MCP configuration file. See [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) for more info.
  278. </details>
  279. <details>
  280. <summary><b>Claude Code</b></summary>
  281. ```sh
  282. claude mcp add --scope user desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
  283. ```
  284. Remove `--scope user` to install for the current project only. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for more info.
  285. </details>
  286. <details>
  287. <summary><b>Trae</b></summary>
  288. Use the "Add manually" feature and paste the JSON configuration above. See [Trae MCP docs](https://docs.trae.ai/ide/model-context-protocol?_lang=en) for more info.
  289. </details>
  290. <details>
  291. <summary><b>Kiro</b></summary>
  292. Navigate to `Kiro` > `MCP Servers`, click `+ Add`, and paste the JSON configuration above. See [Kiro MCP docs](https://kiro.dev/docs/mcp/configuration/) for more info.
  293. </details>
  294. <details>
  295. <summary><b>Codex (OpenAI)</b></summary>
  296. Codex uses TOML configuration. Run this command to add Desktop Commander:
  297. ```sh
  298. codex mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
  299. ```
  300. Or manually add to `~/.codex/config.toml`:
  301. ```toml
  302. [mcp_servers.desktop-commander]
  303. command = "npx"
  304. args = ["-y", "@wonderwhy-er/desktop-commander@latest"]
  305. ```
  306. See [Codex MCP docs](https://developers.openai.com/codex/mcp/) for more info.
  307. </details>
  308. <details>
  309. <summary><b>JetBrains (AI Assistant)</b></summary>
  310. In JetBrains IDEs, go to **Settings โ†’ Tools โ†’ AI Assistant โ†’ Model Context Protocol (MCP)**, click `+` Add, select **As JSON**, and paste the JSON configuration above. See [JetBrains MCP docs](https://www.jetbrains.com/help/ai-assistant/configure-an-mcp-server.html) for more info.
  311. </details>
  312. <details>
  313. <summary><b>Gemini CLI</b></summary>
  314. Add to `~/.gemini/settings.json`:
  315. ```json
  316. {
  317. "mcpServers": {
  318. "desktop-commander": {
  319. "command": "npx",
  320. "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
  321. }
  322. }
  323. }
  324. ```
  325. See [Gemini CLI docs](https://github.com/google-gemini/gemini-cli) for more info.
  326. </details>
  327. <details>
  328. <summary><b>Augment Code</b></summary>
  329. Press `Cmd/Ctrl+Shift+P`, open the Augment panel, and add a new MCP server named `desktop-commander` with the JSON configuration above. See [Augment Code MCP docs](https://docs.augmentcode.com/setup-augment/mcp) for more info.
  330. </details>
  331. <details>
  332. <summary><b>Qwen Code</b></summary>
  333. Run this command to add Desktop Commander:
  334. ```sh
  335. qwen mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest
  336. ```
  337. Or add to `.qwen/settings.json` (project) or `~/.qwen/settings.json` (global). See [Qwen Code MCP docs](https://qwenlm.github.io/qwen-code-docs/en/developers/tools/mcp-server/) for more info.
  338. </details>
  339. <details>
  340. <summary><b>ChatGPT / Claude Web (Remote MCP)</b></summary>
  341. Use Desktop Commander from **ChatGPT**, **Claude web**, and other AI services while commands still execute on your computer.
  342. Start the Remote Device:
  343. ```bash
  344. npx @wonderwhy-er/desktop-commander@latest remote
  345. ```
  346. On first run, complete browser authentication, then connect your AI at **[mcp.desktopcommander.app](https://mcp.desktopcommander.app)**.
  347. - Stop the local device temporarily with `Ctrl+C`
  348. - See available CLI options with `npx @wonderwhy-er/desktop-commander@latest remote --help`
  349. - See **[Remote MCP setup, logout/revocation, CLI reference, and troubleshooting](src/remote-device/README.md)**
  350. ### Security
  351. - โœ… The Remote Device only accepts commands while it is running
  352. - โœ… Commands execute locally under your user permissions
  353. - โœ… Secure OAuth authentication and encrypted communication channel
  354. </details>
  355. ## Updating & Uninstalling Desktop Commander
  356. ### Automatic Updates (Options 1, 2, 3, 4 & 6)
  357. **Options 1 (npx), Option 2 (bash installer), 3 (Smithery), 4 (manual config), and 6 (Docker)** automatically update to the latest version whenever you restart Claude. No manual intervention needed.
  358. ### Manual Updates (Option 5)
  359. - **Option 5 (local checkout):** `cd DesktopCommanderMCP && git pull && npm run setup`
  360. ### Uninstalling Desktop Commander
  361. #### ๐Ÿค– Automatic Uninstallation (Recommended)
  362. The easiest way to completely remove Desktop Commander:
  363. ```bash
  364. npx @wonderwhy-er/desktop-commander@latest remove
  365. ```
  366. This automatic uninstaller will:
  367. - โœ… Remove Desktop Commander from Claude's MCP server configuration
  368. - โœ… Create a backup of your Claude config before making changes
  369. - โœ… Provide guidance for complete package removal
  370. - โœ… Restore from backup if anything goes wrong
  371. #### ๐Ÿ”ง Manual Uninstallation
  372. If the automatic uninstaller doesn't work or you prefer manual removal:
  373. ##### Remove from Claude Configuration
  374. 1. **Locate your Claude Desktop config file:**
  375. - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
  376. - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
  377. - **Linux:** `~/.config/Claude/claude_desktop_config.json`
  378. 2. **Edit the config file:**
  379. - Open the file in a text editor
  380. - Find and remove the `"desktop-commander"` entry from the `"mcpServers"` section
  381. - Save the file
  382. **Example - Remove this section:**
  383. ```json
  384. {
  385. "desktop-commander": {
  386. "command": "npx",
  387. "args": ["@wonderwhy-er/desktop-commander@latest"]
  388. }
  389. }
  390. ```
  391. Close and restart Claude Desktop to complete the removal.
  392. #### ๐Ÿ†˜ Troubleshooting
  393. **If automatic uninstallation fails:**
  394. - Use manual uninstallation as a fallback
  395. **If Claude won't start after uninstalling:**
  396. - Restore the backup config file created by the uninstaller
  397. - Or manually fix the JSON syntax in your claude_desktop_config.json
  398. **Need help?**
  399. - Join our Discord community: https://discord.com/invite/kQ27sNnZr7
  400. ## Getting Started
  401. Once Desktop Commander is installed and Claude Desktop is restarted, you're ready to supercharge your Claude experience!
  402. ### ๐Ÿš€ New User Onboarding
  403. Desktop Commander includes intelligent onboarding to help you discover what's possible:
  404. **For New Users:** When you're just getting started (fewer than 10 successful commands), Claude will automatically offer helpful getting-started guidance and practical tutorials after you use Desktop Commander successfully.
  405. **Request Help Anytime:** You can ask for onboarding assistance at any time by simply saying:
  406. - *"Help me get started with Desktop Commander"*
  407. - *"Show me Desktop Commander examples"*
  408. - *"What can I do with Desktop Commander?"*
  409. Claude will then show you beginner-friendly tutorials and examples, including:
  410. - ๐Ÿ“ Organizing your Downloads folder automatically
  411. - ๐Ÿ“Š Analyzing CSV/Excel files with Python
  412. - โš™๏ธ Setting up GitHub Actions CI/CD
  413. - ๐Ÿ” Exploring and understanding codebases
  414. - ๐Ÿค– Running interactive development environments
  415. ## Usage
  416. The server provides a comprehensive set of tools organized into several categories:
  417. ### Available Tools
  418. | Category | Tool | Description |
  419. |----------|------|-------------|
  420. | **Configuration** | `get_config` | Get the complete server configuration as JSON (includes blockedCommands, defaultShell, allowedDirectories, fileReadLineLimit, fileWriteLineLimit, telemetryEnabled) |
  421. | | `set_config_value` | Set a specific configuration value by key. Available settings: <br>โ€ข `blockedCommands`: Array of shell commands that cannot be executed<br>โ€ข `defaultShell`: Shell to use for commands (e.g., bash, zsh, powershell)<br>โ€ข `allowedDirectories`: Array of filesystem paths the server can access for file operations (โš ๏ธ terminal commands can still access files outside these directories)<br>โ€ข `fileReadLineLimit`: Maximum lines to read at once (default: 1000)<br>โ€ข `fileWriteLineLimit`: Maximum lines to write at once (default: 50)<br>โ€ข `telemetryEnabled`: Enable/disable telemetry (boolean) |
  422. | **Terminal** | `start_process` | Start programs with smart detection of when they're ready for input |
  423. | | `interact_with_process` | Send commands to running programs and get responses |
  424. | | `read_process_output` | Read output from running processes |
  425. | | `force_terminate` | Force terminate a running terminal session |
  426. | | `list_sessions` | List all active terminal sessions |
  427. | | `list_processes` | List all running processes with detailed information |
  428. | | `kill_process` | Terminate a running process by PID |
  429. | **Filesystem** | `read_file` | Read contents from local filesystem, URLs, Excel files (.xlsx, .xls, .xlsm), and PDFs with line/page-based pagination |
  430. | | `read_multiple_files` | Read multiple files simultaneously |
  431. | | `write_file` | Write file contents with options for rewrite or append mode. Supports Excel files (JSON 2D array format). For PDFs, use `write_pdf` |
  432. | | `write_pdf` | Create new PDF files from markdown or modify existing PDFs (insert/delete pages). Supports HTML/CSS styling and SVG graphics |
  433. | | `create_directory` | Create a new directory or ensure it exists |
  434. | | `list_directory` | Get detailed recursive listing of files and directories (supports depth parameter, default depth=2) |
  435. | | `move_file` | Move or rename files and directories |
  436. | | `start_search` | Start streaming search for files by name or content patterns (searches text files and Excel content) |
  437. | | `get_more_search_results` | Get paginated results from active search with offset support |
  438. | | `stop_search` | Stop an active search gracefully |
  439. | | `list_searches` | List all active search sessions |
  440. | | `get_file_info` | Retrieve detailed metadata about a file or directory (includes sheet info for Excel files) |
  441. | **Text Editing** | `edit_block` | Apply targeted text replacements for text files, or range-based cell updates for Excel files |
  442. | **Analytics** | `get_usage_stats` | Get usage statistics for your own insight |
  443. | | `get_recent_tool_calls` | Get recent tool call history with arguments and outputs for debugging and context recovery |
  444. | | `give_feedback_to_desktop_commander` | Open feedback form in browser to provide feedback to Desktop Commander Team |
  445. ### Quick Examples
  446. **Data Analysis:**
  447. ```
  448. "Analyze sales.csv and show top customers" โ†’ Claude runs Python code in memory
  449. ```
  450. **Remote Access:**
  451. ```
  452. "SSH to my server and check disk space" โ†’ Claude maintains SSH session
  453. ```
  454. **Development:**
  455. ```
  456. "Start Node.js and test this API" โ†’ Claude runs interactive Node session
  457. ```
  458. ### Tool Usage Examples
  459. Search/Replace Block Format:
  460. ```
  461. filepath.ext
  462. <<<<<<< SEARCH
  463. content to find
  464. =======
  465. new content
  466. >>>>>>> REPLACE
  467. ```
  468. Example:
  469. ```
  470. src/main.js
  471. <<<<<<< SEARCH
  472. console.log("old message");
  473. =======
  474. console.log("new message");
  475. >>>>>>> REPLACE
  476. ```
  477. ### Enhanced Edit Block Features
  478. The `edit_block` tool includes several enhancements for better reliability:
  479. 1. **Improved Prompting**: Tool descriptions now emphasize making multiple small, focused edits rather than one large change
  480. 2. **Fuzzy Search Fallback**: When exact matches fail, it performs fuzzy search and provides detailed feedback
  481. 3. **Character-level Diffs**: Shows exactly what's different using `{-removed-}{+added+}` format
  482. 4. **Multiple Occurrence Support**: Can replace multiple instances with `expected_replacements` parameter
  483. 5. **Comprehensive Logging**: All fuzzy searches are logged for analysis and debugging
  484. When a search fails, you'll see detailed information about the closest match found, including similarity percentage, execution time, and character differences. All these details are automatically logged for later analysis using the fuzzy search log tools.
  485. ### Docker Support
  486. ### ๐Ÿณ Isolated Environment Usage
  487. Desktop Commander can be run in Docker containers for **complete isolation from your host system**, providing **zero risk to your computer**. This is perfect for testing, development, or when you want complete sandboxing.
  488. ### Installation Instructions
  489. 1. **Install Docker for Windows/Mac**
  490. - Download and install Docker Desktop from [docker.com](https://www.docker.com/products/docker-desktop/)
  491. 2. **Get Desktop Commander Docker Configuration**
  492. - Visit: https://hub.docker.com/mcp/server/desktop-commander/manual
  493. - **Option A:** Use the provided terminal command for automated setup
  494. - **Option B:** Click "Standalone" to get the config JSON and add it manually to your Claude Desktop config
  495. ![docker-config.png](screenshots/docker-config.png)
  496. 3. **Mount Your Machine Folders (Coming Soon)**
  497. - Instructions on how to mount your local directories into the Docker container will be provided soon
  498. - This will allow you to work with your files while maintaining complete isolation
  499. ### Benefits of Docker Usage
  500. - **Complete isolation** from your host system
  501. - **Consistent environment** across different machines
  502. - **Easy cleanup** - just remove the container when done
  503. - **Perfect for testing** new features or configurations
  504. ## URL Support
  505. - `read_file` can now fetch content from both local files and URLs
  506. - Example: `read_file` with `isUrl: true` parameter to read from web resources
  507. - Handles both text and image content from remote sources
  508. - Images (local or from URLs) are displayed visually in Claude's interface, not as text
  509. - Claude can see and analyze the actual image content
  510. - Default 30-second timeout for URL requests
  511. ## File Preview UI & Markdown Editor
  512. Desktop Commander includes a rich file preview widget in Claude Desktop that renders files visually as AI works with them.
  513. ### Supported file types
  514. - **Markdown** โ€” rendered preview with a built-in editor
  515. - **Images** โ€” inline display (PNG, JPEG, GIF, WebP, etc.)
  516. - **Code files** โ€” syntax-highlighted source view
  517. - **HTML** โ€” rendered preview with toggle to source view
  518. - **Directories** โ€” interactive tree with expand/collapse and lazy loading
  519. - **PDF, Excel, DOCX** โ€” native content extraction and display
  520. ### Markdown Editor
  521. When viewing a `.md` file in Claude Desktop, you can edit it directly inside the preview panel โ€” no need to open a separate app.
  522. **How to use:**
  523. 1. Ask Claude to read or create a markdown file
  524. 2. Expand the file preview to fullscreen using the **โคข Expand** button
  525. 3. The editor activates automatically in fullscreen mode
  526. 4. Edit your content with a live preview toggle, copy, undo, and save controls
  527. 5. Changes are saved back to disk; collapse to return to inline view
  528. **Editor features:**
  529. - Live **edit / preview toggle** โ€” switch between raw markdown and rendered output
  530. - **Auto-save** to disk with save status indicator
  531. - **Undo** support to revert unsaved changes
  532. - **Copy** button to grab the full markdown source
  533. - **Open in editor** โ€” launch your default markdown app directly from the panel
  534. - Partial-file awareness โ€” loads and merges surrounding lines when the file was only partially read
  535. - Text selection context โ€” select text in preview mode and the AI can reference your selection
  536. ### Directory Browser
  537. When Claude runs `list_directory`, the result opens as an interactive file tree inside the preview panel โ€” not just raw text output.
  538. **Features:**
  539. - **Expandable tree** โ€” folders expand and collapse on click; top-level contents shown immediately
  540. - **Lazy loading** โ€” subfolders load on demand to keep the initial view fast
  541. - **Large directory handling** โ€” directories with many items show a `โš  click to load all` button instead of overwhelming the view
  542. - **Open in Finder/Explorer** โ€” each folder has a quick-open button to reveal it in your file manager
  543. - **Click to preview** โ€” clicking any file in the tree opens it in the file preview panel directly
  544. - **Back navigation** โ€” after opening a file from the tree, a โ† Back button returns you to the directory view
  545. ### Other preview features
  546. - **Expand / collapse** โ€” toggle between compact summary row and full panel
  547. - **Open in folder** โ€” reveal the file in Finder/Explorer with one click
  548. - **Load more lines** โ€” incrementally load content above or below a partial read window
  549. - **Text selection** โ€” highlight text in any preview; the AI can see and reference your selection
  550. ## Fuzzy Search Log Analysis (npm scripts)
  551. The fuzzy search logging system includes convenient npm scripts for analyzing logs outside of the MCP environment:
  552. ```bash
  553. # View recent fuzzy search logs
  554. npm run logs:view -- --count 20
  555. # Analyze patterns and performance
  556. npm run logs:analyze -- --threshold 0.8
  557. # Export logs to CSV or JSON
  558. npm run logs:export -- --format json --output analysis.json
  559. # Clear all logs (with confirmation)
  560. npm run logs:clear
  561. ```
  562. For detailed documentation on these scripts, see [scripts/README.md](scripts/README.md).
  563. ## Fuzzy Search Logs
  564. Desktop Commander includes comprehensive logging for fuzzy search operations in the `edit_block` tool. When an exact match isn't found, the system performs a fuzzy search and logs detailed information for analysis.
  565. ### What Gets Logged
  566. Every fuzzy search operation logs:
  567. - **Search and found text**: The text you're looking for vs. what was found
  568. - **Similarity score**: How close the match is (0-100%)
  569. - **Execution time**: How long the search took
  570. - **Character differences**: Detailed diff showing exactly what's different
  571. - **File metadata**: Extension, search/found text lengths
  572. - **Character codes**: Specific character codes causing differences
  573. ### Log Location
  574. Logs are automatically saved to:
  575. - **macOS/Linux**: `~/.claude-server-commander-logs/fuzzy-search.log`
  576. - **Windows**: `%USERPROFILE%\.claude-server-commander-logs\fuzzy-search.log`
  577. ### What You'll Learn
  578. The fuzzy search logs help you understand:
  579. 1. **Why exact matches fail**: Common issues like whitespace differences, line endings, or character encoding
  580. 2. **Performance patterns**: How search complexity affects execution time
  581. 3. **File type issues**: Which file extensions commonly have matching problems
  582. 4. **Character encoding problems**: Specific character codes that cause diffs
  583. ## Local Tool History and Audit Logs
  584. Desktop Commander keeps tool-call records **locally on the machine running the MCP server**. These local files are separate from optional telemetry and are not a server-side historical audit log.
  585. ### `claude_tool_call.log` โ€” local argument log
  586. Every tool call handled by the local MCP server is appended as a text line containing an ISO timestamp, the tool name, and the JSON-serialized arguments. Arguments are **not redacted or sanitized before being written to this local file**, so it may contain command text, file paths, or other sensitive values passed to tools. Tool outputs are not written to this file.
  587. The active file rotates when it reaches 10 MB. The previous file is renamed using a timestamp, for example `claude_tool_call_2026-09-07_14-32-10.log`, and a new `claude_tool_call.log` is created. Rotated files are not automatically deleted by the logger.
  588. Locations:
  589. - **macOS/Linux**: `~/.claude-server-commander/claude_tool_call.log`
  590. - **Windows**: `%USERPROFILE%\.claude-server-commander\claude_tool_call.log`
  591. ### `tool-history.jsonl` โ€” recent tool-call history
  592. Desktop Commander also keeps a JSON Lines history used by `get_recent_tool_calls`. Each record contains the timestamp, tool name, arguments, duration, and the returned result. This history is loaded from disk on startup, so recent history can survive an MCP server restart.
  593. To keep this history bounded:
  594. - At most the most recent 1,000 calls are kept in memory.
  595. - Stored output is capped at 4 KiB per record; larger outputs are replaced with an omission marker.
  596. - The on-disk file is trimmed when it grows beyond 5 MiB, keeping roughly the newest 4 MiB.
  597. - On startup, a history with more than 2,000 records is rewritten to the most recent 1,000 records.
  598. - `get_recent_tool_calls` and `track_ui_event` are excluded from this JSONL history.
  599. Locations:
  600. - **macOS/Linux**: `~/.claude-server-commander/tool-history.jsonl`
  601. - **Windows**: `%USERPROFILE%\.claude-server-commander\tool-history.jsonl`
  602. ### Remote calls and server-side retention
  603. Calls executed through Remote Desktop Commander are still handled by the local MCP server and use the same local history files above. The Remote Desktop Commander service temporarily stores tool arguments and results in `mcp_remote_calls` so calls can be routed and completed. Terminal rows are automatically swept shortly after completion (eligible for deletion after one minute, with a one-hour creation-time backstop), so they are not kept as a long-term historical server-side audit trail.
  604. These local history files are also separate from Desktop Commander's optional telemetry. The files themselves are not uploaded as telemetry. See [Data Collection & Privacy](#data-collection--privacy) and [PRIVACY.md](PRIVACY.md) for telemetry details.
  605. ## Handling Long-Running Commands
  606. For commands that may take a while:
  607. ## Configuration Management
  608. ### โš ๏ธ Important Security Warnings
  609. > **For comprehensive security information and vulnerability reporting**: See [SECURITY.md](SECURITY.md)
  610. 1. **Known security limitations**: Directory restrictions and command blocking can be bypassed through various methods including symlinks, command substitution, and absolute paths or code execution
  611. 2. **Always change configuration in a separate chat window** from where you're doing your actual work. Claude may sometimes attempt to modify configuration settings (like `allowedDirectories`) if it encounters filesystem access restrictions.
  612. 3. **The `allowedDirectories` setting currently only restricts filesystem operations**, not terminal commands. Terminal commands can still access files outside allowed directories.
  613. 4. **For production security**: Use the [Docker installation](#option-6-docker-installation-๐Ÿณ-โญ-auto-updates-no-nodejs-required) which provides complete isolation from your host system.
  614. ### Configuration Tools
  615. You can manage server configuration using the provided tools:
  616. ```javascript
  617. // Get the entire config
  618. get_config({})
  619. // Set a specific config value
  620. set_config_value({ "key": "defaultShell", "value": "/bin/zsh" })
  621. // Set multiple config values using separate calls
  622. set_config_value({ "key": "defaultShell", "value": "/bin/bash" })
  623. set_config_value({ "key": "allowedDirectories", "value": ["/Users/username/projects"] })
  624. ```
  625. The configuration is saved to `config.json` in the server's working directory and persists between server restarts.
  626. #### Understanding fileWriteLineLimit
  627. The `fileWriteLineLimit` setting controls how many lines can be written in a single `write_file` operation (default: 50 lines). This limit exists for several important reasons:
  628. **Why the limit exists:**
  629. - **AIs are wasteful with tokens**: Instead of doing two small edits in a file, AIs may decide to rewrite the whole thing. We're trying to force AIs to do things in smaller changes as it saves time and tokens
  630. - **Claude UX message limits**: There are limits within one message and hitting "Continue" does not really work. What we're trying here is to make AI work in smaller chunks so when you hit that limit, multiple chunks have succeeded and that work is not lost - it just needs to restart from the last chunk
  631. **Setting the limit:**
  632. ```javascript
  633. // You can set it to thousands if you want
  634. set_config_value({ "key": "fileWriteLineLimit", "value": 1000 })
  635. // Or keep it smaller to force more efficient behavior
  636. set_config_value({ "key": "fileWriteLineLimit", "value": 25 })
  637. ```
  638. **Maximum value**: You can set it to thousands if you want - there's no technical restriction.
  639. **Best practices**:
  640. - Keep the default (50) to encourage efficient AI behavior and avoid token waste
  641. - The system automatically suggests chunking when limits are exceeded
  642. - Smaller chunks mean less work lost when Claude hits message limits
  643. ### Best Practices
  644. 1. **Create a dedicated chat for configuration changes**: Make all your config changes in one chat, then start a new chat for your actual work.
  645. 2. **Be careful with empty `allowedDirectories`**: Setting this to an empty array (`[]`) grants access to your entire filesystem for file operations.
  646. 3. **Use specific paths**: Instead of using broad paths like `/`, specify exact directories you want to access.
  647. 4. **Always verify configuration after changes**: Use `get_config({})` to confirm your changes were applied correctly.
  648. ## Command Line Options
  649. Desktop Commander supports several command line options for customizing behavior:
  650. ### Disable Onboarding
  651. By default, Desktop Commander shows helpful onboarding prompts to new users (those with fewer than 10 tool calls). You can disable this behavior:
  652. ```bash
  653. # Disable onboarding for this session
  654. node dist/index.js --no-onboarding
  655. # Or if using npm scripts
  656. npm run start:no-onboarding
  657. # For npx installations, modify your claude_desktop_config.json:
  658. {
  659. "mcpServers": {
  660. "desktop-commander": {
  661. "command": "npx",
  662. "args": [
  663. "-y",
  664. "@wonderwhy-er/desktop-commander@latest",
  665. "--no-onboarding"
  666. ]
  667. }
  668. }
  669. }
  670. ```
  671. **When onboarding is automatically disabled:**
  672. - When the MCP client name is set to "desktop-commander"
  673. - When using the `--no-onboarding` flag
  674. - After users have used onboarding prompts or made 10+ tool calls
  675. **Debug information:**
  676. The server will log when onboarding is disabled: `"Onboarding disabled via --no-onboarding flag"`
  677. ## Using Different Shells
  678. You can specify which shell to use for command execution:
  679. ```javascript
  680. // Using default shell (bash or system default)
  681. execute_command({ "command": "echo $SHELL" })
  682. // Using zsh specifically
  683. execute_command({ "command": "echo $SHELL", "shell": "/bin/zsh" })
  684. // Using bash specifically
  685. execute_command({ "command": "echo $SHELL", "shell": "/bin/bash" })
  686. ```
  687. This allows you to use shell-specific features or maintain consistent environments across commands.
  688. 1. `execute_command` returns after timeout with initial output
  689. 2. Command continues in background
  690. 3. Use `read_output` with PID to get new output
  691. 4. Use `force_terminate` to stop if needed
  692. ## Debugging
  693. If you need to debug the server, you can install it in debug mode:
  694. ```bash
  695. # Using npx
  696. npx @wonderwhy-er/desktop-commander@latest setup --debug
  697. # Or if installed locally
  698. npm run setup:debug
  699. ```
  700. This will:
  701. 1. Configure Claude to use a separate "desktop-commander" server
  702. 2. Enable Node.js inspector protocol with `--inspect-brk=9229` flag
  703. 3. Pause execution at the start until a debugger connects
  704. 4. Enable additional debugging environment variables
  705. To connect a debugger:
  706. - In Chrome, visit `chrome://inspect` and look for the Node.js instance
  707. - In VS Code, use the "Attach to Node Process" debug configuration
  708. - Other IDEs/tools may have similar "attach" options for Node.js debugging
  709. Important debugging notes:
  710. - The server will pause on startup until a debugger connects (due to the `--inspect-brk` flag)
  711. - If you don't see activity during debugging, ensure you're connected to the correct Node.js process
  712. - Multiple Node processes may be running; connect to the one on port 9229
  713. - The debug server is identified as "desktop-commander-debug" in Claude's MCP server list
  714. Troubleshooting:
  715. - If Claude times out while trying to use the debug server, your debugger might not be properly connected
  716. - When properly connected, the process will continue execution after hitting the first breakpoint
  717. - You can add additional breakpoints in your IDE once connected
  718. ## Model Context Protocol Integration
  719. This project extends the MCP Filesystem Server to enable:
  720. - Local server support in Claude Desktop
  721. - Full system command execution
  722. - Process management
  723. - File operations
  724. - Code editing with search/replace blocks
  725. Created as part of exploring Claude MCPs: https://youtube.com/live/TlbjFDbl5Us
  726. ## Support Desktop Commander
  727. <div align="center">
  728. <h3>๐Ÿ“ข SUPPORT THIS PROJECT</h3>
  729. <p><strong>Desktop Commander MCP is free and open source, but needs your support to thrive!</strong></p>
  730. <div style="background-color: #f8f9fa; padding: 15px; border-radius: 10px; margin: 20px 0; border: 2px solid #007bff;">
  731. <p>Our philosophy is simple: we don't want you to pay for it if you're not successful. But if Desktop Commander contributes to your success, please consider contributing to ours.</p>
  732. <p><strong>Ways to support:</strong></p>
  733. <ul style="list-style-type: none; padding: 0;">
  734. <li>๐ŸŒŸ <a href="https://github.com/sponsors/wonderwhy-er"><strong>GitHub Sponsors</strong></a> - Recurring support</li>
  735. <li>โ˜• <a href="https://www.buymeacoffee.com/wonderwhyer"><strong>Buy Me A Coffee</strong></a> - One-time contributions</li>
  736. <li>๐Ÿ’– <a href="https://www.patreon.com/c/EduardsRuzga"><strong>Patreon</strong></a> - Become a patron and support us monthly</li>
  737. <li>โญ <a href="https://github.com/wonderwhy-er/DesktopCommanderMCP"><strong>Star on GitHub</strong></a> - Help others discover the project</li>
  738. </ul>
  739. </div>
  740. </div>
  741. ### โค๏ธ Supporters Hall of Fame
  742. Generous supporters are featured here. Thank you for helping make this project possible!
  743. <div align="center">
  744. <table>
  745. <tr>
  746. <td align="center">
  747. <a href="https://github.com/jonrichards">
  748. <img src="https://github.com/jonrichards.png" width="100px;" alt="Jon Richards"/>
  749. <br />
  750. <sub><b>Jon Richards</b></sub>
  751. </a>
  752. </td>
  753. <td align="center">
  754. <a href="https://github.com/stepanic">
  755. <img src="https://github.com/stepanic.png" width="100px;" alt="Matija Stepanic"/>
  756. <br />
  757. <sub><b>Matija Stepanic</b></sub>
  758. </a>
  759. </td>
  760. </tr>
  761. </table>
  762. </div>
  763. <details>
  764. <summary><strong>Why your support matters</strong></summary>
  765. <p>Your support allows us to:</p>
  766. <ul>
  767. <li>Continue active development and maintenance</li>
  768. <li>Add new features and integrations</li>
  769. <li>Improve compatibility across platforms</li>
  770. <li>Provide better documentation and examples</li>
  771. <li>Build a stronger community around the project</li>
  772. </ul>
  773. </details>
  774. ## Website
  775. Visit our official website at [https://desktopcommander.app/](https://desktopcommander.app/) for the latest information, documentation, and updates.
  776. ## Media
  777. Learn more about this project through these resources:
  778. ### Article
  779. [Claude with MCPs replaced Cursor & Windsurf. How did that happen?](https://wonderwhy-er.medium.com/claude-with-mcps-replaced-cursor-windsurf-how-did-that-happen-c1d1e2795e96) - A detailed exploration of how Claude with Model Context Protocol capabilities is changing developer workflows.
  780. ### Video
  781. [Claude Desktop Commander Video Tutorial](https://www.youtube.com/watch?v=ly3bed99Dy8) - Watch how to set up and use the Commander effectively.
  782. ### Publication at AnalyticsIndiaMag
  783. [![analyticsindiamag.png](testemonials%2Fanalyticsindiamag.png)
  784. This Developer Ditched Windsurf, Cursor Using Claude with MCPs](https://analyticsindiamag.com/ai-features/this-developer-ditched-windsurf-cursor-using-claude-with-mcps/)
  785. ### Community
  786. Join our [Discord server](https://discord.gg/kQ27sNnZr7) to get help, share feedback, and connect with other users.
  787. ## Testimonials
  788. [![It's a life saver! I paid Claude + Cursor currently which I always feel it's kind of duplicated. This solves the problem ultimately. I am so happy. Thanks so much. Plus today Claude has added the web search support. With this MCP + Internet search, it writes the code with the latest updates. It's so good when Cursor doesn't work sometimes or all the fast requests are used.](https://raw.githubusercontent.com/wonderwhy-er/ClaudeComputerCommander/main/testemonials/img.png) https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg
  789. ](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg
  790. )
  791. [![This is the first comment I've ever left on a youtube video, THANK YOU! I've been struggling to update an old Flutter app in Cursor from an old pre null-safety version to a current version and implemented null-safety using Claude 3.7. I got most of the way but had critical BLE errors that I spent days trying to resolve with no luck. I tried Augment Code but it didn't get it either. I implemented your MCP in Claude desktop and was able to compare the old and new codebase fully, accounting for the updates in the code, and fix the issues in a couple of hours. A word of advice to people trying this, be sure to stage changes and commit when appropriate to be able to undo unwanted changes. Amazing!](https://raw.githubusercontent.com/wonderwhy-er/ClaudeComputerCommander/main/testemonials/img_1.png)
  792. https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg
  793. )
  794. [![Great! I just used Windsurf, bought license a week ago, for upgrading old fullstack socket project and it works many times good or ok but also many times runs away in cascade and have to revert all changes losing hundereds of cascade tokens. In just a week down to less than 100 tokens and do not want to buy only 300 tokens for 10$. This Claude MCP ,bought claude Pro finally needed but wanted very good reason to also have next to ChatGPT, and now can code as much as I want not worrying about token cost.
  795. Also this is much more than code editing it is much more thank you for great video!](https://raw.githubusercontent.com/wonderwhy-er/ClaudeComputerCommander/main/testemonials/img_2.png)
  796. https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg)
  797. [![it is a great tool, thank you, I like using it, as it gives claude an ability to do surgical edits, making it more like a human developer.](https://raw.githubusercontent.com/wonderwhy-er/ClaudeComputerCommander/main/testemonials/img_3.png)
  798. https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg)
  799. [![You sir are my hero. You've pretty much summed up and described my experiences of late, much better than I could have. Cursor and Windsurf both had me frustrated to the point where I was almost yelling at my computer screen. Out of whimsy, I thought to myself why not just ask Claude directly, and haven't looked back since.
  800. Claude first to keep my sanity in check, then if necessary, engage with other IDEs, frameworks, etc. I thought I was the only one, glad to see I'm not lol.
  801. 33
  802. 1](https://raw.githubusercontent.com/wonderwhy-er/ClaudeComputerCommander/main/testemonials/img_4.png)
  803. https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e](https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e)
  804. If you find this project useful, please consider giving it a โญ star on GitHub! This helps others discover the project and encourages further development.
  805. We welcome contributions from the community! Whether you've found a bug, have a feature request, or want to contribute code, here's how you can help:
  806. - **Found a bug?** Open an issue at [github.com/wonderwhy-er/DesktopCommanderMCP/issues](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues)
  807. - **Have a feature idea?** Submit a feature request in the issues section
  808. - **Want to contribute code?** Fork the repository, create a branch, and submit a pull request
  809. - **Questions or discussions?** Start a discussion in the GitHub Discussions tab
  810. All contributions, big or small, are greatly appreciated!
  811. If you find this tool valuable for your workflow, please consider [supporting the project](https://www.buymeacoffee.com/wonderwhyer).
  812. ## Frequently Asked Questions
  813. Here are answers to some common questions. For a more comprehensive FAQ, see our [detailed FAQ document](FAQ.md).
  814. ### What is Desktop Commander?
  815. It's an MCP tool that enables Claude Desktop to access your file system and terminal, turning Claude into a versatile assistant for coding, automation, codebase exploration, and more.
  816. ### How is this different from Cursor/Windsurf?
  817. Unlike IDE-focused tools, Claude Desktop Commander provides a solution-centric approach that works with your entire OS, not just within a coding environment. Claude reads files in full rather than chunking them, can work across multiple projects simultaneously, and executes changes in one go rather than requiring constant review.
  818. ### Do I need to pay for API credits?
  819. No. This tool works with Claude Desktop's standard Pro subscription ($20/month), not with API calls, so you won't incur additional costs beyond the subscription fee.
  820. ### Does Desktop Commander automatically update?
  821. Yes, when installed through npx or Smithery, Desktop Commander automatically updates to the latest version when you restart Claude. No manual update process is needed.
  822. ### What are the most common use cases?
  823. - Exploring and understanding complex codebases
  824. - Generating diagrams and documentation
  825. - Automating tasks across your system
  826. - Working with multiple projects simultaneously
  827. - Making surgical code changes with precise control
  828. ### I'm having trouble installing or using the tool. Where can I get help?
  829. Join our [Discord server](https://discord.gg/kQ27sNnZr7) for community support, check the [GitHub issues](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues) for known problems, or review the [full FAQ](FAQ.md) for troubleshooting tips. You can also visit our [website FAQ section](https://desktopcommander.app#faq) for a more user-friendly experience. If you encounter a new issue, please consider [opening a GitHub issue](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues/new) with details about your problem.
  830. ### How do I report security vulnerabilities?
  831. Please create a [GitHub Issue](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues) with detailed information about any security vulnerabilities you discover. See our [Security Policy](SECURITY.md) for complete guidelines on responsible disclosure.
  832. ## Data Collection & Privacy
  833. Desktop Commander collects limited, pseudonymous telemetry to improve the tool. We do not collect file contents, file paths, or command arguments as telemetry.
  834. This is separate from the [local tool history and audit logs](#local-tool-history-and-audit-logs), which stay on the machine running Desktop Commander and may contain tool arguments and bounded result previews.
  835. **Opt-out:** Ask Claude to "disable Desktop Commander telemetry" or set `"telemetryEnabled": false` in your config.
  836. For complete details, see our [Privacy Policy](PRIVACY.md).
  837. ## Verifications
  838. [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/25ff7a06-58bc-40b8-bd79-ebb715140f1a)
  839. ## License
  840. MIT
scripts/remote/remote-windows.cmd ยท Bundled script ยท 10 lines ยท 1 finding marked
  1. @echo off
  2. REM Download and run the public launcher in a child PowerShell using its TLS defaults.
  3. REM The launcher checks Node.js, asks once before installing it if missing, and starts Remote Desktop Commander.
  4. REM The PowerShell launcher adds support details to its errors; do not repeat them here.
  5. REM Keep the PowerShell payload on one line to preserve CMD quoting and pipe handling.
  6. powershell.exe -NoProfile -Command "irm -ErrorAction Stop https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/main/scripts/remote/remote-windows.ps1 | iex"
    • Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
    • Line 7 on GitHub
  7. REM Return PowerShell's exit status without closing the caller's CMD session.
  8. exit /b %ERRORLEVEL%
scripts/remote/remote-windows.ps1 ยท Bundled script ยท 213 lines ยท 1 finding marked
  1. # Run in a child scope: Invoke-Expression must not close or reconfigure the caller's shell.
  2. & {
  3. # Add support details once to any final error, including platform and cleanup failures.
  4. trap {
  5. # A stopped pipeline is an interruption, such as Ctrl+C, rather than an installation failure.
  6. if ($_.Exception -is [System.Management.Automation.PipelineStoppedException]) {
  7. break
  8. }
  9. $_.ErrorDetails = [System.Management.Automation.ErrorDetails]::new(
  10. "$($_.ToString())`n`nIf you have any questions or problems with installation, email support@desktopcommander.app. We're happy to help."
  11. )
  12. # Rethrow the original error record to preserve failure status and caller control.
  13. throw $_
  14. }
  15. # Prepare: stop on errors, check the platform, and save settings to restore later.
  16. $ErrorActionPreference = 'Stop'
  17. $ProgressPreference = 'SilentlyContinue'
  18. if ($env:OS -ne 'Windows_NT') {
  19. throw 'Please use the macOS or Linux command for this computer.'
  20. }
  21. $originalPath = $env:PATH
  22. $originalTls = [Net.ServicePointManager]::SecurityProtocol
  23. $tempDir = $null
  24. try {
  25. # Choose the installer for Windows itself, even from a 32-bit PowerShell.
  26. $architecture = $env:PROCESSOR_ARCHITECTURE
  27. if ($env:PROCESSOR_ARCHITEW6432) {
  28. $architecture = $env:PROCESSOR_ARCHITEW6432
  29. }
  30. switch ($architecture) {
  31. 'AMD64' {
  32. $arch = 'x64'
  33. }
  34. 'ARM64' {
  35. $arch = 'arm64'
  36. }
  37. default {
  38. $arch = $null
  39. }
  40. }
  41. if ($arch) {
  42. # Pin the manual link to https://nodejs.org/dist/v24.22.1/SHASUMS256.txt so guidance makes no network requests.
  43. $manualDownloadUrl = "https://nodejs.org/dist/v24.22.1/node-v24.22.1-$arch.msi"
    • Dismissed after review: Links to a Windows program from code, which is how droppers fetch their payload
    • Line 46 on GitHub
  44. }
  45. else {
  46. $manualDownloadUrl = 'https://nodejs.org/en/download'
  47. }
  48. # Find existing Node.js before downloading anything.
  49. if (-not (Get-Command node.exe -CommandType Application -ErrorAction SilentlyContinue)) {
  50. # A previous installer may have updated PATH after this terminal was opened.
  51. # Keep this terminal's command priority when adding the persisted paths.
  52. $env:PATH = @(
  53. $originalPath,
  54. [Environment]::GetEnvironmentVariable('Path', 'Machine'),
  55. [Environment]::GetEnvironmentVariable('Path', 'User')
  56. ) -join ';'
  57. }
  58. if (-not (Get-Command node.exe -CommandType Application -ErrorAction SilentlyContinue)) {
  59. # Confirm before downloading or installing anything; Enter chooses Yes, but missing input does not.
  60. Write-Host 'Remote Desktop Commander needs Node.js, which could not be found on this computer.'
  61. Write-Host
  62. Write-Host 'If you choose Yes, we will install Node.js 24, then download and start Remote Desktop Commander.'
  63. Write-Host
  64. try {
  65. $installConsent = Read-Host 'Would you like to continue? Type Yes or No (press Enter for Yes)'
  66. }
  67. catch {
  68. throw 'We could not read your answer. Please open PowerShell or Command Prompt and run this command again.'
  69. }
  70. Write-Host
  71. if ($null -eq $installConsent -or $installConsent -notin @('', 'y', 'yes')) {
  72. Write-Host 'Node.js could not be found. You can choose either option:'
  73. Write-Host
  74. if ($arch) {
  75. Write-Host '1. To install Node.js yourself, use this download link:'
  76. Write-Host
  77. Write-Host $manualDownloadUrl
  78. Write-Host
  79. Write-Host 'Open the downloaded file to install Node.js. Then open a new window and run the command below.'
  80. }
  81. else {
  82. Write-Host '1. Choose a Node.js download for your computer here:'
  83. Write-Host
  84. Write-Host $manualDownloadUrl
  85. }
  86. Write-Host
  87. Write-Host '2. If Node.js is already installed, open a new PowerShell or Command Prompt window and run:'
  88. Write-Host
  89. Write-Host 'npx.cmd @wonderwhy-er/desktop-commander@latest remote'
  90. return
  91. }
  92. if (-not $arch) {
  93. throw "This computer cannot use the automatic Node.js installer. Please install Node.js from $manualDownloadUrl, then run this command again."
  94. }
  95. # Download: enable TLS for older PowerShell and use a temporary directory.
  96. [Net.ServicePointManager]::SecurityProtocol = $originalTls -bor [Net.SecurityProtocolType]::Tls12
  97. $tempDir = Join-Path ([IO.Path]::GetTempPath()) ('dc-node-' + [Guid]::NewGuid().ToString('N'))
  98. New-Item -ItemType Directory -Path $tempDir | Out-Null
  99. # The manifest supplies the checksum, file name, and exact Node 24 version.
  100. try {
  101. $manifest = (
  102. Invoke-WebRequest -UseBasicParsing `
  103. 'https://nodejs.org/dist/latest-v24.x/SHASUMS256.txt'
  104. ).Content
  105. }
  106. catch {
  107. throw 'We could not download Node.js. Check your internet connection and run this command again.'
  108. }
  109. $entry = [regex]::Match(
  110. $manifest,
  111. # Node SHASUMS256.txt uses 256-bit SHA-256: 256 / 4 bits per hex digit = 64 characters.
  112. "(?m)^([a-f0-9]{64})\s+(node-(v24\.\d+\.\d+)-$arch\.msi)\r?$"
  113. )
  114. if (-not $entry.Success) {
  115. throw "We could not find a Node.js installer for this computer. Please install Node.js from $manualDownloadUrl, then run this command again."
  116. }
  117. # Regex groups contain the checksum (1), full installer file name (2), and version (3).
  118. $package = $entry.Groups[2].Value
  119. $version = $entry.Groups[3].Value
  120. $packagePath = Join-Path $tempDir $package
  121. try {
  122. Invoke-WebRequest -UseBasicParsing `
  123. "https://nodejs.org/dist/$version/$package" `
  124. -OutFile $packagePath
  125. }
  126. catch {
  127. throw 'We could not download Node.js. Check your internet connection and run this command again.'
  128. }
  129. # Verify the downloaded bytes before asking Windows to install them.
  130. if ((Get-FileHash -LiteralPath $packagePath -Algorithm SHA256).Hash -ne $entry.Groups[1].Value) {
  131. throw 'The Node.js download could not be verified. Please run this command again.'
  132. }
  133. # Install: use the standard Node.js destination and wait for MSI to finish.
  134. Write-Host 'Installing Node.js...'
  135. # Elevate only MSI; /norestart prevents reboots: https://learn.microsoft.com/windows/win32/msi/standard-installer-command-line-options
  136. try {
  137. $installer = Start-Process `
  138. -FilePath (Join-Path $env:WINDIR 'System32\msiexec.exe') `
  139. -ArgumentList "/i `"$packagePath`" /passive /norestart" `
  140. -Verb RunAs `
  141. -Wait `
  142. -PassThru
  143. }
  144. catch {
  145. throw 'Node.js was not installed. Please run this command again and allow the installer to continue.'
  146. }
  147. # MSI success codes 1641 (reboot initiated) and 3010 (reboot required): https://learn.microsoft.com/windows/win32/msi/error-codes
  148. if ($installer.ExitCode -in @(1641, 3010)) {
  149. Write-Host 'Node.js is installed. Restart your computer, then run this command again.'
  150. return
  151. }
  152. if ($installer.ExitCode -ne 0) {
  153. throw "Node.js could not be installed. Please install it from $manualDownloadUrl, then run this command again."
  154. }
  155. # Load the installer's PATH update so this same invocation can start Node.js.
  156. $env:PATH = @(
  157. $originalPath,
  158. [Environment]::GetEnvironmentVariable('Path', 'Machine'),
  159. [Environment]::GetEnvironmentVariable('Path', 'User')
  160. ) -join ';'
  161. if (-not (Get-Command node.exe -CommandType Application -ErrorAction SilentlyContinue)) {
  162. throw 'Node.js is installed. Please open a new PowerShell or Command Prompt window and run this command again.'
  163. }
  164. }
  165. # Validate: both existing and newly installed Node.js must meet the package requirement.
  166. & node.exe -e "
  167. const [major, minor] = process.versions.node.split('.').map(Number);
  168. process.exit(
  169. // Package engines require Node >=22.12.0: https://www.npmjs.com/package/@wonderwhy-er/desktop-commander
  170. major > 22 || (major === 22 && minor >= 12) ? 0 : 1
  171. );
  172. "
  173. if ($LASTEXITCODE -ne 0) {
  174. throw "Your Node.js version is too old. Please install a newer version from $manualDownloadUrl, then run this command again."
  175. }
  176. if (-not (Get-Command npx.cmd -CommandType Application -ErrorAction SilentlyContinue)) {
  177. throw "Your Node.js installation is incomplete. Please reinstall Node.js from $manualDownloadUrl, then run this command again."
  178. }
  179. # Start Desktop Commander in this shell, without elevating the device command.
  180. Write-Host 'Starting Remote Desktop Commander. To stop it, press Ctrl+C. To start it again, run this command again.'
  181. & npx.cmd --yes '@wonderwhy-er/desktop-commander@latest' remote
  182. # Node signal exits use 128 + signal number: SIGINT (2) gives 130; https://nodejs.org/api/process.html#exit-codes
  183. # Windows Ctrl+C is STATUS_CONTROL_C_EXIT (0xC000013A); https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55
  184. if ($LASTEXITCODE -in @(130, 0xC000013A)) {
  185. return
  186. }
  187. if ($LASTEXITCODE -ne 0) {
  188. throw 'Remote Desktop Commander stopped unexpectedly. Please run this command again.'
  189. }
  190. }
  191. finally {
  192. # Restore the caller's settings and remove downloads, including after errors or Ctrl+C.
  193. $env:PATH = $originalPath
  194. [Net.ServicePointManager]::SecurityProtocol = $originalTls
  195. if ($tempDir -and (Test-Path -LiteralPath $tempDir)) {
  196. Remove-Item -LiteralPath $tempDir -Recurse -Force
  197. }
  198. }
  199. }

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If itโ€™s helped, pass it on.