Home
Login
wonderwhy-er/DesktopCommanderMCP

Desktop Commander MCP is an MCP server designed for Claude, giving it terminal control, file system search, and diff file editing capabilities.

MITJavaScript 3.4kwonderwhy-er Last Updated: 2025-06-07
https://github.com/wonderwhy-er/DesktopCommanderMCP

Desktop Commander MCP Project Details

Project Overview

Desktop Commander MCP is a Model Context Protocol (MCP)-based server tool designed specifically for the Claude Desktop application. It empowers Claude with terminal control, file system search, and differential file editing capabilities via the MCP protocol, transforming Claude into a powerful development assistant.

This project extends the functionality of the MCP file system server, enabling developers to directly interact with the local system through Claude, execute commands, manage files, and perform code editing, surpassing the capabilities of traditional AI editors.

Core Features

🖥️ Terminal Operations

  • Command Execution: Execute terminal commands with support for streaming output.
  • Timeout Control: Configurable command timeouts and background execution support.
  • Process Management: List and terminate running processes.
  • Session Management: Support for long-running command sessions.
  • Multi-Shell Support: Support for different shell environments like bash, zsh, and powershell.

📁 File System Operations

  • File Read/Write: Complete file reading and writing functionality.
  • Directory Management: Create, list, and move files and directories.
  • File Search: File name-based search functionality.
  • Metadata Retrieval: Retrieve detailed information about files and directories.
  • Multi-File Support: Read multiple files simultaneously.
  • URL Content Reading: Support for reading text and image content from URLs.

✏️ Code Editing Capabilities

  • Precise Replacement: Surgical text replacement for small modifications.
  • Complete Rewrite: Complete file rewriting for significant changes.
  • Multi-File Support: Edit multiple files simultaneously.
  • Pattern Replacement: Pattern-based text replacement.
  • Code Search: Recursive code or text search using vscode-ripgrep.

⚙️ Server Configuration Management

  • Configuration Get/Set: Get and set configuration values.
  • Batch Updates: Update multiple settings at once.
  • Dynamic Configuration: Configuration changes without server restart.
  • Security Control: Support for blocking specific commands and restricting directory access.

Installation Methods

Method 1: NPX Quick Installation (Recommended)

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

Method 2: macOS Automated Installation

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

Method 3: Smithery Installation

npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude

Method 4: Manual Build and Installation

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

Main Tool Categories

Configuration Management Tools

  • get_config: Get the complete server configuration.
  • set_config_value: Set a specific configuration value.

Terminal Tools

  • execute_command: Execute a terminal command.
  • read_output: Read new output from a running session.
  • force_terminate: Forcefully terminate a running session.
  • list_sessions: List all active terminal sessions.
  • list_processes: List all running processes.
  • kill_process: Terminate a process by PID.

File System Tools

  • read_file: Read a local file or URL content.
  • read_multiple_files: Read multiple files simultaneously.
  • write_file: Completely replace file content.
  • create_directory: Create a directory.
  • list_directory: Get a detailed list of a directory.
  • move_file: Move or rename files and directories.
  • search_files: Find files by name.
  • search_code: Search for text/code patterns in file content.
  • get_file_info: Get detailed metadata for a file or directory.

Text Editing Tools

  • edit_block: Apply surgical text replacement.

Technical Advantages

Comparison with Traditional IDE Tools

  • System-Wide Solution: Operates on the entire operating system, not limited to the IDE environment.
  • Complete File Reading: Claude can read entire files, rather than processing them in chunks.
  • Multi-Project Support: Can handle multiple projects simultaneously.
  • One-Time Execution: Can execute changes in one go, reducing repeated confirmations.

Cost-Effectiveness

  • Based on Claude Desktop's standard Pro subscription ($20/month).
  • No additional API call costs.
  • Automatic update mechanism, automatically retrieves the latest version when installed via NPX or Smithery.

Use Cases

Development Scenarios

  • Exploring and understanding complex codebases.
  • Generating charts and documentation.
  • Automating cross-system tasks.
  • Working on multiple projects simultaneously.
  • Precise code modifications.

Security Features

  • Configurable list of blocked commands.
  • Allowed directory access control.
  • Process management and monitoring.
  • Configuration persistence and validation.