
Desktop Commander
Powerful local filesystem + terminal MCP server: search, diff-edit files, and run shell commands.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @wonderwhy-er/desktop-commanderPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"desktop-commander": {
"command": "npx",
"args": [
"-y",
"@wonderwhy-er/desktop-commander"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js installed (required for the npx, bash-installer, and manual install paths)
- Alternatively Docker, which runs the server without a local Node.js install
- An MCP client such as Claude Desktop, Claude Code, or Cursor
- No credentials or API key needed — auth is none, but it has full access to your local files and shell, so understand the security implications
About Desktop Commander
Desktop Commander is a Model Context Protocol server that gives Claude (and other MCP clients) full local filesystem and terminal access from one server. It can search and read/write files, make surgical diff-style edits, run shell commands, and manage long-running processes — effectively turning an MCP client into a hands-on coding and automation agent on your machine.
On the terminal side it can start processes with readiness detection, stream output, send input to interactive programs (interact_with_process), and list or kill processes. On the filesystem side it offers paginated reads (including URLs, Excel, and PDF), batch reads, directory listing/creation, file moves, fast search with paging, and edit_block for precise text replacements with a fuzzy-match fallback.
It installs via npx, a bash installer, Smithery, or Docker, and auto-updates on the npx path. It collects limited pseudonymous telemetry (no file contents or command arguments) which you can disable by setting telemetryEnabled to false. Because it grants broad local access, review its security model (command blocklists, symlink-traversal prevention, optional Docker sandbox) before running it.
Tools & capabilities (8)
start_process / interact_with_process / read_process_outputLaunch a program with readiness detection, send it input, and read its output — supports interactive and REPL-style sessions.
force_terminate / list_sessions / list_processes / kill_processManage terminal sessions and OS processes: stop a session, list active sessions, list running processes, and kill by PID.
read_file / read_multiple_filesRead local files, URLs, Excel, and PDFs with pagination and negative-offset (tail-style) reads; batch-read several files at once.
write_file / write_pdfCreate or modify files, including Excel and PDF documents.
edit_blockApply targeted text replacements to a file with a fuzzy-search fallback for precise, surgical edits.
create_directory / list_directory / move_file / get_file_infoCreate directories, list directory contents recursively, move/rename files, and fetch file metadata.
start_search / get_more_search_results / stop_searchRun paged file and content searches across the filesystem.
get_config / set_config_valueRead and modify server configuration, including allowed directories, command blocklists, and telemetry settings.
When to use it
- Use it when you want an agent to read, edit, and refactor files across a real local project, not just a sandbox.
- Use it when you need to run build, test, or git commands and have the agent react to their output.
- Use it when driving interactive or long-running processes (REPLs, dev servers) that need input over time.
- Use it when searching a codebase or directory tree for files or content matches.
- Use it when you want surgical, diff-style edits to specific code blocks rather than rewriting whole files.
- Use it when you need to read or generate Office/PDF documents and spreadsheets without extra tooling.
Quick setup
- 1Install via `npx @wonderwhy-er/desktop-commander@latest setup` (or use the bash installer, Smithery, or Docker).
- 2If using manual config, add the server block to your MCP client's config file.
- 3Optionally restrict access by setting allowed directories and command blocklists via set_config_value.
- 4Restart your MCP client (e.g. Claude Desktop) to load the server.
- 5Optionally set `telemetryEnabled` to false to disable pseudonymous usage telemetry.
- 6Verify by asking the agent to list a directory or run a simple shell command.
Security notes
This server can execute arbitrary terminal commands and edit any file your user account can reach, so it effectively grants full machine access; only enable it for trusted sessions. There is no built-in directory sandbox like the reference filesystem server.
Desktop Commander FAQ
Does it need an API key or login?
No. It runs locally with no authentication, but it has broad access to your filesystem and terminal, so treat it like giving an agent a shell on your machine.
How do I restrict what it can access?
Use `set_config_value` to configure allowed directories and command blocklists. You can also run it inside Docker for sandboxing, and it includes symlink-traversal prevention.
Does it send my data anywhere (telemetry)?
It collects limited pseudonymous telemetry that excludes file contents and command arguments. Disable it by setting `telemetryEnabled` to false in the config.
Can I run it without installing Node.js?
Yes. Use the Docker installation option, which runs the server in a container without a local Node.js install.
How does it differ from a plain filesystem MCP server?
It combines filesystem operations with terminal/process control, surgical diff-editing (edit_block), paged search, and Office/PDF reading and writing in one server.
Alternatives to Desktop Commander
Compare all alternatives →Official MCP reference server for secure local filesystem read/write within allowed directories.
Official MCP server for reading, searching, and manipulating a local Git repository's files and history.
Official AWS Labs MCP server to manage and query S3 Tables (table buckets, namespaces, tables).
Compare Desktop Commander with: