Is the Desktop Commander MCP server safe? What it can reach
What the Desktop Commander MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
Desktop Commander is a community server by wonderwhy-er that gives an agent a shell and file access on your machine. It has no sign-in for local use, and its own README says it is not a sandbox. Its directory and command limits can be bypassed, so use the Docker install for real isolation.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| Desktop Commander MCP (wonderwhy-er/DesktopCommanderMCP, community) | Community | active |
It runs as a local process on your machine or as a hosted remote server.
How it signs in
The local server has no sign-in, and it acts with your user account’s rights on the machine. A separate Remote Device mode connects to mcp.desktopcommander.app with browser OAuth so web clients can drive your computer.
What its tools can do
| Kind | Tools |
|---|---|
| Read | get_config, read_process_output, list_sessions, list_processes, read_file, read_multiple_files, list_directory, start_search, get_more_search_results, stop_search, list_searches, get_file_info, get_usage_stats, get_recent_tool_calls, give_feedback_to_desktop_commander |
| Write | write_file, write_pdf, create_directory, edit_block |
| Can’t be undone | start_process, interact_with_process, force_terminate, kill_process, move_file, set_config_value |
The README’s own examples also mention execute_command and read_output, which are not in its tool table, so some docs may be out of date. start_process runs any program or shell command you could run, and interact_with_process sends input to it. set_config_value is filed as destructive because it can change blockedCommands and allowedDirectories.
Built-in limits
| Option | What it does |
|---|---|
blockedCommands | A config list of shell commands that cannot run. The README says it can be bypassed with symlinks, command substitution or absolute paths. |
allowedDirectories | Limits the file tools to listed paths. An empty array allows the whole filesystem, and terminal commands can still reach other paths. |
Docker install | docker run -i --rm mcp/desktop-commander:latest is the README’s answer for real isolation. |
telemetryEnabled | Set to false to turn off telemetry. Other settings are defaultShell, fileReadLineLimit and fileWriteLineLimit. |
Separate config chat | The README advises changing settings in a separate chat, because the agent may edit allowedDirectories itself when it hits a block. |
The risks
- start_process can run any command your account can run, so an injected instruction could read your SSH keys, delete files or send data out, and no file or command list reliably stops it.
- set_config_value can rewrite blockedCommands and allowedDirectories, so the agent can lift the limits you set.
- The tool log claude_tool_call.log stores tool arguments without redaction, so pasted secrets and paths can end up on disk.
- Remote Device mode lets ChatGPT or Claude on the web run commands on your computer while it is running, which moves the trust boundary to that web session.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latestClaude Code names MCP tools mcp__desktop-commander__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__desktop-commander__set_config_value",
"mcp__desktop-commander__kill_process",
"mcp__desktop-commander__force_terminate"
],
"ask": [
"mcp__desktop-commander__start_process",
"mcp__desktop-commander__interact_with_process",
"mcp__desktop-commander__move_file",
"mcp__desktop-commander__write_file",
"mcp__desktop-commander__write_pdf",
"mcp__desktop-commander__create_directory",
"mcp__desktop-commander__edit_block"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.desktop-commander]
command = "npx"
args = ["-y", "@wonderwhy-er/desktop-commander@latest"]
disabled_tools = ["set_config_value", "kill_process", "force_terminate"]Checklist
- Run it in Docker or a throwaway VM, not on your main account.
- Set allowedDirectories to one project folder and do not rely on blockedCommands.
- Deny set_config_value so the agent cannot change its own limits.
- Leave Remote Device mode off unless you need it.
Checked against the vendor documentation on November 25, 2026. Desktop Commander README · wonderwhy-er/DesktopCommanderMCP repository
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing