Skip to main content
Glama
Desktop Commander MCP

Desktop Commander MCP

by MrGNSS

デスクトップコマンダーMCP

デスクトップコマンダーMCP

npmダウンロード 鍛冶屋のバッジ コーヒーを買ってください 不和

短いバージョン。重要な点が2つあります。ターミナルコマンドと、diffベースのファイル編集です。

目次

これは、Claude デスクトップ アプリがコンピューター上で長時間実行されるターミナル コマンドを実行し、モデル コンテキスト プロトコル (MCP) を通じてプロセスを管理できるようにするサーバーです。MCPファイルシステム サーバー上に構築され、追加の検索および置換ファイル編集機能を提供します。

Related MCP server: MCP Tools

特徴

  • 出力ストリーミングでターミナルコマンドを実行する

  • コマンドタイムアウトとバックグラウンド実行のサポート

  • プロセス管理(プロセスの一覧表示と終了)

  • 長時間実行コマンドのセッション管理

  • 完全なファイルシステム操作:

    • ファイルの読み取り/書き込み

    • ディレクトリの作成/一覧表示

    • ファイル/ディレクトリを移動する

    • ファイルを検索

    • ファイルのメタデータを取得する

    • コード編集機能:

    • 小さな変更のための外科的テキスト置換

    • 大きな変更があった場合はファイル全体を書き換える

    • 複数ファイルのサポート

    • パターンベースの置換

インストール

まず、 Claude デスクトップ アプリをダウンロードしてインストールし、 npm がインストールされていることを確認します。

オプション1: Smithery経由でインストールする

Smithery経由で Claude Desktop 用の Desktop Commander を自動的にインストールするには:

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

オプション2: npx経由でインストールする

ターミナルでこれを実行するだけです

npx @wonderwhy-er/desktop-commander setup

実行中の場合はClaudeを再起動します

オプション3: claude_desktop_configに手動で追加する

次のエントリを claude_desktop_config.json (Mac の場合は ~/Library/Application\ Support/Claude/claude_desktop_config.json にあります) に追加します。

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

実行中の場合はClaudeを再起動します

オプション4: 現地でチェックアウト

  1. クローンとビルド:

git clone https://github.com/wonderwhy-er/ClaudeComputerCommander.git
cd ClaudeComputerCommander
npm run setup

実行中の場合はClaudeを再起動します

セットアップ コマンドは次の処理を実行します。

  • 依存関係をインストールする

  • サーバーを構築する

  • Claudeのデスクトップアプリを構成する

  • 必要に応じて、Claude の設定に MCP サーバーを追加します。

使用法

サーバーは次のツール カテゴリを提供します。

ターミナルツール

  • execute_command : 設定可能なタイムアウトでコマンドを実行する

  • read_output : 長時間実行コマンドからの出力を取得する

  • force_terminate : 実行中のコマンドセッションを停止する

  • list_sessions : アクティブなコマンドセッションを表示する

  • list_processes : システムプロセスを表示する

  • kill_process : PIDでプロセスを終了する

  • block_command / unblock_command : コマンドブラックリストを管理する

ファイルシステムツール

  • read_file / write_file : ファイル操作

  • create_directory / list_directory : ディレクトリ管理

  • move_file : ファイルの移動/名前変更

  • search_files : パターンベースのファイル検索

  • get_file_info : ファイルのメタデータ

編集ツール

  • edit_block : 外科的なテキスト置換を適用する(ファイルサイズの 20% 未満の変更に最適)

  • write_file : ファイルの完全な書き換え (20% を超える大きな変更や edit_block が失敗した場合に最適)

検索/置換ブロック形式:

filepath.ext
<<<<<<< SEARCH
existing code to replace
=======
new code to insert
>>>>>>> REPLACE

例:

src/main.js
<<<<<<< SEARCH
console.log("old message");
=======
console.log("new message");
>>>>>>> REPLACE

長時間実行されるコマンドの処理

時間がかかる可能性があるコマンドの場合:

  1. execute_commandタイムアウト後に初期出力で戻ります

  2. コマンドはバックグラウンドで継続されます

  3. 新しい出力を取得するには、PID を指定したread_output使用します。

  4. 必要に応じてforce_terminateを使用して停止します

モデルコンテキストプロトコル統合

