CLI (Computer Commander) MCP server

Integrates terminal and filesystem capabilities for executing system commands, managing processes, and performing advanced file operations on the local system.
Back to servers
Setup instructions
Provider
Eduard Ruzga
Release date
Jan 08, 2025
Language
TypeScript
Stats
4.5K stars

Desktop Commander MCP enables Claude to interact with your file system and terminal, turning it into a powerful assistant for coding, automation, and file management without additional API costs.

Installation Options

Option 1: Install via npx (Recommended)

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

For debugging mode:

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

Option 2: Using bash script installer (macOS)

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

Option 3: Installing via Smithery

  1. Visit Smithery
  2. Login to Smithery
  3. Select Claude Desktop on the right side
  4. Install with the provided key
  5. Restart Claude Desktop

Option 4: Add to claude_desktop_config manually

Add this entry to your claude_desktop_config.json:

{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander@latest"
      ]
    }
  }
}

Option 5: Checkout locally

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

Option 6: Docker Installation

For complete isolation in a Docker container:

macOS/Linux:

bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)

Windows PowerShell:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))

Uninstalling Desktop Commander

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

Getting Started

Once installed and Claude Desktop is restarted, you can start using Desktop Commander immediately. Ask Claude for help by saying "Help me get started with Desktop Commander" or "Show me Desktop Commander examples".

Usage Examples

Terminal Commands

"Run 'ls -la' to show directory contents"
"Start a Python server in the current directory"
"Run npm install in my project folder"

File Operations

"Search for all JavaScript files containing 'API_KEY'"
"Create a new directory called 'backups'"
"Read the last 50 lines of my log file"

Text Editing

"Find and replace 'oldFunction' with 'newFunction' in app.js"
"Update the version number in package.json"
"Add error handling to this function in main.js"

Code Analysis

"Analyze sales.csv and show top customers"
"Explore my React project and explain the component structure"
"Find performance bottlenecks in my Node.js application"

Configuration Management

You can manage the server configuration using these commands:

// Get the entire config
get_config({})

// Set a specific config value
set_config_value({ "key": "defaultShell", "value": "/bin/zsh" })

Important Security Note

Directory restrictions and command blocking can be bypassed. For production security, use the Docker installation which provides complete isolation from your host system.

Handling Long-Running Commands

For commands that may take a while to complete:

  1. The execute_command returns after timeout with initial output
  2. Command continues in background
  3. Use read_output with PID to get new output
  4. Use force_terminate to stop if needed

Usage Statistics and Feedback

You can view your usage statistics:

get_usage_stats({})

To provide feedback:

give_feedback_to_desktop_commander({})

Getting Help

Join the Discord community for support, or check the GitHub issues for known problems.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "desktop-commander" '{"command":"npx","args":["-y","@wonderwhy-er/desktop-commander"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "desktop-commander": {
            "command": "npx",
            "args": [
                "-y",
                "@wonderwhy-er/desktop-commander"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "desktop-commander": {
            "command": "npx",
            "args": [
                "-y",
                "@wonderwhy-er/desktop-commander"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later