Skip to content

Menu

Desktop Commander MCP Server logo

Desktop Commander MCP Server

Published

At a glance

Category
Code & Git
Watch out for
It can run arbitrary terminal commands, so the allowed directories and blocklist can be bypassed by design, for example through absolute paths or another interpreter.

Desktop Commander is an open-source MCP server maintained in the wonderwhy-er/DesktopCommanderMCP repo and shipped on npm as @wonderwhy-er/desktop-commander (version 0.3.4 at the time of writing). It runs locally over stdio and gives an AI client a terminal, process control and file editing on your own machine. The README describes it as built on top of the reference MCP Filesystem Server, with search-and-replace editing added.

Beyond plain text files it reads and writes Excel workbooks, PDFs and Word documents, and it can run Python, Node.js or R code in memory. A remote mode lets ChatGPT, Claude on the web and other remote clients reach a Desktop Commander instance on your machine. It is also listed in the official MCP registry as io.github.wonderwhy-er/desktop-commander.

This is a privileged tool by design. Its SECURITY.md is blunt: allowed directories, the command blocklist and symlink checks are guardrails against accidents, not a security boundary. If the agent must not reach the rest of your machine, run it in Docker or a VM.

How it connects

Your AI app

An assistant or agent that supports MCP

Desktop Commander MCP Server

Runs as

  • npx (Node.js)
  • Docker

Gives the agent

  • Terminal and processes
  • File operations
  • Search
  • Targeted editing
  • Document output
  • Configuration and history

Desktop Commander

The data or system the tools act on

Your AI app talks to Desktop Commander MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Terminal and processes
start_process launches programs, interact_with_process sends input to running ones such as SSH sessions or database shells, and read_process_output pages through their output. list_sessions, force_terminate, list_processes and kill_process manage what is running.
File operations
read_file, read_multiple_files, write_file, create_directory, list_directory, move_file and get_file_info cover the usual file work, with read_file also handling URLs, Excel files and PDFs with pagination.
Search
start_search streams file name or content matches, including Excel content, with get_more_search_results, stop_search and list_searches to page through and manage searches.
Targeted editing
edit_block applies surgical text replacements, with an expected_replacements parameter for multiple matches, and does range-based cell updates in Excel files.
Document output
write_pdf creates PDFs from markdown or inserts and deletes pages in existing ones; the README also lists DOCX reading, editing and markdown-to-DOCX conversion.
Configuration and history
get_config and set_config_value manage settings such as blockedCommands, defaultShell, allowedDirectories and telemetryEnabled. get_recent_tool_calls returns locally stored call history.

Setting it up

For Claude Desktop, the quickest documented route is npx @wonderwhy-er/desktop-commander@latest setup, then a restart of Claude; npx @wonderwhy-er/desktop-commander@latest remove uninstalls it. You can instead add an entry named desktop-commander to claude_desktop_config.json with command npx and args -y and @wonderwhy-er/desktop-commander@latest. That same JSON block goes in ~/.cursor/mcp.json or a project .cursor/mcp.json for Cursor, and the README has matching sections for Windsurf, VS Code with GitHub Copilot, Codex and Gemini CLI. In Claude Code, run claude mcp add --scope user desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest. Node.js is required for the npx routes. If you want isolation, the Docker option runs the image mcp/desktop-commander:latest with docker run -i --rm and only the folders you mount with -v are visible to it.

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • Start a dev server with start_process, watch its output with read_process_output, and kill it when a test run finishes.
  • Make small fixes across a codebase with start_search to find call sites and edit_block to change them in place.
  • Load a CSV or Excel export with read_file and analyse it by running Python in memory without saving a script.
  • Keep an SSH or database shell open with interact_with_process and run follow-up commands in the same session.
  • Turn a markdown report into a PDF with write_pdf.

Limitations and things to watch

  • It can run arbitrary terminal commands, so the allowed directories and blocklist can be bypassed by design, for example through absolute paths or another interpreter.
  • The server assumes the connected AI client is trusted and does not try to tell a real user request from prompt injection.
  • Real isolation requires Docker, a VM or a separate machine; the Docker image without mounts has no access to your files.
  • It collects limited pseudonymous telemetry by default, which you can turn off by setting telemetryEnabled to false.
  • Tool calls and their arguments are logged to local files on the machine running the server, so sensitive commands end up in that history.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…