このプロジェクトは、MCP ファイルシステム サーバーを拡張して次の機能を実現します。

  • Claude Desktop のローカルサーバーのサポート

  • 完全なシステムコマンド実行

  • プロセス管理

  • ファイル操作

  • 検索/置換ブロックを使ったコード編集

Claude MCP の探索の一環として作成されました: https://youtube.com/live/TlbjFDbl5Us

進行中の作業とTODO

現在、以下の機能が開発中または計画中です。

  • より優れたコード検索(進行中) - コンテキストに応じた結果によるコード探索の強化

  • より良い設定(進行中) - 許可されたパス、コマンド、シェル環境の設定が改善されました

  • Windows 環境の修正(進行中) - Windows プラットフォーム固有の問題を解決します

  • Linux の改善(進行中) - さまざまな Linux ディストリビューションとの互換性を強化

  • WSL (Windows Subsystem for Linux 統合) のサポート

  • SSHのサポート- リモートサーバーコマンド実行

  • インストールのトラブルシューティングガイド- セットアップの問題に関する包括的なヘルプ

メディア

以下のリソースを通じてこのプロジェクトの詳細を学んでください。

記事

MCPを搭載したClaudeがCursorとWindsurfに取って代わりました。これはどのようにして実現したのでしょうか? - モデルコンテキストプロトコル機能を備えたClaudeが開発者のワークフローにどのような変化をもたらしているかを詳細に検証します。

ビデオ

Claude Desktop Commander ビデオ チュートリアル- Commander を効果的にセットアップして使用する方法をご覧ください。

コミュニティ

サポートを受けたり、フィードバックを共有したり、他のユーザーとつながったりするには、 Discord サーバーに参加してください。

お客様の声

本当に助かります!Claude + Cursorを併用していますが、いつも重複しているように感じていました。これでようやく問題が解決しました。本当に嬉しいです。本当にありがとうございます。さらに、Claudeは本日Web検索のサポートを追加しました。このMCP + インターネット検索機能により、最新のアップデートでコードが生成されます。Cursorが時々機能しなかったり、高速なリクエストばかりが使われてしまうような時にとても助かります。 https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg

これは私がYouTube動画に残した最初のコメントです。ありがとうございます!カーソル内の古いFlutterアプリを、nullセーフ以前の古いバージョンから現在のバージョンにアップデートするのに苦労し、Claude 3.7を使用してnullセーフを実装しました。ほとんどはできましたが、重大なBLEエラーが発生し、解決に何日も費やしましたがうまくいきませんでした。Augment Codeを試しましたが、それでも解決しませんでした。ClaudeデスクトップにMCPを実装し、コードの更新を考慮して新旧のコードベースを完全に比較し、数時間で問題を修正することができました。これを試している方へのアドバイスは、変更をステージングして適切なタイミングでコミットし、不要な変更を元に戻せるようにすることです。素晴らしい! https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg

素晴らしい!1週間前にライセンスを購入したWindsurfを、古いフルスタックソケットプロジェクトのアップグレードに使用しました。多くの場合は正常に動作するのですが、カスケードで失敗することが多々あり、変更をすべて元に戻す必要があり、数百のカスケードトークンを失いました。わずか1週間でトークンが100未満になり、たった10ドルで300トークンしか買いたくありません。これはClaude MCPですが、Claude Proをようやく必要になったので購入しました。ChatGPTに加えて、トークンコストを気にせず好きなだけコーディングできます。 また、これは単なるコード編集以上のものです。素晴らしい動画をありがとうございます! https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg

これは素晴らしいツールです。ありがとうございます。このツールを使うと、Claude は外科的な編集を行う能力を獲得し、人間の開発者のように作業を進めることができるので、私はこれを使うのが好きです。 https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg

あなたは私のヒーローです。最近の私の経験を、私が説明するよりもずっと分かりやすくまとめてくれました。CursorとWindsurfはどちらも、コンピューターの画面に向かって叫びたくなるほどイライラさせられました。ふと思いついて、Claudeに直接聞いてみようかと思い立ち、それ以来、迷うことなく相談しています。 まずはClaudeに相談して正気を保ち、必要であれば他のIDEやフレームワークなども試してみようと思っています。私だけかと思っていましたが、そうでなくて良かったです(笑)。 33 1 https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e

貢献

このプロジェクトが役に立ったと感じたら、GitHubで⭐星を付けていただけると嬉しいです!これにより、他の人がこのプロジェクトを見つけやすくなり、さらなる開発が促進されます。

