MCP Directory

How to add Desktop Commander to Claude Desktop

Powerful local filesystem + terminal MCP server: search, diff-edit files, and run shell commands. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 15, 2026 ยท 6.2kโ˜… ยท stdio ยท no auth

Claude Desktop config for Desktop Commander

npx -y @wonderwhy-er/desktop-commander
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Desktop Commander config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Desktop Commander's tools appear under the ๐Ÿ”Œ tools menu.

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

What Desktop Commander can do in Claude Desktop

start_process / interact_with_process / read_process_output

Launch 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_process

Manage terminal sessions and OS processes: stop a session, list active sessions, list running processes, and kill by PID.

read_file / read_multiple_files

Read local files, URLs, Excel, and PDFs with pagination and negative-offset (tail-style) reads; batch-read several files at once.

write_file / write_pdf

Create or modify files, including Excel and PDF documents.

edit_block

Apply targeted text replacements to a file with a fuzzy-search fallback for precise, surgical edits.

create_directory / list_directory / move_file / get_file_info

Create directories, list directory contents recursively, move/rename files, and fetch file metadata.

start_search / get_more_search_results / stop_search

Run paged file and content searches across the filesystem.

get_config / set_config_value

Read and modify server configuration, including allowed directories, command blocklists, and telemetry settings.

Security

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 + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Desktop Commander config there under the "mcpServers" key and restart the client.

Is Desktop Commander safe to use with Claude Desktop?

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.

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.

View repo Full Desktop Commander page