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

短いバージョン。重要な点が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: 現地でチェックアウト
クローンとビルド:
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長時間実行されるコマンドの処理
時間がかかる可能性があるコマンドの場合:
execute_commandタイムアウト後に初期出力で戻りますコマンドはバックグラウンドで継続されます
新しい出力を取得するには、PID を指定した
read_output使用します。必要に応じて
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 サーバーに参加してください。
お客様の声
https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyyBt6_ShdDX_rIOad4AaABAg
https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgztdHvDMqTb9jiqnf54AaABAg
https://www.youtube.com/watch?v=ly3bed99Dy8&lc=UgyQFTmYLJ4VBwIlmql4AaABAg
https://www.youtube.com/watch?v=ly3bed99Dy8&lc=Ugy4-exy166_Ma7TH-h4AaABAg
https://medium.com/@pharmx/you-sir-are-my-hero-62cff5836a3e
貢献
このプロジェクトが役に立ったと感じたら、GitHubで⭐星を付けていただけると嬉しいです!これにより、他の人がこのプロジェクトを見つけやすくなり、さらなる開発が促進されます。
コミュニティからの貢献を歓迎します!バグを見つけた場合、機能のリクエストがある場合、またはコードに貢献したい場合は、以下の方法でご協力ください。
バグを発見しましたか? github.com/wonderwhy-er/ClaudeComputerCommander/issuesで問題を報告してください。
**機能に関するアイデアをお持ちですか?**問題セクションから機能リクエストを送信してください。
**コードを投稿したいですか?**リポジトリをフォークしてブランチを作成し、プルリクエストを送信してください。
質問や議論はありますか? GitHubのディスカッションタブで議論を始めてください。
規模の大小を問わず、すべての貢献を大歓迎します。
このツールがワークフローにとって価値があると思われる場合は、プロジェクトのサポートを検討してください。
ライセンス
マサチューセッツ工科大学
Available Tools
19 toolsblock_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
Scored across 19 tools
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.
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.
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.
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
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseAqualityBmaintenanceAllows Claude desktop app to execute terminal commands and edit files on your computer through MCP, with features including command execution, process management, and diff-based file editing.2510,444MIT
- AlicenseNot gradedqualityCmaintenanceA 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.23Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.5-
- FlicenseNot gradedqualityDmaintenanceA 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.-