Skip to main content
Glama
luffy666code

Desktop Commander MCP

by luffy666code

๐Ÿ–ฅ๏ธ Desktop Commander MCP

Portable, general-purpose filesystem + terminal tools for MCP clients

CI License: MIT Node.js MCP

Search files ยท edit documents ยท run commands ยท manage processes ยท inspect the local workspace

English ยท ็ฎ€ไฝ“ไธญๆ–‡

A community-maintained portable adaptation of Desktop Commander MCP.
It is designed for standard stdio-compatible MCP clients and does not depend on any vendor-specific deployment platform.


โœจ Highlights

Capability

What it gives your AI client

๐Ÿ“ Filesystem

Read, write, move, list, search, and inspect files and directories

๐Ÿ”Ž Fast search

Recursive content search powered by ripgrep

๐Ÿ’ป Terminal

Run shell commands, stream output, and handle long-running processes

โš™๏ธ Process control

List, inspect, and terminate processes

๐Ÿ“ Editing

Targeted text replacement and larger file rewrites

๐Ÿ“Š Documents

Excel, PDF, DOCX, Markdown, text, and binary-aware file handling

๐Ÿงฐ Configuration

Runtime configuration plus a conservative default command blocklist

๐ŸŒ Cross-platform

Windows, Linux, and macOS source installs with runtime ripgrep resolution

Related MCP server: Desktop Commander MCP

๐Ÿš€ Quick start

1. Clone

git clone https://github.com/luffy666code/desktop-commander-mcp.git
cd desktop-commander-mcp

2. Install and build

npm install
npm run build

Requirements: Node.js 18+ and npm.

3. Verify the search engine

npm run verify:rg

4. Add it to your MCP client

Use the standard stdio configuration pattern:

{
  "mcpServers": {
    "desktop-commander": {
      "command": "node",
      "args": ["/absolute/path/to/desktop-commander-mcp/dist/index.js"]
    }
  }
}

Replace the path with the real absolute path on your machine. See Client setup for Windows path examples and Inspector usage.

๐Ÿงญ How it works

MCP client
   โ”‚
   โ”‚ stdio / MCP requests
   โ–ผ
dist/index.js
   โ”‚
   โ–ผ
server + tool handlers
   โ”‚
   โ”œโ”€โ”€ filesystem operations
   โ”œโ”€โ”€ terminal / process manager
   โ”œโ”€โ”€ document utilities
   โ””โ”€โ”€ search manager
          โ”‚
          โ–ผ
       ripgrep

The ripgrep resolver first checks the platform-correct binary in @vscode/ripgrep, then falls back to the package export, the system PATH, and common installation locations. On Unix-like systems it also verifies executable permission.

๐Ÿ” Safety defaults

config.json ships with a conservative blocklist for destructive or privilege-escalating commands such as format, mkfs, fdisk, dd, sudo, and user-management commands.

{
  "blockedCommands": [
    "format", "mount", "umount", "mkfs", "fdisk", "dd",
    "sudo", "su", "passwd", "adduser", "useradd", "usermod", "groupadd"
  ]
}

This is a guardrail, not a sandbox. Review SECURITY.md before using command execution against important data or production machines.

๐Ÿ› ๏ธ Development

# TypeScript watch mode
npm run watch

# Run from TypeScript during development
npm run dev

# Compile
npm run build

# Start compiled server
npm start

# Open MCP Inspector
npm run inspector

Project layout

src/
โ”œโ”€โ”€ index.ts                 # process entry point
โ”œโ”€โ”€ server.ts                # MCP server and tool registration
โ”œโ”€โ”€ handlers/                # request handlers
โ”œโ”€โ”€ tools/                   # filesystem, edit, process, PDF and other tools
โ”œโ”€โ”€ search-manager.ts        # search orchestration
โ”œโ”€โ”€ terminal-manager.ts      # command/session management
โ””โ”€โ”€ utils/
    โ””โ”€โ”€ ripgrep-resolver.ts  # cross-platform ripgrep discovery

๐ŸŒ Portability notes

For normal use, run npm install on the same OS/architecture where the MCP server will run so native dependencies are installed correctly.

The repository also contains an optional Linux x86-64 ripgrep binary under tools/Linux/rg for custom portable packaging workflows. It is not required for ordinary source installs. See tools/README.md.

๐Ÿค Upstream & attribution

This repository is derived from Desktop Commander MCP by Eduard Ruzga and contributors:

Portable packaging and ripgrep-resolution adjustments in this fork are maintained separately. Upstream trademarks, services, and release channels are not implied to endorse this fork.

See LICENSE and THIRD_PARTY_NOTICES.md.

๐Ÿ“„ License

MIT License. See LICENSE.


Built for developers who want a straightforward, local-first MCP tool server.

Related MCP Connectors

Related MCP Servers