Desktop Commander is a Model Context Protocol (MCP) server that gives an AI client such as Claude Desktop the ability to run terminal commands, manage processes, and search and edit files on your machine. It builds on the MCP Filesystem Server and adds search-and-replace editing, process control, and document handling, so an AI assistant can work with code and text, run long-running commands, and automate tasks using the host client's subscription rather than separate API tokens.
The server runs locally through npx (or in a Docker container for isolation) and connects to any MCP-compatible client, including Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Cline, Codex, Gemini CLI, and JetBrains AI Assistant. A Remote MCP option runs a lightweight device agent on your computer that connects to a cloud relay, so web clients such as ChatGPT and Claude web can send commands that execute locally under your user permissions.
Configuration is exposed as tools: getconfig and setconfig_value adjust blocked commands, default shell, allowed directories, file read and write line limits, and telemetry without restarting the server. Safety guardrails include symlink traversal prevention, a command blocklist, and Docker isolation; the project states these are guardrails, not a sandbox, and terminal commands can reach files outside the allowed directories.
A separate Desktop Commander App (beta, macOS and Windows) wraps the same capabilities with model choice across Claude, GPT, and Gemini, live file previews, and custom MCP additions.
Features
- Terminal execution: run commands with streamed output, timeouts, background execution, and session management for long-running processes
- Interactive processes: send input to running SSH sessions, database shells, and development servers
- In-memory code execution: run Python, Node.js, and R snippets without saving files, including ad hoc analysis of CSV, JSON, and Excel data
- Process management: list and kill processes, and page through output with offset and length controls
- Filesystem operations: read and write files, create and list directories recursively with depth limits, move files, get metadata, and read from the end of a file with negative offsets
- Search: ripgrep-based recursive search of code and text, including Excel content
- Editing: surgical text replacements, full rewrites, multi-file and pattern-based changes
- Office documents: read, write, edit, and search Excel (.xlsx, .xls, .xlsm), read and create PDFs from markdown, and edit Word documents with markdown-to-DOCX conversion
- File preview UI: rendered markdown, inline images, a built-in markdown editor, and open-in-folder access inside Claude Desktop
- Audit logging: every tool call is logged with timestamps and arguments, rotated at 10 MB
- Remote MCP: use the server from ChatGPT and Claude web via a locally run device that you stop with Ctrl+C
- Onboarding: offers tutorials to users with fewer than 10 successful commands, or on request
