desktop-commander
Original:🇺🇸 English
Translated
Use Desktop Commander MCP (typically tools like `mcp__desktop-commander__*`) to manage local files and long-running processes: read/write/search files, apply precise edits, work with Excel/PDFs, run terminal commands and interact with REPLs (Python/Node/SSH/DB), inspect/terminate processes, and review tool call history. Use when the task requires doing real work on the machine (editing code/configs, searching a repo, analyzing CSV/Excel, generating/modifying PDFs, running commands with streaming output).
5installs
Sourcery-run/run-skills
Added on
NPX Install
npx skill4agent add ry-run/run-skills desktop-commanderTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Desktop Commander
Quick start
Goal: use Desktop Commander MCP to turn “files / processes / search / edits” into verifiable tool calls (small, safe steps) instead of treating the machine as a black box.
Most common entry points:
- Read content: (paging, negative offset tail, PDF/image/Excel/URL).
mcp__desktop-commander__read_file - Small edits: (targeted text replace / Excel range update).
mcp__desktop-commander__edit_block - Large edits: in chunks (respect
mcp__desktop-commander__write_file).fileWriteLineLimit - Interactive work: +
mcp__desktop-commander__start_process+mcp__desktop-commander__interact_with_process.mcp__desktop-commander__read_process_output
Official notes + tool list: .
skills/desktop-commander/references/desktop-commander.mdWorkflow decision tree
- Do I need to find something?
- File names/paths: (
mcp__desktop-commander__start_search) →searchType="files"mcp__desktop-commander__get_more_search_results - File contents: (
mcp__desktop-commander__start_search) → paginate →searchType="content"when donemcp__desktop-commander__stop_search
- Do I need to read or change content?
- Read: (use
mcp__desktop-commander__read_file; useoffset/lengthfor tail)offset=-N - Small change: (default replaces 1 occurrence; use
mcp__desktop-commander__edit_blockfor multiple)expected_replacements - Large change: (
mcp__desktop-commander__write_filethenmode="rewrite"chunked)mode="append"
- Do I need to run commands / keep sessions?
- One-off commands: (shell command) + read output
mcp__desktop-commander__start_process - REPL / SSH / DB / dev server: →
start_process→interact_with_processread_process_output
- Is this a high-risk operation (config changes, killing processes, bulk edits/moves, any data loss)?
- Explain impact + rollback first; require explicit user confirmation before executing.
- Prefer making config changes in a separate chat (official guidance).
Recipes
Reading files
- Text/code: with pagination; logs:
read_file(tail-like).offset=-200 - Multiple files: to reduce round trips.
read_multiple_files - URLs: with
read_filefor web content/images.isUrl: true
Editing files
- Targeted replace: with minimal unique context; for many occurrences set
edit_block.expected_replacements - Rewrites: in 25–30 line chunks (
write_filethenrewrite).append - Excel: read via ; edit via
read_filewithedit_block+ 2D array.range - PDFs: only via (do not use
write_pdffor PDFs).write_file
Search
- Prefer +
start_searchfor repo exploration; stop searches you no longer need.get_more_search_results - Use for patterns with special characters (parentheses, brackets, dots, etc.).
literalSearch: true
Processes & interaction
- Data analysis: run , then use
python3 -ifor pandas/numpy workflows.interact_with_process - Observing long jobs: call periodically; to stop use
read_process_output/kill_process(high-risk).force_terminate - Status: /
list_sessions.list_processes
Config & audit
- /
get_config: use carefully; directory restrictions are not a security boundary for terminal commands.set_config_value - : recover context and debug “what happened”.
get_recent_tool_calls - : usage/performance insight.
get_usage_stats
Guardrails (must follow)
- Prefer absolute paths; don’t assume OS-specific separators.
- For big changes: read first; keep edits small; chunk writes; keep rollback in mind.
- High-risk actions require explicit confirmation: config changes, killing sessions/processes, bulk file edits/moves, any destructive command.
- Security: limits filesystem tools, not terminal commands—don’t treat it as sandboxing.
allowedDirectories
References
- Official notes + tool list:
skills/desktop-commander/references/desktop-commander.md