Search, update, manage files and run terminal commands with AI
100K+
Search, update, manage files and run terminal commands with AI.
| Attribute | Details |
|---|---|
| Docker Image | mcp/desktop-commander |
| Author | wonderwhy-er |
| Repository | https://github.com/wonderwhy-er/DesktopCommanderMCP |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/d854870577c2fd45c5a52670cfcc39b1918d035b/Dockerfile |
| Commit | d854870577c2fd45c5a52670cfcc39b1918d035b |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/desktop-commander --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | MIT License |
| Tools provided by this Server | Short Description |
|---|---|
create_directory | Create Directory |
edit_block | Edit Block |
force_terminate | Force Terminate Process |
get_config | Get Configuration |
get_file_info | Get File Information |
get_more_search_results | Get Search Results |
get_prompts | Get Prompts |
get_recent_tool_calls | Get Recent Tool Calls |
get_usage_stats | Get Usage Statistics |
give_feedback_to_desktop_commander | Give Feedback |
interact_with_process | Send Input to Process |
kill_process | Kill Process |
list_directory | List Directory Contents |
list_processes | List Running Processes |
list_searches | List Active Searches |
list_sessions | List Terminal Sessions |
move_file | Move/Rename File |
read_file | Read File or URL |
read_multiple_files | Read Multiple Files |
read_process_output | Read Process Output |
set_config_value | Set Configuration Value |
start_process | Start Terminal Process |
start_search | Start Search |
stop_search | Stop Search |
write_file | Write File |
write_pdf | Write/Modify PDF |
create_directoryCreate a new directory or ensure a directory exists.
Can create multiple nested directories in one operation.
Only works within allowed directories.
IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
path | string |
edit_blockApply surgical edits to files.
BEST PRACTICE: Make multiple small, focused edits rather than one large edit.
Each edit_block call should change only what needs to be changed - include just enough
context to uniquely identify the text being modified.
FORMAT HANDLING (by extension):
EXCEL FILES (.xlsx, .xls, .xlsm) - Range Update mode:
Takes:
- file_path: Path to the Excel file
- range: ALWAYS use FROM:TO format - "SheetName!A1:C10" or "SheetName!C1:C1"
- content: 2D array, e.g., [["H1","H2"],["R1","R2"]]
TEXT FILES - Find/Replace mode:
Takes:
- file_path: Path to the file to edit
- old_string: Text to replace
- new_string: Replacement text
- expected_replacements: Optional number of replacements (default: 1)
DOCX FILES (.docx) - XML Find/Replace mode:
Takes same parameters as text files (old_string, new_string, expected_replacements).
Operates on the pretty-printed XML inside the DOCX — the same XML you see from
read_file with offset/length. Copy XML fragments from read output as old_string.
After editing, the XML is repacked into a valid DOCX.
Also searches headers/footers if not found in document body.
Examples:
- Replace text: old_string="<w:t>Old Text</w:t>" new_string="<w:t>New Text</w:t>"
- Change style: old_string='<w:pStyle w:val="Normal"/>' new_string='<w:pStyle w:val="Heading1"/>'
- Add content: include surrounding XML context in old_string, add new elements in new_string
By default, replaces only ONE occurrence of the search text.
To replace multiple occurrences, provide expected_replacements with
the exact number of matches expected.
UNIQUENESS REQUIREMENT: When expected_replacements=1 (default), include the minimal
amount of context necessary (typically 1-3 lines) before and after the change point,
with exact whitespace and indentation.
When editing multiple sections, make separate edit_block calls for each distinct change
rather than one large replacement.
When a close but non-exact match is found, a character-level diff is shown in the format:
common_prefix{-removed-}{+added+}common_suffix to help you identify what's different.
Similar to write_file, there is a configurable line limit (fileWriteLineLimit) that warns
if the edited file exceeds this limit. If this happens, consider breaking your edits into
smaller, more focused changes.
IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
file_path | string | |
content | string optional | |
expected_replacements | number optional | |
new_string | string optional | |
old_string | string optional | |
options | object optional | |
range | string optional |
This tool may perform destructive updates.
force_terminateForce terminate a running terminal session.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
pid | number |
This tool may perform destructive updates.
get_configGet the complete server configuration as JSON. Config includes fields for: - blockedCommands (array of blocked shell commands) - defaultShell (shell to use for commands) - allowedDirectories (paths the server can access) - fileReadLineLimit (max lines for read_file, default 1000) - fileWriteLineLimit (max lines per write_file call, default 50) - telemetryEnabled (boolean for telemetry opt-in/out) - currentClient (information about the currently connected MCP client) - clientHistory (history of all clients that have connected) - version (version of the DesktopCommander) - systemInfo (operating system and environment details) This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
get_file_infoRetrieve detailed metadata about a file or directory including: - size - creation time - last modified time - permissions - type - lineCount (for text files) - lastLine (zero-indexed number of last line, for text files) - appendPosition (line number for appending, for text files) - sheets (for Excel files - array of {name, rowCount, colCount})
Only works within allowed directories.
IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
path | string |
This tool is read-only. It does not modify its environment.
get_more_search_resultsGet more results from an active search with offset-based pagination.
Supports partial result reading with:
- 'offset' (start result index, default: 0)
* Positive: Start from result N (0-based indexing)
* Negative: Read last N results from end (tail behavior)
- 'length' (max results to read, default: 100)
* Used with positive offsets for range reading
* Ignored when offset is negative (reads all requested tail results)
Examples:
- offset: 0, length: 100 → First 100 results
- offset: 200, length: 50 → Results 200-249
- offset: -20 → Last 20 results
- offset: -5, length: 10 → Last 5 results (length ignored)
Returns only results in the specified range, along with search status.
Works like read_process_output - call this repeatedly to get progressive
results from a search started with start_search.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
sessionId | string | |
length | number optional | |
offset | number optional |
This tool is read-only. It does not modify its environment.
get_promptsRetrieve a specific Desktop Commander onboarding prompt by ID and execute it.
SIMPLIFIED ONBOARDING V2: This tool only supports direct prompt retrieval.
The onboarding system presents 5 options as a simple numbered list:
1. Organize my Downloads folder (promptId: 'onb2_01')
2. Explain a codebase or repository (promptId: 'onb2_02')
3. Create organized knowledge base (promptId: 'onb2_03')
4. Analyze a data file (promptId: 'onb2_04')
5. Check system health and resources (promptId: 'onb2_05')
USAGE:
When user says "1", "2", "3", "4", or "5" from onboarding:
- "1" → get_prompts(action='get_prompt', promptId='onb2_01')
- "2" → get_prompts(action='get_prompt', promptId='onb2_02')
- "3" → get_prompts(action='get_prompt', promptId='onb2_03')
- "4" → get_prompts(action='get_prompt', promptId='onb2_04')
- "5" → get_prompts(action='get_prompt', promptId='onb2_05')
The prompt content will be injected and execution begins immediately.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
action | string | |
promptId | string |
This tool is read-only. It does not modify its environment.
get_recent_tool_callsGet recent tool call history with their arguments and outputs. Returns chronological list of tool calls made during this session.
Useful for:
- Onboarding new chats about work already done
- Recovering context after chat history loss
- Debugging tool call sequences
Note: Does not track its own calls or other meta/query tools.
History kept in memory (last 1000 calls, lost on restart).
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
maxResults | number optional | |
since | string optional | |
toolName | string optional |
This tool is read-only. It does not modify its environment.
get_usage_statsGet usage statistics for debugging and analysis.
Returns summary of tool usage, success/failure rates, and performance metrics.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
give_feedback_to_desktop_commanderOpen feedback form in browser to provide feedback about Desktop Commander.
IMPORTANT: This tool simply opens the feedback form - no pre-filling available.
The user will fill out the form manually in their browser.
WORKFLOW:
1. When user agrees to give feedback, just call this tool immediately
2. No need to ask questions or collect information
3. Tool opens form with only usage statistics pre-filled automatically:
- tool_call_count: Number of commands they've made
- days_using: How many days they've used Desktop Commander
- platform: Their operating system (Mac/Windows/Linux)
- client_id: Analytics identifier
All survey questions will be answered directly in the form:
- Job title and technical comfort level
- Company URL for industry context
- Other AI tools they use
- Desktop Commander's biggest advantage
- How they typically use it
- Recommendation likelihood (0-10)
- User study participation interest
- Email and any additional feedback
EXAMPLE INTERACTION:
User: "sure, I'll give feedback"
Claude: "Perfect! Let me open the feedback form for you."
[calls tool immediately]
No parameters are needed - just call the tool to open the form.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
interact_with_processSend input to a running process and automatically receive the response.
CRITICAL: THIS IS THE PRIMARY TOOL FOR ALL LOCAL FILE ANALYSIS
For ANY local file analysis (CSV, JSON, data processing), ALWAYS use this instead of the analysis tool.
The analysis tool CANNOT access local files and WILL FAIL - use processes for ALL file-based work.
FILE ANALYSIS PRIORITY ORDER (MANDATORY):
1. ALWAYS FIRST: Use this tool (start_process + interact_with_process) for local data analysis
2. ALTERNATIVE: Use command-line tools (cut, awk, grep) for quick processing
3. NEVER EVER: Use analysis tool for local file access (IT WILL FAIL)
REQUIRED INTERACTIVE WORKFLOW FOR FILE ANALYSIS:
1. Start REPL: start_process("python3 -i")
2. Load libraries: interact_with_process(pid, "import pandas as pd, numpy as np")
3. Read file: interact_with_process(pid, "df = pd.read_csv('/absolute/path/file.csv')")
4. Analyze: interact_with_process(pid, "print(df.describe())")
5. Continue: interact_with_process(pid, "df.groupby('column').size()")
BINARY FILE PROCESSING WORKFLOWS:
Use appropriate Python libraries (PyPDF2, pandas, docx2txt, etc.) or command-line tools for binary file analysis.
SMART DETECTION:
- Automatically waits for REPL prompt (>>>, >, etc.)
- Detects errors and completion states
- Early exit prevents timeout delays
- Clean output formatting (removes prompts)
SUPPORTED REPLs:
- Python: python3 -i (RECOMMENDED for data analysis)
- Node.js: node -i
- R: R
- Julia: julia
- Shell: bash, zsh
- Database: mysql, postgres
PARAMETERS:
- pid: Process ID from start_process
- input: Code/command to execute
- timeout_ms: Max wait (default: 8000ms)
- wait_for_prompt: Auto-wait for response (default: true)
- verbose_timing: Enable detailed performance telemetry (default: false)
Returns execution result with status indicators.
PERFORMANCE DEBUGGING (verbose_timing parameter):
Set verbose_timing: true to get detailed timing information including:
- Exit reason (early_exit_quick_pattern, early_exit_periodic_check, process_finished, timeout, no_wait)
- Total duration and time to first output
- Complete timeline of all output events with timestamps
- Which detection mechanism triggered early exit
Use this to identify slow interactions and optimize detection patterns.
ALWAYS USE FOR: CSV analysis, JSON processing, file statistics, data visualization prep, ANY local file work
NEVER USE ANALYSIS TOOL FOR: Local file access (it cannot read files from disk and WILL FAIL)
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
input | string | |
pid | number | |
timeout_ms | number optional | |
verbose_timing | boolean optional | |
wait_for_prompt | boolean optional |
This tool may perform destructive updates.
This tool interacts with external entities.
kill_processTerminate a running process by PID.
Use with caution as this will forcefully terminate the specified process.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
pid | number |
This tool may perform destructive updates.
list_directoryGet a detailed listing of all files and directories in a specified path.
Use this instead of 'execute_command' with ls/dir commands.
Results distinguish between files and directories with [FILE] and [DIR] prefixes.
Supports recursive listing with the 'depth' parameter (default: 2):
- depth=1: Only direct contents of the directory
- depth=2: Contents plus one level of subdirectories
- depth=3+: Multiple levels deep
CONTEXT OVERFLOW PROTECTION:
- Top-level directory shows ALL items
- Nested directories are limited to 100 items maximum per directory
- When a nested directory has more than 100 items, you'll see a warning like:
[WARNING] node_modules: 500 items hidden (showing first 100 of 600 total)
- This prevents overwhelming the context with large directories like node_modules
Results show full relative paths from the root directory being listed.
Example output with depth=2:
[DIR] src
[FILE] src/index.ts
[DIR] src/tools
[FILE] src/tools/filesystem.ts
If a directory cannot be accessed, it will show [DENIED] instead.
Only works within allowed directories.
IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
path | string | |
depth | number optional |
This tool is read-only. It does not modify its environment.
list_processesList all running processes.
Returns process information including PID, command name, CPU usage, and memory usage.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
list_searchesList all active searches.
Shows search IDs, search types, patterns, status, and runtime.
Similar to list_sessions for terminal processes. Useful for managing
multiple concurrent searches.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
list_sessionsList all active terminal sessions.
Shows session status including:
- PID: Process identifier
- Blocked: Whether session is waiting for input
- Runtime: How long the session has been running
DEBUGGING REPLs:
- "Blocked: true" often means REPL is waiting for input
- Use this to verify sessions are running before sending input
- Long runtime with blocked status may indicate stuck process
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
move_fileMove 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.
IMPORTANT: Always use absolute paths for reliability. Paths are automatically normalized regardless of slash direction. Relative paths may fail as they depend on the current working directory. Tilde paths (~/...) might not work in all contexts. Unless the user explicitly asks for relative paths, use absolute paths.
This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.
| Parameters | Type | Description |
|---|---|---|
destination | string | |
source | string |
This tool may perform destructive updates.
read_fileRead contents from files and URLs. Read PDF files and extract content as markdown and images.
Prefer this over 'execute_command' with cat/type for viewing files.
Supports partial file reading with:
- 'offset' (start line, defaul
[...]
Content type
Image
Digest
sha256:b1bdd77ea…
Size
618.2 MB
Last updated
6 days ago
Requires Docker Desktop 4.37.1 or later.
Pulls:
4,573
Feb 23 to Mar 1