コミュニティからの貢献を歓迎します!バグを見つけた場合、機能のリクエストがある場合、またはコードに貢献したい場合は、以下の方法でご協力ください。

  • バグを発見しましたか? github.com/wonderwhy-er/ClaudeComputerCommander/issuesで問題を報告してください。

  • **機能に関するアイデアをお持ちですか?**問題セクションから機能リクエストを送信してください。

  • **コードを投稿したいですか?**リポジトリをフォークしてブランチを作成し、プルリクエストを送信してください。

  • 質問や議論はありますか? GitHubのディスカッションタブで議論を始めてください。

規模の大小を問わず、すべての貢献を大歓迎します。

このツールがワークフローにとって価値があると思われる場合は、プロジェクトのサポートを検討してください。

ライセンス

マサチューセッツ工科大学

Available Tools

19 tools
block_commandB

Add a command to the blacklist. Once blocked, the command cannot be executed until unblocked.

Inputs: command (required).

create_directoryA

Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. Only works within allowed directories.

Inputs: path (required).

edit_blockA

Apply surgical text replacements to files. Best for small changes (<20% of file size). Multiple blocks can be used for separate changes. Will verify changes after application. Format: filepath, then <<<<<<< SEARCH, content to find, =======, new content, >>>>>>> REPLACE.

Inputs: blockContent (required).

execute_commandB

Execute a terminal command with timeout. Command will continue running in background if it doesn't complete within timeout.

Inputs: command (required), timeout_ms.

force_terminateC

Force terminate a running terminal session.

Inputs: pid (required).

get_file_infoA

Retrieve detailed metadata about a file or directory including size, creation time, last modified time, permissions, and type. Only works within allowed directories.

Inputs: path (required).

kill_processA

Terminate a running process by PID. Use with caution as this will forcefully terminate the specified process.

Inputs: pid (required).

list_allowed_directoriesB

Returns the list of directories that this server is allowed to access.

Inputs: no named parameters.

list_blocked_commandsB

List all currently blocked commands.

Inputs: no named parameters.

list_directoryA

Get a detailed listing of all files and directories in a specified path. Results distinguish between files and directories with [FILE] and [DIR] prefixes. Only works within allowed directories.

Inputs: path (required).

list_processesA

List all running processes. Returns process information including PID, command name, CPU usage, and memory usage.

Inputs: no named parameters.

list_sessionsB

List all active terminal sessions.

Inputs: no named parameters.

move_fileA

Move or rename files and directories. Can move files between directories and rename them in a single operation. Both source and destination must be within allowed directories.

Inputs: source (required), destination (required).

read_fileA

Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read. Only works within allowed directories.

Inputs: path (required).

read_multiple_filesA

Read the contents of multiple files simultaneously. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.

Inputs: paths (required).

read_outputC

Read new output from a running terminal session.

Inputs: pid (required).

search_filesC

Recursively search for files and directories matching a pattern. Searches through all subdirectories from the starting path. Only searches within allowed directories.

Inputs: path (required), pattern (required).

unblock_commandB

Remove a command from the blacklist. Once unblocked, the command can be executed normally.

Inputs: command (required).

write_fileA

Completely replace file contents. Best for large changes (>20% of file) or when edit_block fails. Use with caution as it will overwrite existing files. Only works within allowed directories.

Inputs: path (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists between 'execute_command' and 'force_terminate'/'kill_process' in managing processes, and 'edit_block' and 'write_file' in file modification. However, descriptions clarify their specific use cases (e.g., 'edit_block' for small changes, 'write_file' for large replacements), reducing confusion.

    Naming Consistency5/5

    Tool names follow a consistent verb_noun pattern throughout, such as 'create_directory', 'list_directory', 'read_file', and 'move_file'. This uniformity makes the toolset predictable and easy for agents to navigate without naming conflicts.

    Tool Count4/5

    With 19 tools, the count is slightly high but reasonable for a desktop management server covering file operations, process control, and command execution. It provides comprehensive functionality without being overwhelmingly large, though it could be streamlined by merging some related tools.

    Completeness5/5

    The toolset offers complete coverage for desktop management, including CRUD operations for files and directories, process lifecycle management, command execution with safety features (blocking/unblocking), and session handling. No obvious gaps are present, supporting a wide range of agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.
      23
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.
      5
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A server implementation for the Model Context Protocol (MCP) that allows Claude AI to execute commands through a command-line interface, enabling direct system interactions from within Claude.
      -