Desktop Commander MCP is an MCP server that gives Claude Desktop terminal control, file system search, and code editing capabilities. It enables Claude to execute terminal commands, manage processes, read/write files, search code, and perform precise text replacements. Features include interactive process control, in-memory code execution, data analysis, and complete development environment integration without additional API costs.
Get the complete server configuration as JSON, including blockedCommands, defaultShell, allowedDirectories, fileReadLineLimit, fileWriteLineLimit, and telemetryEnabled settings.
Set a specific configuration value by key. Available settings include:
blockedCommands
: Array of shell commands that cannot be executeddefaultShell
: Shell to use for commands (e.g., bash, zsh, powershell)allowedDirectories
: Array of filesystem paths the server can access for file operationsfileReadLineLimit
: Maximum lines to read at once (default: 1000)fileWriteLineLimit
: Maximum lines to write at once (default: 50)telemetryEnabled
: Enable/disable telemetry (boolean)Start programs with smart detection of when they're ready for input. Supports interactive processes and long-running commands.
Send commands to running programs and get responses. Enables interaction with SSH sessions, databases, development servers, and other interactive processes.
Read output from running processes. Useful for monitoring command execution and retrieving results from background processes.
Force terminate a running terminal session. Provides process cleanup and termination capabilities.
List all active terminal sessions. Shows currently running processes and their session information.
List all running processes with detailed information including PID, memory usage, and process details.
Terminate a running process by PID. Provides process management and cleanup functionality.
Read contents from local filesystem or URLs with line-based pagination. Supports positive/negative offset and length parameters for flexible file reading.
Read multiple files simultaneously. Efficient batch file reading for comparing or analyzing multiple files at once.
Write file contents with options for rewrite or append mode. Uses configurable line limits for controlled file writing operations.
Create a new directory or ensure it exists. Provides directory creation with proper error handling.
Get detailed listing of files and directories. Shows file metadata, permissions, and directory structure information.
Move or rename files and directories. Supports file system reorganization and file management operations.
Find files by name using case-insensitive substring matching. Provides file discovery capabilities across directory structures.
Search for text/code patterns within file contents using ripgrep. Enables powerful code exploration and pattern matching across codebases.
Retrieve detailed metadata about a file or directory. Provides comprehensive file information including size, permissions, and timestamps.
Apply targeted text replacements with enhanced prompting for smaller edits. Includes character-level diff feedback, fuzzy search fallback, and multiple occurrence support for reliable code editing.
Get usage statistics for your own insight. Provides local analytics about tool usage patterns, success rates, and performance metrics.
Open feedback form in browser to provide feedback to Desktop Commander Team. Enables user feedback collection for tool improvement.
{
"mcpServers": {
"desktop-commander": {
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander"
]
}
}
}