← Back to directory
D

Desktop Commander

Community
Search, update, manage files and run terminal commands with AI
GitHub source repository ↗
★ 9.4k Stars Category · Dev Tools Very popular Source revision 9bd8422dd676
54FMRS · D
Reliability
7/20
Security and permissions
6/20
Maintenance
12/20
Documentation
15/20
Setup experience
14/20

Desktop Commander is a powerful MCP server providing terminal control, file management, and process management. It has broad client support and rich file format support (Excel, PDF, DOCX). However, users must be aware of security limitations and follow recommendations to use Docker isolation for stronger security.

Read the FMRS scoring method →

Desktop Commander is an MCP server that gives AI like Claude terminal control, file system search, and diff file editing capabilities. Built on top of the MCP Filesystem Server, it supports remote AI control, file preview UI, enhanced terminal interaction, in-memory code execution (Python/Node.js/R), native Excel/PDF/DOCX support, process management, audit logging, and safety guardrails (symlink protection, command blocklist, Docker isolation).

Tools

get_config
Get the complete server configuration as JSON, including blockedCommands, defaultShell, allowedDirectories, fileReadLineLimit, fileWriteLineLimit, telemetryEnabled.
set_config_value
Set a specific configuration value by key, such as blockedCommands, defaultShell, allowedDirectories, fileReadLineLimit, fileWriteLineLimit, telemetryEnabled.
start_process
Start programs with smart detection of when they're ready for input.
interact_with_process
Send commands to running programs and get responses.
read_process_output
Read output from running processes.
force_terminate
Force terminate a running terminal session.
list_sessions
List all active terminal sessions.
list_processes
List all running processes with detailed information.
kill_process
Terminate a running process by PID.
read_file
Read contents from local filesystem, URLs, Excel files (.xlsx, .xls, .xlsm), and PDFs with line/page-based pagination.
read_multiple_files
Read multiple files simultaneously.
write_file
Write file contents with options for rewrite or append mode. Supports Excel files (JSON 2D array format). For PDFs, use write_pdf.
write_pdf
Create new PDF files from markdown or modify existing PDFs (insert/delete pages). Supports HTML/CSS styling and SVG graphics.
create_directory
Create a new directory or ensure it exists.
list_directory
Get detailed recursive listing of files and directories (supports depth parameter, default depth=2).
move_file
Move or rename files and directories.
start_search
Start streaming search for files by name or content patterns (searches text files and Excel content).
get_more_search_results
Get paginated results from active search with offset support.
stop_search
Stop an active search gracefully.
list_searches
List all active search sessions.
get_file_info
Retrieve detailed metadata about a file or directory (includes sheet info for Excel files).
edit_block
Apply targeted text replacements for text files, or range-based cell updates for Excel files.
get_usage_stats
Get usage statistics for your own insight.
get_recent_tool_calls
Get recent tool call history with arguments and outputs for debugging and context recovery.
give_feedback_to_desktop_commander
Open feedback form in browser to provide feedback to Desktop Commander Team.

Setup

  1. Ensure Node.js is installed. 2. Run npx @wonderwhy-er/desktop-commander@latest setup (or use other installation methods like Smithery, manual config, Docker). 3. Restart Claude Desktop.
claude_desktop_config.json
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander@latest"
      ]
    }
  }
}

Fit and risk

Best for

  • Developers who want AI assistants to directly control terminal and file system.
  • Users who need enhanced code editing, automation, and codebase exploration within MCP clients like Claude Desktop.
  • Scenarios requiring handling of complex file formats like Excel, PDF, DOCX.

Not for

  • Users needing a fully sandboxed environment (unless using Docker installation).
  • Security-sensitive environments, as terminal commands can bypass directory restrictions.
  • Users who don't need terminal control and only basic file operations.

Required permissions

  • Filesystem read/write permissions, including terminal commands that can access files outside allowedDirectories.
  • Ability to execute arbitrary terminal commands (subject to blockedCommands).
  • Manage processes (start, interact, terminate).
  • Access network to fetch URL content (read_file).

Risks and side effects

  • Terminal commands can access files outside allowedDirectories, posing a security risk.
  • Command blocklist may be bypassed via symlinks, command substitution, or absolute paths.
  • Configuration changes should be made in a separate chat window to avoid accidental modification by Claude.
  • Potential risk to host system if not using Docker isolation.

Troubleshooting

  1. If Claude won't start, check JSON syntax in claude_desktop_config.json.
  2. If commands time out, use background execution or read output features.
  3. If searches fail, check search patterns or analyze fuzzy search logs.
  4. If Claude times out during debugging, ensure debugger is properly attached.

Use cases

Data analysis: Let Claude run Python code in memory to analyze CSV/Excel files.
Remote access: SSH to a server and check disk space.
Development: Start Node.js and test an API, or run interactive Node sessions.
Codebase exploration: Recursively search files and content to understand complex codebases.
File operations: Read, write, edit Excel, PDF, DOCX files.

Supported clients

Claude DesktopFull support
CursorFull support
WindsurfFull support
VS Code / GitHub CopilotFull support
ClineFull support
Roo CodeFull support
Claude CodeFull support
TraeFull support
KiroFull support
Codex (OpenAI)Full support
JetBrains (AI Assistant)Full support
Gemini CLIFull support
Augment CodeFull support
Qwen CodeFull support