Work with code and text, run processes, and automate tasks, going far beyond other AI editors - while using host client subscriptions instead of API token costs. - How to install - Remote MCP (ChatGPT, Claude Web) - Getting Started - Handling Long-Running Commands - Work in Progress and TODOs - Sponsors and Supporters - Testimonials - Frequently Asked Questions - Contributing All of your AI develo
Add this skill
npx mdskills install wonderwhy-er/desktopcommandermcpComprehensive MCP server with excellent documentation and powerful filesystem, terminal, and process management capabilities
1# Desktop Commander MCP2### Search, update, manage files and run terminal commands with AI34[](https://www.npmjs.com/package/@wonderwhy-er/desktop-commander)5[](https://agentaudit.dev/skills/desktop-commander)6[](https://archestra.ai/mcp-catalog/wonderwhy-er__desktopcommandermcp)7[](https://smithery.ai/server/@wonderwhy-er/desktop-commander)8[](https://www.buymeacoffee.com/wonderwhyer)91011[](https://discord.gg/kQ27sNnZr7)121314Work with code and text, run processes, and automate tasks, going far beyond other AI editors - while using host client subscriptions instead of API token costs.1516<a href="https://glama.ai/mcp/servers/zempur9oh4">17 <img width="380" height="200" src="https://glama.ai/mcp/servers/zempur9oh4/badge" alt="Desktop Commander MCP" />18</a>1920## π Weβre hiring β come build with us: https://desktopcommander.app/careers/2122## Table of Contents23- [Features](#features)24- [How to install](#how-to-install)25- [Remote MCP (ChatGPT, Claude Web)](#remote-mcp-chatgpt-claude-web)26- [Getting Started](#getting-started)27- [Usage](#usage)28- [Handling Long-Running Commands](#handling-long-running-commands)29- [Work in Progress and TODOs](#roadmap)30- [Sponsors and Supporters](#support-desktop-commander)31- [Website](#website)32- [Media](#media)33- [Testimonials](#testimonials)34- [Frequently Asked Questions](#frequently-asked-questions)35- [Contributing](#contributing)36- [License](#license)3738All of your AI development tools in one place.39Desktop Commander puts all dev tools in one chat.40Execute long-running terminal commands on your computer and manage processes through Model Context Protocol (MCP). Built on top of [MCP Filesystem Server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) to provide additional search and replace file editing capabilities.4142## Features4344- **Remote AI Control** - Use Desktop Commander from ChatGPT, Claude web, and other AI services via [Remote MCP](https://mcp.desktopcommander.app)45- **Enhanced terminal commands with interactive process control**46- **Execute code in memory (Python, Node.js, R) without saving files**47- **Instant data analysis - just ask to analyze CSV/JSON/Excel files**48- **Native Excel file support** - Read, write, edit, and search Excel files (.xlsx, .xls, .xlsm) without external tools49- **PDF support** - Read PDFs with text extraction, create new PDFs from markdown, modify existing PDFs50- **Interact with running processes (SSH, databases, development servers)**51- Execute terminal commands with output streaming52- Command timeout and background execution support53- Process management (list and kill processes)54- Session management for long-running commands55- Server configuration management:56 - Get/set configuration values57 - Update multiple settings at once58 - Dynamic configuration changes without server restart59- Full filesystem operations:60 - Read/write files (text, Excel, PDF)61 - Create/list directories62 - Move files/directories63 - Search files and content (including Excel content)64 - Get file metadata65 - **Negative offset file reading**: Read from end of files using negative offset values (like Unix tail)66- Code editing capabilities:67 - Surgical text replacements for small changes68 - Full file rewrites for major changes69 - Multiple file support70 - Pattern-based replacements71 - vscode-ripgrep based recursive code or text search in folders72- Comprehensive audit logging:73 - All tool calls are automatically logged74 - Log rotation with 10MB size limit75 - Detailed timestamps and arguments7677## How to install7879Desktop Commander offers multiple installation methods to fit different user needs and technical requirements.8081> **π Update & Uninstall Information:** Before choosing an installation option, note that **only Options 1, 2, 3, and 6 have automatic updates**. Options 4 and 5 require manual updates. See the sections below for update and uninstall instructions for each option.8283### Option 1: Install through npx β **Auto-Updates** **Requires Node.js**84Just run this in terminal:85```86npx @wonderwhy-er/desktop-commander@latest setup87```8889For debugging mode (allows Node.js inspector connection):90```91npx @wonderwhy-er/desktop-commander@latest setup --debug92```9394**Command line options during setup:**95- `--debug`: Enable debugging mode for Node.js inspector96- `--no-onboarding`: Disable onboarding prompts for new users9798Restart Claude if running.99100**β Auto-Updates:** Yes - automatically updates when you restart Claude101**π Manual Update:** Run the setup command again102**ποΈ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`103104### Option 2: Using bash script installer (macOS) β **Auto-Updates** **Installs Node.js if needed**105For macOS users, you can use our automated bash installer which will check your Node.js version, install it if needed, and automatically configure Desktop Commander:106```107curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash108```109This script handles all dependencies and configuration automatically for a seamless setup experience.110111**β Auto-Updates:** Yes - requires manual updates112**π Manual Update:** Re-run the bash installer command above113**ποΈ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove`114115### Option 3: Installing via Smithery β **Auto-Updates** **Requires Node.js**116117To install Desktop Commander for Claude Desktop via [Smithery](https://smithery.ai/server/@wonderwhy-er/desktop-commander):1181191. **Visit the Smithery page:** https://smithery.ai/server/@wonderwhy-er/desktop-commander1202. **Login to Smithery** if you haven't already1213. **Select your client** (Claude Desktop) on the right side1224. **Install with the provided key** that appears after selecting your client1235. **Restart Claude Desktop**124125The old command-line installation method is no longer supported. Please use the web interface above for the most reliable installation experience.126127**β Auto-Updates:** Yes - automatically updates when you restart Claude128**π Manual Update:** Visit the Smithery page and reinstall129130### Option 4: Add to claude_desktop_config manually β **Auto-Updates** **Requires Node.js**131Add this entry to your claude_desktop_config.json:132133- On Mac: `~/Library/Application\ Support/Claude/claude_desktop_config.json`134- On Windows: `%APPDATA%\Claude\claude_desktop_config.json`135- On Linux: `~/.config/Claude/claude_desktop_config.json`136137```json138{139 "mcpServers": {140 "desktop-commander": {141 "command": "npx",142 "args": [143 "-y",144 "@wonderwhy-er/desktop-commander@latest"145 ]146 }147 }148}149```150Restart Claude if running.151152**β Auto-Updates:** Yes - automatically updates when you restart Claude153**π Manual Update:** Run the setup command again154**ποΈ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the "desktop-commander" entry from your claude_desktop_config.json file155156### ### Option 5: Checkout locally β **Manual Updates** **Requires Node.js** β **Manual Updates** **Requires Node.js**1571. Clone and build:158```bash159git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git160cd DesktopCommanderMCP161npm run setup162```163Restart Claude if running.164165The setup command will:166- Install dependencies167- Build the server168- Configure Claude's desktop app169- Add MCP servers to Claude's config if needed170171**β Auto-Updates:** No - requires manual git updates172**π Manual Update:** `cd DesktopCommanderMCP && git pull && npm run setup`173**ποΈ Uninstall:** Run `npx @wonderwhy-er/desktop-commander@latest remove` or remove the cloned directory and remove MCP server entry from Claude config174175### Option 6: Docker Installation π³ β **Auto-Updates** **No Node.js Required**176177Perfect for users who want complete or partial isolation or don't have Node.js installed. Desktop Commander runs in a sandboxed Docker container with a persistent work environment.178179#### Prerequisites180- [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed **and running**181- Claude Desktop app installed182183**Important:** Make sure Docker Desktop is fully started before running the installer.184185#### Automated Installation (Recommended)186187**macOS/Linux:**188```bash189bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)190```191192**Windows PowerShell:**193```powershell194# Download and run the installer (one-liner)195iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))196```197198The automated installer will:199- Check Docker installation200- Pull the latest Docker image201- Prompt you to select folders for mounting202- Configure Claude Desktop automatically203- Restart Claude if possible204205#### How Docker Persistence Works206Desktop Commander creates a persistent work environment that remembers everything between sessions:207- **Your development tools**: Any software you install (Node.js, Python, databases, etc.) stays installed208- **Your configurations**: Git settings, SSH keys, shell preferences, and other personal configs are preserved209- **Your work files**: Projects and files in the workspace area persist across restarts210- **Package caches**: Downloaded packages and dependencies are cached for faster future installs211212Think of it like having your own dedicated development computer that never loses your setup, but runs safely isolated from your main system.213214#### Manual Docker Configuration215216If you prefer manual setup, add this to your claude_desktop_config.json:217218**Basic setup (no file access):**219```json220{221 "mcpServers": {222 "desktop-commander-in-docker": {223 "command": "docker",224 "args": [225 "run",226 "-i",227 "--rm",228 "mcp/desktop-commander:latest"229 ]230 }231 }232}233```234235**With folder mounting:**236```json237{238 "mcpServers": {239 "desktop-commander-in-docker": {240 "command": "docker",241 "args": [242 "run",243 "-i",244 "--rm",245 "-v", "/Users/username/Desktop:/mnt/desktop",246 "-v", "/Users/username/Documents:/mnt/documents",247 "mcp/desktop-commander:latest"248 ]249 }250 }251}252```253254**Advanced folder mounting:**255```json256{257 "mcpServers": {258 "desktop-commander-in-docker": {259 "command": "docker",260 "args": [261 "run", "-i", "--rm",262 "-v", "dc-system:/usr",263 "-v", "dc-home:/root",264 "-v", "dc-workspace:/workspace",265 "-v", "dc-packages:/var",266 "-v", "/Users/username/Projects:/mnt/Projects",267 "-v", "/Users/username/Downloads:/mnt/Downloads",268 "mcp/desktop-commander:latest"269 ]270 }271 }272}273```274275#### Docker Benefits276β **Controlled Isolation:** Runs in sandboxed environment with persistent development state277β **No Node.js Required:** Everything included in the container278β **Cross-Platform:** Same experience on all operating systems279β **Persistent Environment:** Your tools, files, configs, and work survives restarts280281**β Auto-Updates:** Yes - `latest` tag automatically gets newer versions282**π Manual Update:** `docker pull mcp/desktop-commander:latest` then restart Claude283284#### Docker Management Commands285286**macOS/Linux:**287288Check installation status:289```bash290bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --status291```292293Reset all persistent data (removes all installed tools and configs):294```bash295bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset296```297298**Windows PowerShell:**299300Check status:301```powershell302$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Status303```304305Reset all data:306```powershell307$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Reset308```309310Show help:311```powershell312$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -Help313```314315Verbose output:316```powershell317$script = (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'); & ([ScriptBlock]::Create("$script")) -VerboseOutput318```319320#### Troubleshooting Docker Installation321If you broke the Docker container or need a fresh start:322```bash323# Reset and reinstall from scratch324bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh) --reset && bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)325```326This will completely reset your persistent environment and reinstall everything fresh with exception of not touching mounted folders327328## Remote MCP (ChatGPT, Claude Web) π329330Use Desktop Commander from **ChatGPT**, **Claude web**, and other AI services through their MCP/Connector integrations - no Claude Desktop app required.331332**π Get started at [mcp.desktopcommander.app](https://mcp.desktopcommander.app)**333334The website provides complete instructions for:335- Installing and running the Remote Device on your computer336- Connecting your AI service (ChatGPT, Claude, etc.)337- Managing your devices and sessions338339### How It Works3403411. You run a lightweight **Remote Device** on your computer3422. It connects securely to the cloud Remote MCP service3433. Your AI sends commands through the cloud to your device3444. Commands execute locally, results return to your AI3455. **You stay in control** - stop anytime with `Ctrl+C`346347### Security348349- β Device only runs when you start it350- β Commands execute under your user permissions351- β Secure OAuth authentication and encrypted communication channel352353## Updating & Uninstalling Desktop Commander354355### Automatic Updates (Options 1, 2, 3, 4 & 6)356**Options 1 (npx), Option 2 (bash installer), 3 (Smithery), 4 (manual config), and 6 (Docker)** automatically update to the latest version whenever you restart Claude. No manual intervention needed.357358### Manual Updates (Option 5)359- **Option 5 (local checkout):** `cd DesktopCommanderMCP && git pull && npm run setup`360361### Uninstalling Desktop Commander362#### π€ Automatic Uninstallation (Recommended)363364The easiest way to completely remove Desktop Commander:365366```bash367npx @wonderwhy-er/desktop-commander@latest remove368```369370This automatic uninstaller will:371- β Remove Desktop Commander from Claude's MCP server configuration372- β Create a backup of your Claude config before making changes373- β Provide guidance for complete package removal374- β Restore from backup if anything goes wrong375376#### π§ Manual Uninstallation377378If the automatic uninstaller doesn't work or you prefer manual removal:379380##### Remove from Claude Configuration3813821. **Locate your Claude Desktop config file:**383 - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`384 - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`385 - **Linux:** `~/.config/Claude/claude_desktop_config.json`3863872. **Edit the config file:**388 - Open the file in a text editor389 - Find and remove the `"desktop-commander"` entry from the `"mcpServers"` section390 - Save the file391392 **Example - Remove this section:**393 ```json394 {395 "desktop-commander": {396 "command": "npx",397 "args": ["@wonderwhy-er/desktop-commander@latest"]398 }399 }400 ```401402Close and restart Claude Desktop to complete the removal.403404#### π Troubleshooting405406**If automatic uninstallation fails:**407- Use manual uninstallation as a fallback408409**If Claude won't start after uninstalling:**410- Restore the backup config file created by the uninstaller411- Or manually fix the JSON syntax in your claude_desktop_config.json412413**Need help?**414- Join our Discord community: https://discord.com/invite/kQ27sNnZr7415416## Getting Started417418Once Desktop Commander is installed and Claude Desktop is restarted, you're ready to supercharge your Claude experience!419420### π New User Onboarding421422Desktop Commander includes intelligent onboarding to help you discover what's possible:423424**For New Users:** When you're just getting started (fewer than 10 successful commands), Claude will automatically offer helpful getting-started guidance and practical tutorials after you use Desktop Commander successfully.425426**Request Help Anytime:** You can ask for onboarding assistance at any time by simply saying:427- *"Help me get started with Desktop Commander"*428- *"Show me Desktop Commander examples"*429- *"What can I do with Desktop Commander?"*430431Claude will then show you beginner-friendly tutorials and examples, including:432- π Organizing your Downloads folder automatically433- π Analyzing CSV/Excel files with Python434- βοΈ Setting up GitHub Actions CI/CD435- π Exploring and understanding codebases436- π€ Running interactive development environments437438## Usage439440The server provides a comprehensive set of tools organized into several categories:441442### Available Tools443444| Category | Tool | Description |445|----------|------|-------------|446| **Configuration** | `get_config` | Get the complete server configuration as JSON (includes blockedCommands, defaultShell, allowedDirectories, fileReadLineLimit, fileWriteLineLimit, telemetryEnabled) |447| | `set_config_value` | Set a specific configuration value by key. Available settings: <br>β’ `blockedCommands`: Array of shell commands that cannot be executed<br>β’ `defaultShell`: Shell to use for commands (e.g., bash, zsh, powershell)<br>β’ `allowedDirectories`: Array of filesystem paths the server can access for file operations (β οΈ terminal commands can still access files outside these directories)<br>β’ `fileReadLineLimit`: Maximum lines to read at once (default: 1000)<br>β’ `fileWriteLineLimit`: Maximum lines to write at once (default: 50)<br>β’ `telemetryEnabled`: Enable/disable telemetry (boolean) |448| **Terminal** | `start_process` | Start programs with smart detection of when they're ready for input |449| | `interact_with_process` | Send commands to running programs and get responses |450| | `read_process_output` | Read output from running processes |451| | `force_terminate` | Force terminate a running terminal session |452| | `list_sessions` | List all active terminal sessions |453| | `list_processes` | List all running processes with detailed information |454| | `kill_process` | Terminate a running process by PID |455| **Filesystem** | `read_file` | Read contents from local filesystem, URLs, Excel files (.xlsx, .xls, .xlsm), and PDFs with line/page-based pagination |456| | `read_multiple_files` | Read multiple files simultaneously |457| | `write_file` | Write file contents with options for rewrite or append mode. Supports Excel files (JSON 2D array format). For PDFs, use `write_pdf` |458| | `write_pdf` | Create new PDF files from markdown or modify existing PDFs (insert/delete pages). Supports HTML/CSS styling and SVG graphics |459| | `create_directory` | Create a new directory or ensure it exists |460| | `list_directory` | Get detailed recursive listing of files and directories (supports depth parameter, default depth=2) |461| | `move_file` | Move or rename files and directories |462| | `start_search` | Start streaming search for files by name or content patterns (searches text files and Excel content) |463| | `get_more_search_results` | Get paginated results from active search with offset support |464| | `stop_search` | Stop an active search gracefully |465| | `list_searches` | List all active search sessions |466| | `get_file_info` | Retrieve detailed metadata about a file or directory (includes sheet info for Excel files) |467| **Text Editing** | `edit_block` | Apply targeted text replacements for text files, or range-based cell updates for Excel files |468| **Analytics** | `get_usage_stats` | Get usage statistics for your own insight |469| | `get_recent_tool_calls` | Get recent tool call history with arguments and outputs for debugging and context recovery |470| | `give_feedback_to_desktop_commander` | Open feedback form in browser to provide feedback to Desktop Commander Team |471472### Quick Examples473474**Data Analysis:**475```476"Analyze sales.csv and show top customers" β Claude runs Python code in memory477```478479**Remote Access:**480```481"SSH to my server and check disk space" β Claude maintains SSH session482```483484**Development:**485```486"Start Node.js and test this API" β Claude runs interactive Node session487```488489### Tool Usage Examples490491Search/Replace Block Format:492```493filepath.ext494<<<<<<< SEARCH495content to find496=======497new content498>>>>>>> REPLACE499```500501Example:502```503src/main.js504<<<<<<< SEARCH505console.log("old message");506=======507console.log("new message");508>>>>>>> REPLACE509```510511### Enhanced Edit Block Features512513The `edit_block` tool includes several enhancements for better reliability:5145151. **Improved Prompting**: Tool descriptions now emphasize making multiple small, focused edits rather than one large change5162. **Fuzzy Search Fallback**: When exact matches fail, it performs fuzzy search and provides detailed feedback5173. **Character-level Diffs**: Shows exactly what's different using `{-removed-}{+added+}` format5184. **Multiple Occurrence Support**: Can replace multiple instances with `expected_replacements` parameter5195. **Comprehensive Logging**: All fuzzy searches are logged for analysis and debugging520521When a search fails, you'll see detailed information about the closest match found, including similarity percentage, execution time, and character differences. All these details are automatically logged for later analysis using the fuzzy search log tools.522523### Docker Support524525### π³ Isolated Environment Usage526527Desktop Commander can be run in Docker containers for **complete isolation from your host system**, providing **zero risk to your computer**. This is perfect for testing, development, or when you want complete sandboxing.528529### Installation Instructions5305311. **Install Docker for Windows/Mac**532 - Download and install Docker Desktop from [docker.com](https://www.docker.com/products/docker-desktop/)5335342. **Get Desktop Commander Docker Configuration**535 - Visit: https://hub.docker.com/mcp/server/desktop-commander/manual536 - **Option A:** Use the provided terminal command for automated setup537 - **Option B:** Click "Standalone" to get the config JSON and add it manually to your Claude Desktop config538 5395403. **Mount Your Machine Folders (Coming Soon)**541 - Instructions on how to mount your local directories into the Docker container will be provided soon542 - This will allow you to work with your files while maintaining complete isolation543544### Benefits of Docker Usage545- **Complete isolation** from your host system546- **Consistent environment** across different machines547- **Easy cleanup** - just remove the container when done548- **Perfect for testing** new features or configurations549550## URL Support551- `read_file` can now fetch content from both local files and URLs552- Example: `read_file` with `isUrl: true` parameter to read from web resources553- Handles both text and image content from remote sources554- Images (local or from URLs) are displayed visually in Claude's interface, not as text555- Claude can see and analyze the actual image content556- Default 30-second timeout for URL requests557558## Fuzzy Search Log Analysis (npm scripts)559560The fuzzy search logging system includes convenient npm scripts for analyzing logs outside of the MCP environment:561562```bash563# View recent fuzzy search logs564npm run logs:view -- --count 20565566# Analyze patterns and performance567npm run logs:analyze -- --threshold 0.8568569# Export logs to CSV or JSON570npm run logs:export -- --format json --output analysis.json571572# Clear all logs (with confirmation)573npm run logs:clear574```575576For detailed documentation on these scripts, see [scripts/README.md](scripts/README.md).577578## Fuzzy Search Logs579580Desktop Commander includes comprehensive logging for fuzzy search operations in the `edit_block` tool. When an exact match isn't found, the system performs a fuzzy search and logs detailed information for analysis.581582### What Gets Logged583584Every fuzzy search operation logs:585- **Search and found text**: The text you're looking for vs. what was found586- **Similarity score**: How close the match is (0-100%)587- **Execution time**: How long the search took588- **Character differences**: Detailed diff showing exactly what's different589- **File metadata**: Extension, search/found text lengths590- **Character codes**: Specific character codes causing differences591592### Log Location593594Logs are automatically saved to:595- **macOS/Linux**: `~/.claude-server-commander-logs/fuzzy-search.log`596- **Windows**: `%USERPROFILE%\.claude-server-commander-logs\fuzzy-search.log`597598### What You'll Learn599600The fuzzy search logs help you understand:6011. **Why exact matches fail**: Common issues like whitespace differences, line endings, or character encoding6022. **Performance patterns**: How search complexity affects execution time6033. **File type issues**: Which file extensions commonly have matching problems6044. **Character encoding problems**: Specific character codes that cause diffs605606## Audit Logging607608Desktop Commander now includes comprehensive logging for all tool calls:609610### What Gets Logged611- Every tool call is logged with timestamp, tool name, and arguments (sanitized for privacy)612- Logs are rotated automatically when they reach 10MB in size613614### Log Location615Logs are saved to:616- **macOS/Linux**: `~/.claude-server-commander/claude_tool_call.log`617- **Windows**: `%USERPROFILE%\.claude-server-commander\claude_tool_call.log`618619This audit trail helps with debugging, security monitoring, and understanding how Claude is interacting with your system.620621## Handling Long-Running Commands622623For commands that may take a while:624625## Configuration Management626627### β οΈ Important Security Warnings628629> **For comprehensive security information and vulnerability reporting**: See [SECURITY.md](SECURITY.md)6306311. **Known security limitations**: Directory restrictions and command blocking can be bypassed through various methods including symlinks, command substitution, and absolute paths or code execution6326332. **Always change configuration in a separate chat window** from where you're doing your actual work. Claude may sometimes attempt to modify configuration settings (like `allowedDirectories`) if it encounters filesystem access restrictions.6346353. **The `allowedDirectories` setting currently only restricts filesystem operations**, not terminal commands. Terminal commands can still access files outside allowed directories.6366374. **For production security**: Use the [Docker installation](#option-6-docker-installation-π³-β-auto-updates-no-nodejs-required) which provides complete isolation from your host system.638639### Configuration Tools640641You can manage server configuration using the provided tools:642643```javascript644// Get the entire config645get_config({})646647// Set a specific config value648set_config_value({ "key": "defaultShell", "value": "/bin/zsh" })649650// Set multiple config values using separate calls651set_config_value({ "key": "defaultShell", "value": "/bin/bash" })652set_config_value({ "key": "allowedDirectories", "value": ["/Users/username/projects"] })653```654655The configuration is saved to `config.json` in the server's working directory and persists between server restarts.656657#### Understanding fileWriteLineLimit658659The `fileWriteLineLimit` setting controls how many lines can be written in a single `write_file` operation (default: 50 lines). This limit exists for several important reasons:660661**Why the limit exists:**662- **AIs are wasteful with tokens**: Instead of doing two small edits in a file, AIs may decide to rewrite the whole thing. We're trying to force AIs to do things in smaller changes as it saves time and tokens663- **Claude UX message limits**: There are limits within one message and hitting "Continue" does not really work. What we're trying here is to make AI work in smaller chunks so when you hit that limit, multiple chunks have succeeded and that work is not lost - it just needs to restart from the last chunk664665**Setting the limit:**666```javascript667// You can set it to thousands if you want668set_config_value({ "key": "fileWriteLineLimit", "value": 1000 })669670// Or keep it smaller to force more efficient behavior671set_config_value({ "key": "fileWriteLineLimit", "value": 25 })672```673674**Maximum value**: You can set it to thousands if you want - there's no technical restriction.675676**Best practices**:677- Keep the default (50) to encourage efficient AI behavior and avoid token waste678- The system automatically suggests chunking when limits are exceeded679- Smaller chunks mean less work lost when Claude hits message limits680681### Best Practices6826831. **Create a dedicated chat for configuration changes**: Make all your config changes in one chat, then start a new chat for your actual work.6846852. **Be careful with empty `allowedDirectories`**: Setting this to an empty array (`[]`) grants access to your entire filesystem for file operations.6866873. **Use specific paths**: Instead of using broad paths like `/`, specify exact directories you want to access.6886894. **Always verify configuration after changes**: Use `get_config({})` to confirm your changes were applied correctly.690691## Command Line Options692693Desktop Commander supports several command line options for customizing behavior:694695### Disable Onboarding696697By default, Desktop Commander shows helpful onboarding prompts to new users (those with fewer than 10 tool calls). You can disable this behavior:698699```bash700# Disable onboarding for this session701node dist/index.js --no-onboarding702703# Or if using npm scripts704npm run start:no-onboarding705706# For npx installations, modify your claude_desktop_config.json:707{708 "mcpServers": {709 "desktop-commander": {710 "command": "npx",711 "args": [712 "-y",713 "@wonderwhy-er/desktop-commander@latest",714 "--no-onboarding"715 ]716 }717 }718}719```720721**When onboarding is automatically disabled:**722- When the MCP client name is set to "desktop-commander"723- When using the `--no-onboarding` flag724- After users have used onboarding prompts or made 10+ tool calls725726**Debug information:**727The server will log when onboarding is disabled: `"Onboarding disabled via --no-onboarding flag"`728729## Using Different Shells730731You can specify which shell to use for command execution:732733```javascript734// Using default shell (bash or system default)735execute_command({ "command": "echo $SHELL" })736737// Using zsh specifically738execute_command({ "command": "echo $SHELL", "shell": "/bin/zsh" })739740// Using bash specifically741execute_command({ "command": "echo $SHELL", "shell": "/bin/bash" })742```743744This allows you to use shell-specific features or maintain consistent environments across commands.7457461. `execute_command` returns after timeout with initial output7472. Command continues in background7483. Use `read_output` with PID to get new output7494. Use `force_terminate` to stop if needed750751## Debugging752753If you need to debug the server, you can install it in debug mode:754755```bash756# Using npx757npx @wonderwhy-er/desktop-commander@latest setup --debug758759# Or if installed locally760npm run setup:debug761```762763This will:7641. Configure Claude to use a separate "desktop-commander" server7652. Enable Node.js inspector protocol with `--inspect-brk=9229` flag7663. Pause execution at the start until a debugger connects7674. Enable additional debugging environment variables768769To connect a debugger:770- In Chrome, visit `chrome://inspect` and look for the Node.js instance771- In VS Code, use the "Attach to Node Process" debug configuration772- Other IDEs/tools may have similar "attach" options for Node.js debugging773774Important debugging notes:775- The server will pause on startup until a debugger connects (due to the `--inspect-brk` flag)776- If you don't see activity during debugging, ensure you're connected to the correct Node.js process777- Multiple Node processes may be running; connect to the one on port 9229778- The debug server is identified as "desktop-commander-debug" in Claude's MCP server list779780Troubleshooting:781- If Claude times out while trying to use the debug server, your debugger might not be properly connected782- When properly connected, the process will continue execution after hitting the first breakpoint783- You can add additional breakpoints in your IDE once connected784785## Model Context Protocol Integration786787This project extends the MCP Filesystem Server to enable:788- Local server support in Claude Desktop789- Full system command execution790- Process management791- File operations792- Code editing with search/replace blocks793794Created as part of exploring Claude MCPs: https://youtube.com/live/TlbjFDbl5Us795796## Support Desktop Commander797798<div align="center">799 <h3>π’ SUPPORT THIS PROJECT</h3>800 <p><strong>Desktop Commander MCP is free and open source, but needs your support to thrive!</strong></p>801802 <div style="background-color: #f8f9fa; padding: 15px; border-radius: 10px; margin: 20px 0; border: 2px solid #007bff;">803 <p>Our philosophy is simple: we don't want you to pay for it if you're not successful. But if Desktop Commander contributes to your success, please consider contributing to ours.</p>804 <p><strong>Ways to support:</strong></p>805 <ul style="list-style-type: none; padding: 0;">806 <li>π <a href="https://github.com/sponsors/wonderwhy-er"><strong>GitHub Sponsors</strong></a> - Recurring support</li>807 <li>β <a href="https://www.buymeacoffee.com/wonderwhyer"><strong>Buy Me A Coffee</strong></a> - One-time contributions</li>808 <li>π <a href="https://www.patreon.com/c/EduardsRuzga"><strong>Patreon</strong></a> - Become a patron and support us monthly</li>809 <li>β <a href="https://github.com/wonderwhy-er/DesktopCommanderMCP"><strong>Star on GitHub</strong></a> - Help others discover the project</li>810 </ul>811 </div>812</div>813814815### β€οΈ Supporters Hall of Fame816817Generous supporters are featured here. Thank you for helping make this project possible!818819<div align="center">820<table>821 <tr>822 <td align="center">823 <a href="https://github.com/jonrichards">824 <img src="https://github.com/jonrichards.png" width="100px;" alt="Jon Richards"/>825 <br />826 <sub><b>Jon Richards</b></sub>827 </a>828 </td>829 <td align="center">830 <a href="https://github.com/stepanic">831 <img src="https://github.com/stepanic.png" width="100px;" alt="Matija Stepanic"/>832 <br />833 <sub><b>Matija Stepanic</b></sub>834 </a>835 </td>836 </tr>837</table>838</div>839840<details>841 <summary><strong>Why your support matters</strong></summary>842 <p>Your support allows us to:</p>843 <ul>844 <li>Continue active development and maintenance</li>845 <li>Add new features and integrations</li>846 <li>Improve compatibility across platforms</li>847 <li>Provide better documentation and examples</li>848 <li>Build a stronger community around the project</li>849 </ul>850</details>851852## Website853854Visit our official website at [https://desktopcommander.app/](https://desktopcommander.app/) for the latest information, documentation, and updates.855856## Media857858Learn more about this project through these resources:859860### Article861[Claude with MCPs replaced Cursor & Windsurf. How did that happen?](https://wonderwhy-er.medium.com/claude-with-mcps-replaced-cursor-windsurf-how-did-that-happen-c1d1e2795e96) - A detailed exploration of how Claude with Model Context Protocol capabilities is changing developer workflows.862863### Video864[Claude Desktop Commander Video Tutorial](https://www.youtube.com/watch?v=ly3bed99Dy8) - Watch how to set up and use the Commander effectively.865866### Publication at AnalyticsIndiaMag867[868This Developer Ditched Windsurf, Cursor Using Claude with MCPs](https://analyticsindiamag.com/ai-features/this-developer-ditched-windsurf-cursor-using-claude-with-mcps/)869870### Community871Join our [Discord server](https://discord.gg/kQ27sNnZr7) to get help, share feedback, and connect with other users.872873## Testimonials874875[ https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg876](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg877)878879[880https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg881)882883[885https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg)886887[888https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg](https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg)889890[894https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e](https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e)895896If you find this project useful, please consider giving it a β star on GitHub! This helps others discover the project and encourages further development.897898We welcome contributions from the community! Whether you've found a bug, have a feature request, or want to contribute code, here's how you can help:899900- **Found a bug?** Open an issue at [github.com/wonderwhy-er/DesktopCommanderMCP/issues](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues)901- **Have a feature idea?** Submit a feature request in the issues section902- **Want to contribute code?** Fork the repository, create a branch, and submit a pull request903- **Questions or discussions?** Start a discussion in the GitHub Discussions tab904905All contributions, big or small, are greatly appreciated!906907If you find this tool valuable for your workflow, please consider [supporting the project](https://www.buymeacoffee.com/wonderwhyer).908909## Frequently Asked Questions910911Here are answers to some common questions. For a more comprehensive FAQ, see our [detailed FAQ document](FAQ.md).912913### What is Desktop Commander?914It's an MCP tool that enables Claude Desktop to access your file system and terminal, turning Claude into a versatile assistant for coding, automation, codebase exploration, and more.915916### How is this different from Cursor/Windsurf?917Unlike IDE-focused tools, Claude Desktop Commander provides a solution-centric approach that works with your entire OS, not just within a coding environment. Claude reads files in full rather than chunking them, can work across multiple projects simultaneously, and executes changes in one go rather than requiring constant review.918919### Do I need to pay for API credits?920No. This tool works with Claude Desktop's standard Pro subscription ($20/month), not with API calls, so you won't incur additional costs beyond the subscription fee.921922### Does Desktop Commander automatically update?923Yes, when installed through npx or Smithery, Desktop Commander automatically updates to the latest version when you restart Claude. No manual update process is needed.924925### What are the most common use cases?926- Exploring and understanding complex codebases927- Generating diagrams and documentation928- Automating tasks across your system929- Working with multiple projects simultaneously930- Making surgical code changes with precise control931932### I'm having trouble installing or using the tool. Where can I get help?933Join our [Discord server](https://discord.gg/kQ27sNnZr7) for community support, check the [GitHub issues](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues) for known problems, or review the [full FAQ](FAQ.md) for troubleshooting tips. You can also visit our [website FAQ section](https://desktopcommander.app#faq) for a more user-friendly experience. If you encounter a new issue, please consider [opening a GitHub issue](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues/new) with details about your problem.934935### How do I report security vulnerabilities?936Please create a [GitHub Issue](https://github.com/wonderwhy-er/DesktopCommanderMCP/issues) with detailed information about any security vulnerabilities you discover. See our [Security Policy](SECURITY.md) for complete guidelines on responsible disclosure.937938## Data Collection & Privacy939940Desktop Commander collects limited, pseudonymous telemetry to improve the tool. We do not collect file contents, file paths, or command arguments.941942**Opt-out:** Ask Claude to "disable Desktop Commander telemetry" or set `"telemetryEnabled": false` in your config.943944For complete details, see our [Privacy Policy](PRIVACY.md).945946## Verifications947[](https://mseep.ai/app/25ff7a06-58bc-40b8-bd79-ebb715140f1a)948949## License950951MIT952
Full transparency β inspect the skill content before installing.