Run terminal commands and manage files via AI
This tool allows AI models like Claude to directly handle the computer's terminal, search or modify files, and interact with running processes. It is a Model Context Protocol (MCP) based server that acts as a bridge, enabling AI to perform actual tasks on the user's computer. It goes beyond the limits of existing AI editors by using host client subscriptions to handle complex development and automation tasks without API token costs.
Direct desktop environment control
This tool enables AI to do more than just generate code; it executes actual commands on the user's computer and verifies the results. It runs terminal commands, sends input to running processes, and searches for and modifies text and data within the file system. Specifically, it can execute Python, Node.js, and R code immediately from memory without saving it to a file, allowing for data analysis or simple script testing. It can also read, write, and edit Excel, PDF, and Word documents directly without external tools, enabling AI to handle document-based tasks.
Safety mechanisms and remote control
To reduce the risks associated with AI controlling a computer, it provides several safety mechanisms. It prevents unauthorized access via symbolic links during file manipulation and supports a blacklist feature to block dangerous commands. If complete isolation is required, it can run inside a Docker container, allowing work in an environment fully separated from the host system. Additionally, the Remote MCP feature allows commands to be executed on the user's local computer from ChatGPT or the web version of Claude, maintaining security through OAuth authentication and encrypted communication channels.
Installation and initial setup
To install it on Claude Desktop, run the npx @wonderwhy-er/desktop-commander@latest setup command in the terminal. This command automatically handles dependency installation, server building, and modifying the Claude configuration file; after installation is complete, Claude must be restarted. For those who prefer Docker or have environments without Node.js, you can use the Docker installation script or pull the image from Docker Hub. It can also be used with other MCP-compatible clients such as Cursor, VS Code, and Windsurf by adding a JSON configuration.
Pre-use considerations
Since this tool grants AI the permission to execute system commands, it is most effective when used with a trusted AI service. While the allowedDirectories setting can restrict the file system paths accessible to the AI, terminal commands can bypass this restriction to access other paths, so caution is required. Using Docker isolation mode can minimize these risks. When using the remote control feature, it is designed to receive commands only when the local device is running, and the OAuth authentication process must be completed. You can select the auto-update option according to your usage patterns and remove it cleanly using the remove command if needed.