Desktop Commander — Claude Code MCP server: features and install
This MCP server lets an agent run terminal commands, work with files, and manage processes. Use it to delegate project edits or document tasks.
claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commanderWhat Desktop Commander does
Desktop Commander runs terminal commands, streams their output, and lets the agent inspect or stop processes. Long-running commands can run in the background with session management. The server also reads and edits files, searches file contents, and applies replacements across multiple files.
Separate tools handle Excel, PDF, and DOCX files, including reading and editing documents. Code and text searches across folders use vscode-ripgrep. Tool calls and their arguments are recorded locally.
The server prevents symlink traversal and has a command blocklist, but it is not a sandbox. Installing through npx requires Node.js; the Claude Code setup command starts the package with npx.
What it helps with
- run a terminal command and inspect its output
- find text across project files
- replace a fragment in multiple files
- read or edit PDF, Excel, and DOCX documents
- inspect running processes and stop one
Example prompts for the agent
- Run the project tests in the terminal and show me the output.
- Find
oldNamein the project files and replace it withnewName. - Read
report.pdfand extract its text.
How to install Desktop Commander
Platform CLI
claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commanderPlatform CLI
codex mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commanderConfig file
{
"mcpServers": {
"desktop-commander": {
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander"
]
}
}
}Config file
{
"servers": {
"desktop-commander": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander"
]
}
}
}Platform CLI
gemini mcp add desktop-commander npx -y @wonderwhy-er/desktop-commanderStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Desktop Commander
How do I install Desktop Commander in Claude Code?
Run claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander. Installing through npx requires Node.js.
What does Desktop Commander do?
It gives an agent tools to run terminal commands, edit and search files, and manage processes. It can also read and edit Excel, PDF, and DOCX documents.
Is Desktop Commander a sandbox?
No. It prevents symlink traversal and includes a command blocklist, but it does not isolate execution as a sandbox would.