# DesktopCommanderMCP

> MCP Server

Desktop Commander MCP enables Claude to execute terminal commands, manage processes, and perform file system operations, including search and replace, through the Model Context Protocol. It supports long-running commands and session management.

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 9336
- **Forks:** 119
- **Owner:** wonderwhy-er
- **GitHub:** https://github.com/wonderwhy-er/DesktopCommanderMCP
- **Created:** 2024-12-04T08:26:08+00:00
- **Updated:** 2025-03-28T22:07:47+00:00
- **Source:** https://model-context-protocol.com/servers/claude-terminal-file-system-control

## Setup

## Setup
First, ensure you've downloaded and installed the [Claude Desktop app](https://claude.ai/download) and you have [npm installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).

### Option 1: Installing via Smithery

To install Desktop Commander for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@wonderwhy-er/desktop-commander):

```bash
npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude
```

### Option 2: Install trough npx
Just run this in terminal
```
npx @wonderwhy-er/desktop-commander setup
```
Restart Claude if running

### Option 3: Add to claude_desktop_config by hand
Add this entry to your claude_desktop_config.json (on Mac, found at ~/Library/Application\ Support/Claude/claude_desktop_config.json):
```json
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}
```
Restart Claude if running

### Option 4: Checkout locally
1. Clone and build:
```bash
git clone https://github.com/wonderwhy-er/ClaudeComputerCommander.git
cd ClaudeComputerCommander
npm run setup
```
Restart Claude if running

The setup command will:
- Install dependencies
- Build the server
- Configure Claude's desktop app
- Add MCP servers to Claude's config if needed

## Tools

## Available Tools

1.  Execute terminal commands with output streaming.
2.  Command timeout and background execution support.
3.  Process management (list and kill processes).
4.  Session management for long-running commands.
5.  Full filesystem operations (read/write files, create/list directories, move files/directories, search files, get file metadata).
6.  Code editing capabilities (surgical text replacements, full file rewrites, multiple file support, pattern-based replacements).
7.  vscode-ripgrep based recursive code or text search in folders.

