Enhanced file-system and search tools, commands and prompts specific for coding.
Unleash the full potential of Claude by granting it seamless access to your file system, terminal, and more. Elevate your AI-powered workflows with Desktop Commander MCP!
Key Capabilities: Execute terminal commands, perform diff-based file editing, leverage ripgrep for lightning-fast text search, and even read files directly from URLs.
Desktop Commander MCP bridges the gap between Large Language Models (LLMs) and your local environment, empowering Claude to interact directly with your operating system. Built upon the Model Context Protocol (MCP), this server provides a secure and standardized interface for Claude to execute commands, manage files, and perform advanced code editing tasks. Imagine Claude as your intelligent co-pilot, capable of understanding and manipulating your system with precision and context.
Desktop Commander MCP unlocks a suite of powerful capabilities for Claude:
vscode-ripgrep
for recursive code and text searches within folders. Quickly locate specific code snippets or patterns across your entire codebase.Before you begin, ensure you have the Claude Desktop app installed and Node.js with npm properly configured.
Choose your preferred installation method:
npx
The quickest and easiest way to install Desktop Commander:
npx @wonderwhy-er/desktop-commander@latest setup
For debugging purposes (enables Node.js inspector):
npx @wonderwhy-er/desktop-commander@latest setup --debug
Remember to restart Claude after installation.
For macOS users, this script automates the entire process:
curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
This script handles dependency checks, Node.js installation (if needed), and automatic configuration.
Install Desktop Commander seamlessly using Smithery:
npx -y @smithery/cli install @wonderwhy-er/desktop-commander --client claude
Add the following entry to your claude_desktop_config.json
file:
~/Library/Application\ Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "desktop-commander": { "command": "npx", "args": [ "-y", "@wonderwhy-er/desktop-commander" ] } } }
Restart Claude after making changes to the configuration file.
For advanced users who want to contribute or customize the code:
Clone the repository:
git clone https://github.com/wonderwhy-er/ClaudeComputerCommander.git cd ClaudeComputerCommander
Run the setup script:
npm run setup
The setup script will install dependencies, build the server, and configure Claude's desktop app.
When installed via npx
or Smithery, Desktop Commander automatically updates to the latest version upon restarting Claude. For manual installations, simply rerun the setup command.
Desktop Commander provides a rich set of tools, categorized for easy access:
execute_command
: Execute commands with configurable timeout.read_output
: Retrieve output from long-running commands.force_terminate
: Terminate active command sessions.list_sessions
: View active command sessions.list_processes
: View system processes.kill_process
: Terminate processes by PID.block_command
/unblock_command
: Manage command blacklist.read_file
/write_file
: Read files from the local filesystem or URLs (supports viewing PNG, JPEG, GIF, and WebP images directly in Claude).create_directory
/list_directory
: Manage directories.move_file
: Move or rename files and directories.search_files
: Perform pattern-based file searches.get_file_info
: Retrieve file metadata.search_code
: Execute recursive ripgrep-based text and code searches.edit_block
: Apply surgical text replacements (ideal for changes affecting less than 20% of the file).write_file
: Rewrite entire files (best for large changes exceeding 20% or when edit_block
fails).Search/Replace Block Format:
filepath.ext
<<<<<<< SEARCH
content to find
=======
new content
>>>>>>> REPLACE
Example:
src/main.js
<<<<<<< SEARCH
console.log("old message");
=======
console.log("new message");
>>>>>>> REPLACE
read_file
can now fetch content from both local files and URLs.isUrl: true
parameter with read_file
to read from web resources.For commands that require extended execution times:
execute_command
returns after the timeout with initial output.read_output
with the process ID (PID) to retrieve new output.force_terminate
to stop the command if necessary.To debug the server, install it in debug mode:
# Using npx npx @wonderwhy-er/desktop-commander@latest setup --debug # Or if installed locally npm run setup:debug
This configures Claude to use a separate "desktop-commander" server, enables the Node.js inspector protocol, and pauses execution until a debugger connects.
Connecting a Debugger:
chrome://inspect
and locate the Node.js instance.Important Debugging Notes:
This project extends the MCP Filesystem Server to provide:
This project was created as part of exploring Claude MCPs: https://youtube.com/live/TlbjFDbl5Us
read_file
command can now fetch content from URLs.The following features are currently under development or planned:
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
For a comprehensive list of frequently asked questions, please refer to our detailed FAQ document.
Key FAQs:
npx
or Smithery.We welcome contributions from the community! Please consider giving the project a β star on GitHub to help others discover it.
If you find this tool valuable, please consider supporting the project.
During installation and setup, Desktop Commander collects anonymous usage data to improve the tool. This includes:
This data is collected using PostHog analytics and is associated with a machine-generated unique ID. No personal information is collected.
We are working on adding a built-in opt-out option. For now, you can block network connections to eu.i.posthog.com
in your firewall settings.
π π This is a connector to allow Claude Desktop (or any MCP client) to read and search any directory containing Markdown notes (such as an Obsidian vault).
β π A filesystem allowing for browsing and editing files implemented in Java using Quarkus. Available as jar or native image.
π π πͺ Fast Windows file search using Everything SDK
Golang implementation for local file system access.