DesktopCommanderMCP
MCP server that gives Claude terminal control, file system search, and diff file editing capabilities.
Overview
MCP server that gives Claude terminal control, file system search, and diff file editing capabilities.
Setup
Run with npx:
npx -y @wonderwhy-er/desktop-commanderConfiguration
Add to claude_desktop_config.json mcpServers configurationDocumentation
DesktopCommanderMCP: Terminal Control for Claude
Overview
DesktopCommanderMCP (6,858 stars) is an MCP server that gives Claude desktop-level control: terminal command execution, file system search, and diff-based file editing. Built in TypeScript by wonderwhy-er, it bridges the gap between Claude's native capabilities and full desktop automation, enabling Claude Desktop users to interact with their local environment in ways previously only available to Claude Code.
Features
- Terminal control: Execute arbitrary shell commands with full output capture and streaming
- File system search: Recursive glob and regex search across the entire file system
- Diff-based editing: Intelligent file editing with preview, rollback, and conflict detection
- TypeScript implementation: Fast, typed, well-documented codebase that's easy to extend
- Claude Desktop integration: Seamless setup with Claude Desktop's MCP configuration
Installation
Add to your claude_desktop_config.json:
{
"mcpServers": {
"DesktopCommanderMCP": {
"command": "npx",
"args": ["-y", "@wonderwhy-er/desktop-commander"]
}
}
}
Available Tools
| Tool | Description |
|---|---|
execute_command | Run a shell command and capture output |
search_files | Recursively search files using glob or regex patterns |
edit_file | Apply diff-based edits to files with preview |
read_file | Read file contents with line range support |
list_directory | List directory contents with metadata |
Usage Examples
Terminal Control
Execute: "npm run build" in the project directory
ā DesktopCommanderMCP runs the command and streams output back to Claude
File Search
Find all TypeScript files containing "TODO" in the src directory
ā DesktopCommanderMCP performs a recursive regex search
File Editing
Add error handling to the login function
ā DesktopCommanderMCP reads the file, applies diff edits, and shows the result
Why It Matters
DesktopCommanderMCP addresses a critical gap: Claude's limited access to the local environment. While Claude Code has built-in terminal access, Claude Desktop (and other GUI-based Claude clients) lack it. DesktopCommanderMCP provides that missing capability, enabling Claude to:
- Manage files and directories
- Run scripts and build commands
- Interact with the operating system
- Edit code with intelligent diff-based changes
The project's rapid growth (+349 stars today) confirms that this is a widely needed capability.
Pros
- ā Gives Claude Desktop the terminal access it was missing
- ā Intelligent diff-based editing with rollback support
- ā TypeScript implementation for reliability and extensibility
- ā Easy setup with standard MCP configuration
Cons
- ā Requires npx/node.js runtime
- ā Full terminal access has security implications
- ā Windows compatibility may vary for some commands
