
Desktop Commander
OfficialEnables Claude Desktop to directly manage your filesystem, execute terminal commands, and edit code across your entire system. Provides comprehensive file operations, process control, and search capabilities through a chat interface.
Desktop Commander MCP transforms Claude Desktop into a powerful AI assistant for managing files, running terminal commands, and editing code with precision across your entire system. It supports in-memory code execution, interactive process control, advanced search and replace, plus comprehensive filesystem operations including reading from URLs and negative offset file reads. With detailed audit and fuzzy search logging, it enables efficient automation, data analysis, and multi-project workflows—all without extra API costs. Designed for developers seeking smarter automation, it enhances productivity by integrating all essential development tools into a single, intelligent chat interface.
What it does
- Read and write files from local paths or URLs
- Execute terminal commands and control processes
- Search across multiple files with fuzzy matching
- Create and manage directories and file structures
- Edit code with advanced search and replace operations
- Extract content from PDFs as markdown
Best for
About Desktop Commander
Desktop Commander is an official MCP server published by wonderwhy-er that provides AI assistants with tools and capabilities via the Model Context Protocol. Desktop Commander MCP unifies code management with advanced source control, git, and svn support—streamlining developmen It is categorized under file systems, developer tools. This server exposes 26 tools that AI clients can invoke during conversations and coding sessions.
How to install
You can install Desktop Commander in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Desktop Commander is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Tools (26)
Get the complete server configuration as JSON. Config includes fields for: - blockedCommands (array of blocked shell commands) - defaultShell (shell to use for commands) - allowedDirectories (paths the server can access) - fileReadLineLimit (max lines for read_file, default 1000) - fileWriteLineLimit (max lines per write_file call, default 50) - telemetryEnabled (boolean for telemetry opt-in/out) - currentClient (information about the currently connected MCP client) - clientHistory (history of all clients that have connected) - version (version of the DesktopCommander) - systemInfo (operating system and environment details) This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Set a specific configuration value by key. WARNING: Should be used in a separate chat from file operations and command execution to prevent security issues. Config keys include: - blockedCommands (array) - defaultShell (string) - allowedDirectories (array of paths) - fileReadLineLimit (number, max lines for read_file) - fileWriteLineLimit (number, max lines per write_file call) - telemetryEnabled (boolean) IMPORTANT: Setting allowedDirectories to an empty array ([]) allows full access to the entire file system, regardless of the operating system. This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Read contents from files and URLs. Read PDF files and extract content as markdown and images. Prefer this over 'execute_command' with cat/type for viewing files. Supports partial file reading with: - 'offset' (start line, default: 0) * Positive: Start from line N (0-based indexing) * Negative: Read last N lines from end (tail behavior) - 'length' (max lines to read, default: configurable via 'fileReadLineLimit' setting, initially 1000) * Used with positive offsets for range reading * Ignored when offset is negative (reads all requested tail lines) Examples: - offset: 0, length: 10 → First 10 lines - offset: 100, length: 5 → Lines 100-104 - offset: -20 → Last 20 lines - offset: -5, length: 10 → Last 5 lines (length ignored) Performance optimizations: - Large files with negative offsets use reverse reading for efficiency - Large files with deep positive offsets use byte estimation - Small files use fast readline streaming When reading from the file system, only works within allowed directories. Can fetch content from URLs when isUrl parameter is set to true (URLs are always read in full regardless of offset/length). FORMAT HANDLING (by extension): - Text: Uses offset/length for line-based pagination - Excel (.xlsx, .xls, .xlsm): Returns JSON 2D array * sheet: "Sheet1" (name) or "0" (index as string, 0-based) * range: ALWAYS use FROM:TO format (e.g., "A1:D100", "C1:C1", "B2:B50") * offset/length work as row pagination (optional fallback) - Images (PNG, JPEG, GIF, WebP): Base64 encoded viewable content - PDF: Extracts text content as markdown with page structure * offset/length work as page pagination (0-based) * Includes embedded images when available IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths. This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Read the contents of multiple files simultaneously. Each file's content is returned with its path as a reference. Handles text files normally and renders images as viewable content. Recognized image types: PNG, JPEG, GIF, WebP. Failed reads for individual files won't stop the entire operation. Only works within allowed directories. IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths. This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Write or append to file contents. IMPORTANT: DO NOT use this tool to create PDF files. Use 'write_pdf' for all PDF creation tasks. CHUNKING IS STANDARD PRACTICE: Always write files in chunks of 25-30 lines maximum. This is the normal, recommended way to write files - not an emergency measure. STANDARD PROCESS FOR ANY FILE: 1. FIRST → write_file(filePath, firstChunk, {mode: 'rewrite'}) [≤30 lines] 2. THEN → write_file(filePath, secondChunk, {mode: 'append'}) [≤30 lines] 3. CONTINUE → write_file(filePath, nextChunk, {mode: 'append'}) [≤30 lines] ALWAYS CHUNK PROACTIVELY - don't wait for performance warnings! WHEN TO CHUNK (always be proactive): 1. Any file expected to be longer than 25-30 lines 2. When writing multiple files in sequence 3. When creating documentation, code files, or configuration files HANDLING CONTINUATION ("Continue" prompts): If user asks to "Continue" after an incomplete operation: 1. Read the file to see what was successfully written 2. Continue writing ONLY the remaining content using {mode: 'append'} 3. Keep chunks to 25-30 lines each FORMAT HANDLING (by extension): - Text files: String content - Excel (.xlsx, .xls, .xlsm): JSON 2D array or {"SheetName": [[...]]} Example: '[["Name","Age"],["Alice",30]]' Files over 50 lines will generate performance notes but are still written successfully. Only works within allowed directories. IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths. This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
Desktop Commander MCP
Search, update, manage files and run terminal commands with AI
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.
👋 We’re hiring — come build with us: https://desktopcommander.app/careers/
🖥️ Try the Desktop Commander App (Beta)
Want a better experience? The Desktop Commander App gives you everything the MCP server does, plus:
- Use any AI model — Claude, GPT-4.5, Gemini 2.5, or any model you prefer
- See file changes live — visual file previews as AI edits your files
- Add custom MCPs and context — extend with your own tools, no config files
- Coming soon — skills system, dictation, background scheduled tasks, and more
👉 Download the App (macOS & Windows)
The MCP server below still works great with Claude Desktop and other MCP clients — the app is for those who want a dedicated, polished experience.
Table of Contents
- Features
- How to install
- Getting Started
- Usage
- Handling Long-Running Commands
- Work in Progress and TODOs
- Sponsors and Supporters
- Website
- Media
- Testimonials
- Frequently Asked Questions
- Contributing
- License
All of your AI development tools in one place. Desktop Commander puts all dev tools in one chat. Execute long-running terminal commands on your computer and manage processes through Model Context Protocol (MCP). Built on top of MCP Filesystem Server to provide additional search and replace file editing capabilities.
Features
- Remote AI Control - Use Desktop Commander from ChatGPT, Claude web, and other AI services via Remote MCP
- File Preview UI - Visual file previews in Claude Desktop with rendered markdown, inline images, expandable content, and quick "Open in folder" access
- Enhanced terminal commands with interactive process control
- Execute code in memory (Python, Node.js, R) without saving files
- Instant data analysis - just ask to analyze CSV/JSON/Excel files
- Native Excel file support - Read, write, edit, and search Excel files (.xlsx, .xls, .xlsm) without external tools
- PDF support - Read PDFs with text extraction, create new PDFs from markdown, modify existing PDFs
- DOCX support - Read, create, edit, and search Word documents (.docx) with surgical XML editing and markdown-to-DOCX conversion
- Interact with running processes (SSH, databases, development servers)
- Execute terminal commands with output streaming
- Command timeout and background execution support
- Process management (list and kill processes)
- Session management for long-running commands
- Process output pagination - Read terminal output with offset/length controls to prevent context overflow
- Server configuration management:
- Get/set configuration values
- Update multiple settings at once
- Dynamic configuration changes without server restart
- Full filesystem operations:
- Read/write files (text, Excel, PDF, DOCX)
- Create/list directories
- Recursive directory listing with configurable depth and context overflow protection for large folders
- Move files/directories
- Search files and content (including Excel content)
- Get file metadata
- Negative offset file reading: Read from end of files using negative offset values (like Unix tail)
- Code editing capabilities:
- Surgical text replacements for small changes
- Full file rewrites for major changes
- Multiple file support
- Pattern-based replacements
- vscode-ripgrep based recursive code or text search in folders
- Comprehensive audit logging:
- All tool calls are automatically logged
- Log rotation with 10MB size limit
- Detailed timestamps and arguments
- Security hardening:
- Symlink traversal prevention on file operations
- Command blocklist with bypass protection
- Docker isolation for full sandboxing
- See SECURITY.md for details
How to install
Install in Claude Desktop
Desktop Commander offers multiple installation methods for Claude Desktop.
📋 Update & Uninstall Information: Options 1, 2, 3, 4, and 6 have automatic updates. Option 5 requires manual updates. See below for details.
Option 1: Install through npx ⭐ Auto-Updates (Requires Node.js)
Just run this in terminal:
npx @wonderwhy-er/desktop-commander@latest setup
For debugging mode (allows Node.js inspector connection):
npx @wonderwhy-er/desktop-commander@latest setup --debug
Command line options during setup:
--debug: Enable debugging mode for Node.js inspector--no-onboarding: Disable onboarding prompts for new users
Restart Claude if running.
✅ Auto-Updates: Yes - automatically updates when you restart Claude
🔄 Manual Update: Run the setup command again
🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove
Option 2: Using bash script installer (macOS) ⭐ Auto-Updates (Installs Node.js if needed)
curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
This script handles all dependencies and configuration automatically.
✅ Auto-Updates: Yes
🔄 Manual Update: Re-run the bash installer command above
🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove
Option 3: Installing via Smithery ⭐ Auto-Updates (Requires Node.js)
- Visit: https://smithery.ai/server/@wonderwhy-er/desktop-commander
- Login to Smithery if you haven't already
- Select your client (Claude Desktop) on the right side
- Install with the provided key that appears after selecting your client
- Restart Claude Desktop
✅ Auto-Updates: Yes - automatically updates when you restart Claude
🔄 Manual Update: Visit the Smithery page and reinstall
Option 4: Add to claude_desktop_config manually ⭐ Auto-Updates (Requires Node.js)
Add this entry to your claude_desktop_config.json:
- On Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%\Claude\claude_desktop_config.json - On Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"desktop-commander": {
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander@latest"
]
}
}
}
Restart Claude if running.
✅ Auto-Updates: Yes - automatically updates when you restart Claude
🔄 Manual Update: Run the setup command again
🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove or remove the entry from your claude_desktop_config.json
Option 5: Checkout locally ❌ Manual Updates (Requires Node.js)
git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
cd DesktopCommanderMCP
npm run setup
Restart Claude if running.
The setup command will install dependencies, build the server, and configure Claude's desktop app.
❌ Auto-Updates: No - requires manual git updates
🔄 Manual Update: cd DesktopCommanderMCP && git pull && npm run setup
🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove or remove the cloned directory and MCP server entry from Claude config
Option 6: Docker Installation 🐳 ⭐ Auto-Updates (No Node.js Required)
Perfect for users who want isolation or don't have Node.js installed. Runs in a sandboxed Docker container with a persistent work environment.
Prerequisites: Docker Desktop installed and running, Claude Desktop app installed.
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'))
The installer will check Docker, pull the image, prompt for folder mounting, and configure Claude Desktop.
Docker persistence: Your tools, configs, work files, and package caches all survive restarts.
Alternatives
Related Skills
Browse all skillsThis skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
Comprehensive guide for creating professional UI/UX designs in Penpot using MCP tools. Use this skill when: (1) Creating new UI/UX designs for web, mobile, or desktop applications, (2) Building design systems with components and tokens, (3) Designing dashboards, forms, navigation, or landing pages, (4) Applying accessibility standards and best practices, (5) Following platform guidelines (iOS, Android, Material Design), (6) Reviewing or improving existing Penpot designs for usability. Triggers: "design a UI", "create interface", "build layout", "design dashboard", "create form", "design landing page", "make it accessible", "design system", "component library".
UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.
Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors.
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Install Desktop Commander MCP for desktop automation. Use when user needs file/app/command control.