Can Desktop Commander MCP be locked down enough for staff laptops?
A security lead deciding whether staff may run the local Desktop Commander MCP server should know that the vendor documents file and command controls (allowed folders, blocked commands and approvals) but no enterprise policy, role-based access or central enforcement. These controls are not a wall. Terminal commands can still reach folders outside the allowed list, so any hard limit must come from the environment: the local MCP running in Docker with only needed folders shared, a virtual machine, a separate user account, or a separate computer. Treat the in-app settings as guardrails that reduce everyday mistakes, not as the boundary that stops a compromised or manipulated session.
The default posture is permissive. By default Desktop Commander runs as the user account that launched it and can open any file and run any command that account can. Until allowed folders are set, it can work with files anywhere on the computer. The vendor blocks admin commands such as sudo by default, along with shutdown, reboot, format and diskpart, and Windows commands such as reg and net. Blocking works by command name, so blocking git stops every git command, which can break developer workflows and tempt staff to edit the list. Settings live in config.json in the .claude-server-commander folder of the home folder, under the keys allowedDirectories and blockedCommands. Because that file sits in the user's home folder, a staff member can edit it unless the account or device is managed.
Before approving staff laptops, confirm in your own environment: whether a managed device can stop users from editing config.json; whether approvals remain on for every tool call in your build; which folders, if any, the allowed list must cover for your teams; whether a Docker, virtual machine or separate-account pattern fits each role; and whether staff will use the local version or Desktop Commander Remote, which routes calls through the vendor's servers. Test the chosen setup with hidden instructions placed in files, web pages and emails, because the vendor warns that these can direct the AI. Review the vendor's safe-use guidance against your own test results before writing the approval.
Security controls by mode and deployment option
This table compares how the local MCP server, the Docker local setup and Desktop Commander Remote handle file access, command limits, approvals, isolation, sign-in and logging. Treat the settings in the local columns as controls you configure on the machine, and treat any cell marked for confirmation as an open question for the vendor. The main takeaway is that allowed folders and blocked commands are not a hard boundary, so approvals and isolation carry much of the weight.
| Control | Local MCP | Docker local MCP | Desktop Commander Remote |
|---|---|---|---|
| Default file access | Any file and any command the user account can reach, running as that user | Same default, unless only needed folders are shared into the container | Confirm with vendor which local files a Remote session can reach |
| Allowed folders | Set with allowedDirectories in config.json; applies to reading, writing and searching files | Folder sharing limits what the container sees; confirm how allowedDirectories behaves inside it | Confirm with vendor whether allowedDirectories applies to Remote sessions |
| Blocked commands | Set with blockedCommands; sudo, shutdown, reboot, format, diskpart, reg and net blocked by default | Confirm with vendor that the same list is enforced inside the container | Confirm with vendor whether blockedCommands is enforced for Remote calls |
| Approvals | Keep approvals on; the vendor advises refusing unrequested changes to settings | Keep approvals on; the same prompts apply to commands run through the container | Confirm with vendor which actions prompt for approval in Remote sessions |
| Docker isolation | Not applied; the server runs directly on the computer | Vendor suggests Docker with only needed folders shared, which limits what the container can see | Not applicable; calls route through vendor servers |
| VM, separate user or separate computer | Not applied by default; vendor suggests one of these for hard limits | Can be combined with Docker on a host that is itself isolated | Confirm with vendor where Remote commands execute |
| Remote mode account and OAuth | No Desktop Commander account needed for the local server | No Desktop Commander account needed for the local server | Requires an account; calls route through vendor servers. Confirm OAuth details with vendor |
| Admin-enforced policy | Not documented in supplied sources; confirm with vendor whether any central policy exists | Confirm with vendor; container settings are managed by your platform team | Confirm with vendor whether admins can set or lock policy for accounts |
| Audit logging | Confirm with vendor what activity is recorded locally and where it is kept | Confirm with vendor; container and host logs may be needed alongside any app logs | Confirm with vendor what activity is logged and how long it is retained |
How Desktop Commander decides what the agent can touch
The MCP server process runs as the user account that started it, and that account sets the outer limit. The AI client sends tool calls to the Desktop Commander server, and the server decides whether each call proceeds. Enforcement lives in the server, which reads its settings from config.json in the .claude-server-commander folder of the home folder. Two keys carry most of the policy. allowedDirectories governs reading, writing and searching of files, and blockedCommands governs terminal commands. Until allowed folders are set, the vendor's help page says the tool can work with files anywhere on the computer, so the first decision for any rollout is which folders go into that list and who controls the file. Confirm the exact file location and key behavior on the version your staff install, because the settings file is the control point an administrator will need to inspect.
The gap that matters most is that allowed folders do not bound shell access. The vendor states that terminal commands can still reach other folders, and that allowed folders and blocked commands are not a wall. A user who approves a shell command that reads a file outside the allowed list has, in effect, bypassed the folder restriction. Treat allowedDirectories as a guard on the file tools only, and plan hard limits elsewhere. The vendor's own options for that are running the local server in Docker with only needed folders shared, or using a virtual machine, a separate user account or a separate computer. Those are architectural decisions, so they belong in the rollout design before any staff member connects the tool.
blockedCommands works by command name, not by intent. Blocking git therefore blocks every git subcommand, and blocking a narrow operation is not possible through this key. The default list includes sudo, shutdown, reboot, format and diskpart, plus Windows commands such as reg and net. Review that list against what your engineers legitimately need, since a broad block can push people toward workarounds. Approvals are the other check, and they are a user-side control: the person at the keyboard confirms each action. The vendor advises keeping approvals on and refusing any unrequested change to Desktop Commander settings, because files, web pages and emails can carry hidden instructions aimed at the AI. Ask your security team to confirm how approvals behave in your deployment, and whether the settings file can be made read-only for standard users.
Decisions the organization must make before approval
Desktop Commander runs with the same reach as the user account it starts under, so most approval decisions come down to how much of that reach you remove before staff use it. The cards below cover the account, the folders, the blocked commands, approvals, isolation and whether Remote mode is allowed at all.
Which user account runs the server
By default Desktop Commander can open any file and run any command that the signed-in user account can, and it runs as that account and no more. A standard user account limits the damage a prompt-injected or mistaken command can do, while an administrator account gives the agent that same administrator reach. Ask IT to confirm the account type on each managed device before approving, and treat any shared or privileged workstation as out of scope for the first rollout.
Safe use guidanceWhich folders become allowed directories
Until allowed folders are set, Desktop Commander can work with files anywhere on the computer. Each folder you list in allowedDirectories should be checked for regulated content such as patient records, cardholder data, personal data or client files before it is added. Allowed folders cover reading, writing and searching, but terminal commands can still reach other folders, so the list narrows file access without acting as a wall.
Which commands go on the blocked list
The default blocked list includes sudo, shutdown, reboot, format and diskpart, plus Windows commands such as reg and net. Blocking works by command name, so blocking git stops every git command, including read-only status and log checks that developers rely on. Decide which tools are essential, which are high risk, and which need a written exception, and confirm the list in blockedCommands before rollout.
Whether approvals stay on
The vendor advises keeping approvals on and refusing unrequested changes to Desktop Commander settings, because files, web pages and emails can carry hidden instructions aimed at the AI. Turning approvals off for speed removes the one step where a person sees a proposed command or edit before it runs. Decide who is accountable for approving actions, whether that role differs by device, and how a user reports an approval they did not expect.
Docker or VM isolation with shared folders
For hard limits, the vendor suggests running the local MCP in Docker with only the needed folders shared, or using a virtual machine, a separate user account or a separate computer. Container or VM isolation is the only option in this list that limits what a terminal command can reach outside the shared folders. Ask the team to document which folders are mounted, which network paths remain open, and who maintains the image.
Whether Remote mode is permitted
Remote mode lets ChatGPT, Claude web and other AI services use Desktop Commander through Remote MCP, and the vendor's privacy article says Desktop Commander Remote has an account and routes calls through the vendor's servers. Local and Remote use are different data paths with different approval questions. Most organizations will want to block Remote mode until security has reviewed the vendor's data terms, sign-in method and retention for that route.
Data privacy articleHow the answer changes by deployment situation
On a developer laptop signed in with a standard account, the vendor documents that Desktop Commander can open any file and run any command that the user account can, and that it runs as that account and no more. Admin commands such as sudo are blocked by default, but everything the account can read stays reachable until you narrow the setup. The vendor safe-use guide lists the settings to review first.
- Default reach: Until allowed folders are set, file tools can work with files anywhere the account can reach.
- Allowed folders: Set
allowedDirectoriesinconfig.jsonin the.claude-server-commanderfolder of the home folder to cover only the project folders in scope. - Terminal reach: Allowed folders govern reading, writing and searching, but terminal commands can still reach other folders.
- Blocked commands: Review
blockedCommands, since blocking works by command name and blocking git blocks every git command. - Approvals: Keep approvals on, as the vendor advises, and refuse unrequested changes to Desktop Commander settings.
Before approving this setup, confirm that the standard account holds no credentials or data the coding task does not need, and that the team can explain exactly what the allowed folder list covers.
On a workstation that holds protected data, such as patient, cardholder or personnel records, the main exposure is that the account often reaches more data than the agent task requires. The vendor says allowed folders and blocked commands do not form a hard limit on their own, because terminal commands can still reach other folders. Hard limits therefore need to sit outside the configuration file.
- Dedicated account: Run the server under a separate user account that has no access to shared drives, protected data stores or other staff profiles.
- Docker with shared folders: The vendor suggests running the local MCP in Docker with only the needed folders shared, using the
mcp/desktop-commanderimage. - Virtual machine: A VM keeps workstation data out of reach unless you map it in, which fits shared machines where a second user is present.
- Separate computer: For the strictest separation, the vendor lists a separate computer as an option.
- Endpoint policy: Confirm with your endpoint team how disk encryption, data loss prevention and logging interact with the chosen isolation method.
Before approval, confirm which account the process runs under and list every folder and system resource that account can reach.
The README says Remote mode lets ChatGPT, Claude web and other AI services use Desktop Commander through Remote MCP. The vendor's privacy article separates this from the local MCP version, because Desktop Commander Remote has an account and routes calls through the vendor's servers. That changes the data path, so the local hard limits no longer describe everything that leaves the machine.
- Account requirement: Remote mode depends on a Desktop Commander account, which the local version does not require.
- Routing: Calls pass through vendor servers, so the vendor sits in the data path alongside the AI service.
- Local settings: Confirm whether
allowedDirectoriesandblockedCommandsinconfig.jsonapply to calls arriving through Remote mode before relying on them. - Hidden instructions: The vendor warns that web pages and emails can carry hidden instructions for the AI, so keep approvals on for any session that reads external content.
- Retention: Check the privacy article for what Remote stores and how deletion works before approving users.
Decide per user and per AI service whether Remote mode is permitted, and record it in your review as a separate data flow.
The supplied vendor material does not document an air-gapped or offline deployment, so do not assume one exists. The README lists an npx setup command, a Docker image named mcp/desktop-commander and manual configuration for any MCP-compatible client, and the install route determines what must be fetched and from where. Remote mode does not fit a network where calls cannot reach the vendor's servers, because it routes calls through them.
- Remote mode excluded: Block Remote mode on any network segment where routing through vendor servers is not permitted.
- Install source: Choose how the server and its dependencies arrive, whether through the npm package, the Docker image or a copy you host, and confirm with the vendor how updates are delivered.
- Network destinations: Ask the vendor which destinations the local version contacts, and check the privacy article for telemetry settings.
- Hard limits: Docker with only needed folders shared, or a VM on an isolated network segment, are the hard limits the vendor suggests.
- Model endpoint: The AI client sends tool output to its model provider, so confirm that provider is reachable from the restricted network under your policy.
Get written answers on each network destination and update path before approving any deployment on a restricted network.
Layers that limit the agent on a computer
The flow starts with the AI client sending tool calls to the local Desktop Commander MCP server. The server checks the allowedDirectories and blockedCommands settings in config.json and can request approval before the call runs as your user account. The terminal path is the important exception: terminal commands can still reach folders outside the allowed list, so the settings are not a wall. The outer boundary, a Docker container with only needed folders shared, a virtual machine, a separate user account or a separate computer, is the layer that enforces hard limits. Check each hand-off and confirm the boundary you actually rely on.
How tool calls pass through settings and approval before running on the computer.
Order of work before and after approval
This sequence turns the vendor's default-open posture into a configuration you can defend, and it records what was verified before anyone is allowed to use the tool. Each step ends with a check that a reviewer can repeat after every Desktop Commander update.
Confirm current vendor controls in the help pages
The security reviewer reads the vendor's safe-use and limit-access help article and its data privacy article, then notes the current defaults for allowed folders, blocked commands and approvals. Record the version of the server you intend to deploy, because the README and install commands point to @latest. Done means you have a dated written record of the defaults you are approving, and you know which documented behaviors you must test rather than assume.
Choose the user account and isolation boundary
The IT or platform team decides which operating system user account the server will run under and whether that account is enough of a boundary. The vendor states that by default Desktop Commander runs as the user account and can open any file and run any command that account can. If the account holds access to sensitive data, plan for a separate user account, a virtual machine, Docker with only needed folders shared, or a separate computer. Done means the boundary is named in the approval record with the folders and credentials it can reach.
Set allowed folders and blocked commands centrally
The endpoint administrator sets the allowedDirectories and blockedCommands keys in the config.json file in the .claude-server-commander folder of the home folder, using managed device controls where your fleet supports them. Confirm that the default blocked list (including sudo, shutdown, reboot, format, diskpart, reg and net) is retained, and add any further commands your policy requires. Remember that allowed folders limit reading, writing and searching only, and that terminal commands can still reach other folders. Done means a config file that matches the approved template is present on each managed device.
Keep approvals on and lock settings changes
The administrator confirms that tool approvals remain enabled for every user and that the Desktop Commander settings cannot be changed without review. The vendor advises refusing any unrequested change to its settings, so staff should be told that a prompt asking to edit configuration is a warning sign. Test this by asking the assistant to alter the blocked list and confirming that the change is refused or requires explicit approval. Done means a recorded test result for the approval and settings-change behavior.
Decide whether Remote mode is permitted
The data owner and security reviewer decide whether Remote mode, which routes calls through the vendor's servers and requires an account, is allowed at all. Use the data privacy article to confirm what leaves the device in each mode and how the AI provider receives it. If Remote mode is permitted, record the accounts and devices it covers and confirm how sign-in is handled. Done means a written decision that names the permitted mode per user group.
Test prompt injection and file exposure
A security engineer runs controlled tests against the configured setup, placing a document, web page or email with hidden instructions in the allowed folders and checking whether the assistant follows them, reads files outside allowed folders through terminal commands, or attempts a blocked command. The vendor warns that files, web pages and emails can carry hidden instructions. Record each finding with the exact configuration tested. Done means a findings report with pass or fail results and fixes assigned to an owner.
Approve, then recheck after each update
The approver signs off only when the test findings are closed or accepted in writing, and the rollout is limited to the approved user group and mode. After every Desktop Commander update, including any change picked up by an unpinned install command, the security team repeats the configuration check and the injection and exposure tests. Done means a change log entry for each update that shows the config was reviewed and the test results still hold.
What a security reviewer asks to see
This table pairs each control a reviewer should verify with the evidence to request and where that control lives in Desktop Commander. Several rows depend on the organization generating its own evidence on its own machines, because the vendor defaults leave file and command reach wide open. Read it as a checklist: a row without evidence from your environment is an open finding.
| Control question | Evidence to request | Where it comes from in Desktop Commander |
|---|---|---|
| Which account does it run as? | Documented run-as user, and proof from a test machine that the process cannot read files outside that user's permissions | The vendor states it runs as the user account and no more, and by default can open any file and run any command that account can |
| Which folders can it reach? | Current allowedDirectories value from each managed machine, and a test showing reads and writes outside those folders are refused | allowedDirectories in config.json; until set, file access is not limited to a folder list |
| Does terminal access stay inside allowed folders? | A test showing terminal commands that reference other folders, and the organization's decision on whether that reach is acceptable | The vendor says allowed folders cover file reading, writing and searching, but terminal commands can still reach other folders |
| Which commands are blocked? | Current blockedCommands list, with the default list compared to the organization's own requirements | blockedCommands in config.json; the default list includes sudo, shutdown, reboot, format, diskpart, plus reg and net on Windows |
| Is blocking by command name sufficient? | Test results showing whether blocking one tool also blocks its other subcommands, and a documented reason for each exception | The vendor says blocking works by command name, so blocking git blocks every git command |
| Are approvals turned on? | Screenshot or config evidence that approval prompts are enabled on every managed client, and the written rule for refusing unrequested changes | Vendor advises keeping approvals on and refusing unrequested changes to Desktop Commander settings |
| What is the isolation boundary? | Architecture record naming the chosen boundary (Docker with only needed folders shared, a virtual machine, a separate user account, or a separate computer) and a test showing the boundary holds | Vendor suggests these options for hard limits; the organization must build and test the one it selects |
| Is Remote mode enabled or blocked? | Inventory showing which devices have Remote mode in use, and the account records tied to them, or a policy blocking it | Desktop Commander Remote has an account and routes calls through vendor servers, unlike the local MCP version; no SSO or admin approval is documented |
| Has config.json been tampered with? | Hash or copy of the approved config.json, file permission settings on the .claude-server-commander folder, and a change-detection alert | Settings live in config.json in the .claude-server-commander folder of the home folder; the organization must monitor it |
| Is the vendor security policy and license acceptable? | Copy of the repository security policy and the MIT license text, reviewed by legal and security, plus a record of the version deployed | The GitHub repository shows the MIT license badge and a linked security policy; only wonderwhy-er/DesktopCommanderMCP and desktopcommander.app are treated as official |
Questions to answer before approving Desktop Commander
Does Desktop Commander support SSO or admin enforcement?
The vendor material reviewed here does not describe SSO, SCIM or central admin enforcement for the local MCP server, so treat both as unavailable until the vendor confirms them in writing. The local server is configured on each computer through config.json in the .claude-server-commander folder of the home folder, using the keys allowedDirectories and blockedCommands. Because that file sits in the user's home folder, nothing in the documentation stops a staff member from editing it. Ask the vendor whether any managed or policy-based configuration exists and whether Remote mode has an admin console. Record the answer in your approval file, because it determines whether you need endpoint management tooling to enforce the settings yourself.
What drives the effort to harden Desktop Commander?
Effort scales with three factors: the number of machines, the isolation option you choose, and how far the testing goes. Each computer needs its own config.json with allowed folders and blocked commands, so the machine count multiplies the setup and verification work. The isolation choice changes the work the most. Running the local server in Docker with only the needed folders shared, inside a virtual machine, under a separate user account, or on a separate computer each requires different build, access and maintenance steps. Testing scope then decides how much of that work is verified. A configuration review covers less than a test of prompt injection, file permissions and credential handling. Ask any provider for a written breakdown per machine group and per isolation option before agreeing on time or cost.
Can staff configure Desktop Commander settings themselves?
Yes. Staff can install the server through the documented routes and edit the settings file on their own computer, so self-configuration needs no admin involvement. The vendor advises keeping approvals on and refusing unrequested changes to Desktop Commander settings, which leaves enforcement with the person at the keyboard. Your default position should therefore be user-controlled unless you change it. Workable options include publishing a standard config.json with approved allowed folders and blocked commands and asking staff to keep it, running the server only in an isolated container or virtual machine that IT builds, or restricting installation through your endpoint management tooling. Choose one before rollout. A file the user can rewrite provides no enforcement.
What does a scoped outside security review of Desktop Commander cover?
A scoped review by DeployOpen tests your setup before or after rollout, and it does not review the vendor's code. For AI agent rollouts, DeployOpen tests prompt injection, tool and file permissions, data exposure, credential handling, and SSO and admin settings, then delivers a findings report with fixes and a retest. For Desktop Commander, the practical scope usually includes the allowed folder list, whether terminal access can reach folders or commands the settings were meant to block, the isolation boundary in place, the user account the server runs under, and whether Remote mode can be reached from managed machines. The output is a findings report and a retest, and it does not include an audit report or certification. Agree the machines, configurations and test accounts in writing before work starts.
Can Remote mode be blocked on company computers?
The vendor material reviewed here does not describe an admin setting that disables Remote mode, so confirm with the vendor before assuming it can be blocked. Remote mode uses an account and routes calls through the vendor's servers, and the vendor's privacy article treats it separately from the local MCP version. An approval that covers the local server therefore does not automatically cover Remote mode. Ask the vendor how Remote mode is enabled, whether an organization can prevent account creation on managed devices, and what activity is logged. If the answer is no, apply network egress controls and endpoint policy that your team manages, then test that the blocks hold before approving the tool.
How do updates change Desktop Commander's security controls?
The npm install commands in the README use @wonderwhy-er/desktop-commander@latest, so a restart can pull the newest release unless you pin a version. A new release can change defaults, config keys, or how allowed folders and blocked commands behave. The material reviewed here does not describe a versioned security policy or a change-notification process beyond the repository's linked security policy, so ask how release notes are published and how security fixes are announced. Also confirm whether a specific version can be pinned in the Claude Code and Codex add commands and whether the Docker image can be pinned by tag. After every update, rerun your checks: confirm allowed folders, confirm blocked commands still block, and confirm approvals still prompt. Treat the tested version as the approved version and record it.
How DeployOpen tests and hardens a Desktop Commander rollout
DeployOpen tests the Desktop Commander MCP setup your staff actually run, then hardens the allowed folders, blocked commands, approval settings and isolation around it. The work runs as a fixed-scope engagement with written deliverables, and the findings and fixes are documented for your security and compliance reviewers.
How we scope
- Written scope lists which computers, user accounts and install routes are covered, such as npx, Docker or manual configuration.
- Scope names whether Remote mode is in or out, since it routes calls through the vendor's servers.
- Scope confirms which AI clients connect, such as Claude Desktop, Claude Code or Codex, and who approves changes.
How we build
- We review the
config.jsonsettings forallowedDirectoriesandblockedCommandsagainst the vendor's documented defaults. - We test whether terminal commands reach folders outside the allowed list, and whether blocked commands can be bypassed.
- We test prompt injection through files, web pages and emails, and check that approvals stay on and settings cannot be changed silently.
How we hand over
- You receive a findings report with the tested configuration, the risks found and the recommended fix for each.
- Hardening covers the controls you choose, such as Docker with only needed folders shared, a separate user account, or a separate computer.
- We retest after fixes and document the final state so your reviewers can check the evidence.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer when the tool or your policy changes.
- Retesting can follow new releases of the server or changes to the AI client that calls it.
- Pricing follows from the written scope, and DeployOpen does not publish a price list.

