/ ディレクトリ / プレイグラウンド / Desktop Commander
● コミュニティ wonderwhy-er ⚡ 即起動

Desktop Commander

作者 wonderwhy-er · wonderwhy-er/DesktopCommanderMCP

Claudeに本物のターミナルを与える — ファイル操作・コード編集・プロセス管理・シェル実行を、パーミッションゲート付きでファイルシステム全体にわたって提供。

Desktop CommanderはClaudeDesktopをClaude CodeやCursorなしでコーディングエージェントに変えるMCPサーバーです。ファイルシステムの読み書き・外科的なテキスト編集・ターミナルコマンド実行・長期プロセス管理・設定ベースのディレクトリ許可リストを提供します。サブスクリプション型エージェントIDEの無料代替として、数十万人の開発者に利用されています。

なぜ使うのか

主な機能

ライブデモ

実際の動作

desktop-commander-mcp.replay ▶ 準備完了
0/0

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "desktop-commander-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "desktop-commander-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "desktop-commander-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "desktop-commander-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "desktop-commander-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "desktop-commander-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@wonderwhy-er/desktop-commander"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

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

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: Desktop Commander

CursorやClaude Codeなしに、Claude Desktopを無料のコーディングエージェントとして使う

👤 IDEサブスクリプションを払わずにエージェント型コーディングを求める開発者 ⏱ ~20 min beginner

使うタイミング: すでにClaude Desktopを持っていて、スニペットを貼り付けるだけでなく実際にリポジトリを編集させたいとき。

前提条件
  • Claude Desktopのインストール — claude.ai/download からダウンロード
  • 作業ディレクトリのホワイトリスト登録 — 初回起動時にClaudeが操作できるディレクトリを尋ねるプロンプトが表示される
フロー
  1. インストールしてワークスペースをロックする
    Install desktop-commander. Limit it to ~/Code/myproject — nothing outside.✓ コピーしました
    → 設定にallowed_directoriesの制限が反映され、Claude側にツール一覧が表示される
  2. 実際の変更を加える
    Open ~/Code/myproject. Find every TODO comment, group by file, propose fixes for the top 5.✓ コピーしました
    → ripgrep高速スキャンによる、行番号付きの優先順位付きリスト
  3. edit_blockで適用する
    Apply the proposed fixes using edit_block. Don't rewrite whole files — just the necessary diffs.✓ コピーしました
    → 各編集にold_string/new_stringブロックが表示され、その後のgit diffがクリーンな状態になる

結果: Claude Desktopが有料IDEアシスタントと同等の品質で、リポジトリへの実際のコード変更を書き込むようになる。

注意点
  • allowed_directoriesを設定し忘れ、Claudeがホームフォルダをスキャンしてしまう — ~/.claude-server-commander/config.json を編集してClaude Desktopを再起動する
組み合わせ: github · filesystem

開発サーバーを起動してチャットをブロックせずに出力をキャプチャする

👤 マルチプロセス構成のデバッグをする開発者 ⏱ ~25 min intermediate

使うタイミング: Claudeにサーバーを起動させ、別のターミナルでテストを実行し、同時にログを追いかけたいとき。

フロー
  1. バックグラウンドでサーバーを起動する
    Start npm run dev as a background process. Show me the PID.✓ コピーしました
    → プロセス起動、PID返却、出力ストリーミングのキャプチャ開始
  2. サーバー稼働中にテストを実行する
    While that's running, execute the e2e suite and surface any failures.✓ コピーしました
    → テストが独立して実行され、サーバーはストリーミングを継続
  3. 必要なときにログを確認する
    Show the last 100 lines of stdout from PID 12345. Anything red?✓ コピーしました
    → エラーをハイライトしたログのスライス

結果: マルチプロセスのデバッグセッション全体をClaudeから統合制御できる。

注意点
  • チャット終了後もバックグラウンドプロセスが残り続ける — 終了時にkill_processツールを使うか、Claude Desktopを再起動する

1セッションで数百ファイルにわたる一括リファクタリング

👤 コードベース全体のマイグレーション(リネームや廃止予定化など)を行う開発者 ⏱ ~60 min intermediate

使うタイミング: IDEアシスタントが50ファイル以上の変更で詰まるとき、一括で統合処理したいとき。

フロー
  1. 変更範囲を把握する
    Find every import of oldLib. Group by file and tell me how many changes per file.✓ コピーしました
    → 影響範囲のヒストグラム
  2. まず1ファイルでテストする
    Apply the migration to the smallest-impact file as a smoke test.✓ コピーしました
    → 1ファイルのマイグレーション完了、テストが通る
  3. バッチで段階的に展開する
    Now apply to the next 20 files. After each batch, run lint and tell me if anything breaks.✓ コピーしました
    → バッチごとの進捗レポートとヘルスチェック

結果: バッチごとに検証可能なチェックポイントを設けながら、コードベース全体のマイグレーションを完了できる。

注意点
  • 空白の差異によりedit_blockが失敗する — 複雑なパターンには検索置換モードを使い、改行コードの設定を確認する
組み合わせ: github

組み合わせ

他のMCPと組み合わせて10倍の力を

desktop-commander-mcp + github

ローカル編集からPR作成まで

Apply the fixes via desktop-commander, then use github MCP to open a PR with a clean summary.✓ コピーしました
desktop-commander-mcp + filesystem

サンドボックス化されたファイルシステムアクセスの使い分け

Use filesystem MCP for read-only library scans and desktop-commander for actual project edits.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
execute_command command: str, timeout_ms?: int git・npm・ビルドスクリプトなど、あらゆるシェル操作に使用 0
edit_block file_path, old_string, new_string 外科的な編集 — ファイル全体の書き換えをしない場合に使用 0
read_file path コンテキスト取得のためにソースを読む場合に使用 0
write_file path, content 新規ファイルの作成時に使用 0
search_files path, pattern 名前やglobでファイルを検索する場合に使用 0
search_code pattern, path? ファイル横断のコンテンツ検索に使用 0
list_processes () セッション内で何が実行中かを確認する場合に使用 0

コストと制限

運用コスト

APIクォータ
N/A — ローカル実行
呼び出しあたりのトークン
可変 — 大きなファイルはtokenを多く消費
金額
無料 (MIT)
ヒント
数行だけ必要な場合はread_fileではなくsearch_codeを使う

セキュリティ

権限、シークレット、影響範囲

最小スコープ: filesystem-read filesystem-write shell-exec
認証情報の保管: なし — 完全ローカル
データ送信先: なし — 全呼び出しはローカル
絶対に付与しない: Unrestricted root directory access

トラブルシューティング

よくあるエラーと対処法

edit_blockで権限拒否が発生する

~/.claude-server-commander/config.json のallowed_directoriesにそのディレクトリを追加する

確認: cat the config and restart Claude Desktop
プロセスは起動したが出力がない

PIDを指定してread_outputを使う。出力はデフォルトではチャットにストリームされずバッファリングされる

edit_blockが「old_string not found」を報告する

空白や改行コードのズレが原因 — まずファイルを再読み込みして正確なバイト列をコピーする

代替案

Desktop Commander 他との比較

代替案代わりに使う場面トレードオフ
Claude Code (CLI)Anthropic公式のエージェントループとプランニング機能が欲しいときClaude Codeの方が洗練されているが独自のサブスクリプションが必要。Desktop Commanderは無料
filesystem (official MCP)シェル実行なしの読み取り専用またはサンドボックス化されたファイルアクセスが必要なとき機能面は小さく、コマンド実行はできない

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る