Skip to content

Guide · Open source

How to use DesktopCommanderMCP: install, setup and tips

Updated · written with AI from the project's own documentation and checked against our catalogue data

DesktopCommanderMCP, published as Desktop Commander, is an open-source MCP server that connects an AI assistant such as Claude Desktop to your computer. It can run terminal commands, manage processes, search folders and edit files, including targeted text replacements. This guide covers installation, what the tool can do, how to use it safely, and when another tool is a better fit.

Desktop Commanderwonderwhy-er/DesktopCommanderMCP · ★ 10.2k · MIT

Quick start

  1. 1Confirm Node.js is installed. Desktop Commander's npx install method requires Node.js. Check that it is available on your computer before you start.
  2. 2Run the setup command. Open a terminal and run npx @wonderwhy-er/desktop-commander@latest setup. It configures the server for Claude Desktop.
  3. 3Restart Claude. Close and reopen Claude Desktop so it loads the new server.
  4. 4Choose a project folder. Start with a specific project folder rather than your whole system, so the assistant only sees the files you intend it to use.
  5. 5Ask for a task. Describe the task in plain language, such as searching a folder or editing a file, and review what the assistant proposes.
  6. 6Review the guardrails. Read SECURITY.md in the repository, since the project says it is not a sandbox.

What Desktop Commander does

Desktop Commander is an MCP (Model Context Protocol) server. It gives an AI assistant controlled access to your local machine. It is built on top of the MCP Filesystem Server and adds search and replace file editing on top of it.

The project's README lists capabilities including executing terminal commands with output streaming, process management (list and kill processes), searching files and content, and surgical text replacements for small changes or full file rewrites for major changes.

  • Run terminal commands and manage long-running processes such as dev servers or database sessions
  • Search folders and file content with vscode-ripgrep based recursive search
  • Read and edit text, Excel (.xlsx, .xls, .xlsm), PDF and DOCX files
  • Read the end of a file with negative offsets, similar to Unix tail
  • Keep a local record of tool calls on the machine running it

Install Desktop Commander for Claude Desktop

The simplest route is the npx setup command from the README. The prerequisite is Node.js. Open a terminal and run the command below. It installs and configures the server for Claude Desktop.

After it finishes, restart Claude if it is running. The README notes that this install method updates automatically when you restart Claude.

To remove it, the README gives this command. You can also remove the entry from your claude_desktop_config.json file.

  • Config file on Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Config file on Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Config file on Linux: ~/.config/Claude/claude_desktop_config.json
  • Setup option --no-onboarding disables onboarding prompts for new users
  • Setup option --debug enables Node.js inspector debugging
npx @wonderwhy-er/desktop-commander@latest setup

Other ways to install it

The README lists several other options. A bash script installer is provided for macOS and installs Node.js if needed. Smithery offers an install with a provided key after you choose Claude Desktop. You can also add a JSON entry to claude_desktop_config.json by hand, or clone the repository and run its setup script.

Manual cloning is the only option the README marks as requiring manual updates. Docker is also listed for users who do not have Node.js installed, and it runs in a container.

  • npx setup: requires Node.js, auto-updates
  • macOS bash installer: installs Node.js if needed, auto-updates
  • Smithery: requires Node.js, auto-updates
  • Manual config entry: requires Node.js, auto-updates
  • Git clone: requires Node.js, manual updates
  • Docker: no Node.js required, auto-updates
npx -y @wonderwhy-er/desktop-commander@latest

Use it safely: understand the guardrails

The README states plainly that Desktop Commander is not a sandbox. It includes safety guardrails: symlink traversal prevention on file operations, a command blocklist for accidental execution, and optional Docker isolation. Read SECURITY.md in the repository before you grant access to important folders.

Treat the assistant as having access to your files and shell. Start with a project folder rather than your whole home directory, and review commands it proposes.

  • Guardrails reduce accidents; they are not a security boundary
  • The command blocklist is for accidental execution
  • Docker isolation is available if you want a separated environment

Edit and search files with Claude

Ask Claude in plain language to find text, change a function, or read a spreadsheet. The README describes two editing modes: surgical text replacements for small changes, and full file rewrites for major changes. Pattern-based replacements and multi-file edits are also listed.

For long command output, the README mentions process output pagination with offset and length controls, which helps avoid overflowing the assistant's context.

What people use it for

  • Editing source code in a local project with an assistant that can run commands
  • Running and monitoring a development server or a database session
  • Reading, searching or updating Excel, PDF or Word files with an assistant
  • Searching a folder recursively for text or code

Frequently asked questions

Is DesktopCommanderMCP free?

The project is open source under the MIT licence, according to its repository. The README says it uses host client subscriptions instead of API token costs, but you still need a Claude Desktop setup of your own.

What do I need to install DesktopCommanderMCP?

The npx install method requires Node.js. The Docker option is listed for users who do not have Node.js installed.

How do I install DesktopCommanderMCP for Claude Desktop?

Run npx @wonderwhy-er/desktop-commander@latest setup in a terminal, then restart Claude if it is running. The README lists this as the main install route.

How do I uninstall Desktop Commander?

Run npx @wonderwhy-er/desktop-commander@latest remove, or remove the desktop-commander entry from your claude_desktop_config.json file and delete any cloned directory.

Is Desktop Commander safe to use?

The README says it is not a sandbox. It adds guardrails such as symlink traversal prevention and a command blocklist, so limit the folders you expose and review the security notes before use.

How does it compare with MCP Filesystem Server or Aider?

Desktop Commander is built on the MCP Filesystem Server and adds search and replace editing, terminal control and process management. Aider and Open Interpreter are separate projects, so compare them on the features you need.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Desktop Commander suits developers and Claude Desktop users who want an assistant to run commands and edit files in a local project, and it is a practical choice for long-running processes. It is not suited to people who need a strict security boundary, to non-technical users uneasy about giving an AI shell access, or to teams needing a managed enterprise deployment.

Install options & downloads