Desktop Commander MCP

Execute terminal commands and edit files with Claude AI. Terminal commands and diff based file editing for Claude Desktop app.

npm downloads GitHub stars smithery badge

Discord

Features

Desktop Commander MCP provides powerful tools for terminal and file operations

Terminal Command Execution

Execute terminal commands with output streaming directly from Claude Desktop app.

Long-Running Commands

Support for command timeout and background execution for extended operations.

Process Management

List and kill processes directly through Claude's interface.

File Operations

Complete filesystem access to read, write, create, list, move files and directories.

Code Editing

Surgical text replacements for small changes and full file rewrites for major modifications.

File Search

Search through files with pattern matching and get detailed file metadata.

Installation

Getting started with Desktop Commander MCP is quick and easy

There are multiple options how to install DesktopCommanderMCP

Smithery Install

Install automatically via Smithery:

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

NPX Install

Install using npx directly:

npx @wonderwhy-er/desktop-commander setup

Manual Configuration

Add this to your claude_desktop_config.json:

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

Local Installation

Clone and build locally:

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

Remember to restart Claude after installation.

Usage Examples

Desktop Commander MCP provides powerful terminal commands and file operations for Claude AI

Terminal Commands

Examples of commands to run in Claude:

• Run "ls -la" in the terminal
• Execute "ps aux | grep node"
• Set timeout to 5000ms and run "sleep 10"
• Run "node -e 'console.log(\"Hello\")"
• List processes
• Kill process 1234

File Operations

Examples of file operations in Claude:

• Read file path/to/file.txt
• Write "content" to file.txt
• Create a new file named test.js with content: console.log("Hello")
• List directory /path/to/directory
• Search for files containing "pattern"
• Get file metadata for package.json

Code Editing

Examples of editing code with Claude:

• In file.js replace "const x = 1" with "const x = 2"
• In app.jsx replace starting at line 10 ending at line 20 with: 
  return <div>New content</div>
• Write entire file.ts with content: 
  function hello() { console.log("world") }

For full documentation and advanced usage examples, visit our GitHub repository.

Media & Screenshots

See Desktop Commander MCP in action

Project Stats

Desktop Commander MCP is an actively maintained project with growing adoption.

npm downloads GitHub stars smithery badge

The project continues to evolve with regular updates and new features based on community feedback.

Discord

Join Our Community

Connect with other users and contributors to share ideas, get help, and contribute to the project.

User Testimonials

See what developers are saying about Desktop Commander MCP

Frequently Asked Questions

Find answers to common questions about Desktop Commander MCP

What is Claude Desktop Commander?

Claude Desktop Commander is an MCP (Model Context Protocol) tool that allows Claude Desktop to access and control your computer's file system and terminal. It enables Claude to explore, read, and write files, execute commands, and manage processes - expanding Claude's capabilities beyond just conversation to become a comprehensive assistant that can work with your entire operating system.

How does it differ from coding tools like Cursor or Windsurf?

Unlike tools like Cursor or Windsurf which are primarily designed as coding IDEs, Claude Desktop Commander works with Claude to provide a more flexible, solution-centric approach. Key differences include:

  • Claude reads full files during exploration, ensuring it captures the complete structure
  • Coding tools like Windsurf & Cursor chunk and index files, sometimes missing key relationships
  • Claude generates and displays diagrams directly in chat
  • Claude Desktop Commander allows you to work across your entire system, not just within coding environments
How much does it cost to use Claude Desktop Commander?

Claude Desktop Commander itself is free and open-source. However, to use it, you need a Claude Pro subscription, which costs $20/month. There are no additional charges beyond this subscription fee, unlike Claude Code or other API-based tools that charge per token.

Which operating systems does it support?

Claude Desktop Commander works with Windows, macOS, and Linux. Work is ongoing to improve Windows support, WSL integration, and enhance compatibility with various Linux distributions.

Is it safe to give Claude access to my file system?

Claude Desktop Commander operates within certain safety boundaries:

  • While file restrictions are currently disabled, Claude typically only works with files in folders you specifically direct it to
  • Claude can only perform actions that your user account has permission to do
  • No data is sent to external servers beyond what you share in Claude conversations

Command blocking features are still in development. You should always review the actions Claude proposes before allowing it to make system changes, especially when working with important files or system configurations.

Is it suitable for large codebases?

Yes, users have reported success with very large codebases (one user mentioned 44k files with 11 million code lines). The tool can work across multiple projects and services simultaneously, making it suitable for complex development environments.

I'm having trouble installing or using the tool. Where can I get help?

Join our Discord server for community support, check the GitHub issues for known problems, or review our comprehensive FAQ for troubleshooting tips. If you encounter a new issue, please consider opening a GitHub issue with details about your problem.

How does this compare to VSCode extensions like Cline?

Tools like Cline are great options that integrate directly with VSCode. The main differences are:

  • Claude Desktop Commander works across your entire system, not just within the editor
  • It can handle automation, terminal commands, and long-running processes
  • It has a fixed cost with Claude Pro subscription rather than potential API charges
  • It provides a more flexible approach not tied to a specific editor

Many users employ both, using the right tool for different tasks.

Need help or have questions?

Join our Discord community for real-time support, discussions, and updates.

Join our Discord Server