# Desktop Commander

> Desktop Commander is an open-source MCP server for developer tools. Local MCP server for terminal commands, file editing and process control in one chat. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, CLI
- **Website:** https://desktopcommander.app
- **Repository:** https://github.com/wonderwhy-er/desktopcommandermcp
- **GitHub stars:** 10,482
- **License:** MIT
- **MCP Registry name:** io.github.wonderwhy-er/desktop-commander
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [files and documents](https://ai-powered.com/categories/files-and-documents)
- **Listing updated:** 2026-12-01

## About

Desktop Commander runs on your own machine and lets an assistant execute terminal commands, stream their output and manage long-running processes such as SSH sessions, databases and dev servers. It builds on the MCP Filesystem Server and adds search and replace editing, recursive directory listings and tail-style reading with negative offsets.

Beyond text files it reads and edits Excel, PDF and Word documents, runs Python, Node.js or R in memory for quick CSV and JSON analysis, and keeps a local history of tool calls with size-based rotation. A remote mode lets ChatGPT and Claude on the web reach the same machine, and Claude Desktop gets a file preview with a markdown editor.

The README describes safeguards, symlink traversal prevention and a command blocklist, but says they are not a sandbox. Docker isolation is available for a contained setup. It installs with npx, a macOS script, Smithery or Docker.

## Features

- **Terminal control:** Run commands with streaming output, timeouts and background runs.
- **Interactive processes:** Work with SSH, databases and dev servers.
- **File editing:** Surgical replacements, full rewrites and ripgrep search.
- **Office formats:** Read and edit Excel, PDF and DOCX files.
- **In-memory code:** Execute Python, Node.js or R without saving files.
- **Local audit history:** Tool calls recorded on the machine.

## Good for

- Run builds and long commands from chat
- Edit code across several files
- Analyse a CSV or Excel file
- Convert markdown to PDF or Word
- Drive an SSH session from an assistant

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

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

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.desktop-commander]
command = "npx"
args = ["-y", "@wonderwhy-er/desktop-commander"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user desktop-commander npx -- -y @wonderwhy-er/desktop-commander

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

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

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

From the tool list in its README, going by the names, all 1 tool only read data. From the server's own tool labels and tool names; not verified by us.

- `get_recent_tool_calls` (name suggests: reads): Recent tool-call history with bounded output previews.

## FAQ

### Is Desktop Commander a sandbox?

No. The README says the guardrails are not a sandbox; Docker gives isolation.

### How is Desktop Commander installed?

With npx setup, a macOS script, Smithery, manual config or Docker.

### Can ChatGPT use Desktop Commander?

Yes, through the Remote MCP option.

### Which file types does Desktop Commander handle?

Text, Excel, PDF and DOCX.

### Is Desktop Commander free?

Yes. Desktop Commander is open source, so you can use and self-host it for free.

### How do I add Desktop Commander to Claude Code?

Run this command in your terminal: claude mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander

### What are the best alternatives to Desktop Commander?

The closest alternatives to Desktop Commander are REA, Codebase Memory, Serena MCP: the IDE for your agent, XERJ and Context7.

## Where this comes from

- Description: written from the project's README and the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/desktop-commander
