能力标签
桌面命令MCP服务器
🔌
MCP工具

桌面命令MCP服务器

基于 TypeScript · 让 AI 助手直接操作你的系统与工具
英文名:DesktopCommanderMCP
⭐ 6.0k Stars 🍴 709 Forks 💻 TypeScript 📄 MIT 🏷 AI 8.5分
8.5AI 综合评分
MCP服务终端控制文件搜索Claude扩展TypeScript
✦ AI Skill Hub 推荐

桌面命令MCP服务器 是 AI Skill Hub 本期精选MCP工具之一。已获得 6.0k 颗 GitHub Star,综合评分 8.5 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

桌面命令MCP服务器 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 桌面命令MCP服务器,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。桌面命令MCP服务器 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 桌面命令MCP服务器 评为 AI 评分 8.5 分,属于同类工具中的优质选择。

📋 工具概览

为Claude提供终端控制和文件系统搜索能力的开源MCP服务器。支持AI直接执行命令、搜索文件,赋予Claude强大的系统操作权限。适合开发者、运维人员和需要系统级自动化的AI应用场景。

桌面命令MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 6.0k
开发语言
TypeScript
支持平台
Windows / macOS / Linux
维护状态
持续维护,定期更新
开源协议
MIT
AI 综合评分
8.5 分
工具类型
MCP工具
Forks
709

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

为Claude提供终端控制和文件系统搜索能力的开源MCP服务器。支持AI直接执行命令、搜索文件,赋予Claude强大的系统操作权限。适合开发者、运维人员和需要系统级自动化的AI应用场景。

桌面命令MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/wonderwhy-er/DesktopCommanderMCP

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "----mcp---": {
      "command": "npx",
      "args": ["-y", "desktopcommandermcp"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 桌面命令MCP服务器 执行以下任务...
Claude: [自动调用 桌面命令MCP服务器 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "____mcp___": {
      "command": "npx",
      "args": ["-y", "desktopcommandermcp"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 84/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Desktop Commander MCP

Features

  • Remote AI Control - Use Desktop Commander from ChatGPT, Claude web, and other AI services via Remote MCP
  • File Preview UI - Visual file previews in Claude Desktop with rendered markdown, inline images, expandable content, built-in markdown editor, and quick "Open in folder" access
  • Enhanced terminal commands with interactive process control
  • Execute code in memory (Python, Node.js, R) without saving files
  • Instant data analysis - just ask to analyze CSV/JSON/Excel files
  • Native Excel file support - Read, write, edit, and search Excel files (.xlsx, .xls, .xlsm) without external tools
  • PDF support - Read PDFs with text extraction, create new PDFs from markdown, modify existing PDFs
  • DOCX support - Read, create, edit, and search Word documents (.docx) with surgical XML editing and markdown-to-DOCX conversion
  • Interact with running processes (SSH, databases, development servers)
  • Execute terminal commands with output streaming
  • Command timeout and background execution support
  • Process management (list and kill processes)
  • Session management for long-running commands
  • Process output pagination - Read terminal output with offset/length controls to prevent context overflow
  • Server configuration management:
  • Get/set configuration values
  • Update multiple settings at once
  • Dynamic configuration changes without server restart
  • Full filesystem operations:
  • Read/write files (text, Excel, PDF, DOCX)
  • Create/list directories
  • Recursive directory listing with configurable depth and context overflow protection for large folders
  • Move files/directories
  • Search files and content (including Excel content)
  • Get file metadata
  • Negative offset file reading: Read from end of files using negative offset values (like Unix tail)
  • Code editing capabilities:
  • Surgical text replacements for small changes
  • Full file rewrites for major changes
  • Multiple file support
  • Pattern-based replacements
  • vscode-ripgrep based recursive code or text search in folders
  • Comprehensive audit logging:
  • All tool calls are automatically logged
  • Log rotation with 10MB size limit
  • Detailed timestamps and arguments
  • Security hardening:
  • Symlink traversal prevention on file operations
  • Command blocklist with bypass protection
  • Docker isolation for full sandboxing
  • See SECURITY.md for details

Enhanced Edit Block Features

The edit_block tool includes several enhancements for better reliability:

  1. Improved Prompting: Tool descriptions now emphasize making multiple small, focused edits rather than one large change
  2. Fuzzy Search Fallback: When exact matches fail, it performs fuzzy search and provides detailed feedback
  3. Character-level Diffs: Shows exactly what's different using {-removed-}{+added+} format
  4. Multiple Occurrence Support: Can replace multiple instances with expected_replacements parameter
  5. Comprehensive Logging: All fuzzy searches are logged for analysis and debugging

When a search fails, you'll see detailed information about the closest match found, including similarity percentage, execution time, and character differences. All these details are automatically logged for later analysis using the fuzzy search log tools.

Other preview features

  • Expand / collapse — toggle between compact summary row and full panel
  • Open in folder — reveal the file in Finder/Explorer with one click
  • Load more lines — incrementally load content above or below a partial read window
  • Text selection — highlight text in any preview; the AI can see and reference your selection

How do I report security vulnerabilities?

Please create a GitHub Issue with detailed information about any security vulnerabilities you discover. See our Security Policy for complete guidelines on responsible disclosure.

How to install

Install in Claude Desktop

Desktop Commander offers multiple installation methods for Claude Desktop.

📋 Update & Uninstall Information: Options 1, 2, 3, 4, and 6 have automatic updates. Option 5 requires manual updates. See below for details.

<details> <summary><b>Option 1: Install through npx ⭐ Auto-Updates (Requires Node.js)</b></summary>

Just run this in terminal:

npx @wonderwhy-er/desktop-commander@latest setup

For debugging mode (allows Node.js inspector connection):

npx @wonderwhy-er/desktop-commander@latest setup --debug

Command line options during setup: - --debug: Enable debugging mode for Node.js inspector - --no-onboarding: Disable onboarding prompts for new users

Restart Claude if running.

✅ Auto-Updates: Yes - automatically updates when you restart Claude 🔄 Manual Update: Run the setup command again 🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove

</details>

<details> <summary><b>Option 2: Using bash script installer (macOS) ⭐ Auto-Updates (Installs Node.js if needed)</b></summary>

curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install.sh | bash
This script handles all dependencies and configuration automatically.

✅ Auto-Updates: Yes 🔄 Manual Update: Re-run the bash installer command above 🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove

</details>

<details> <summary><b>Option 3: Installing via Smithery ⭐ Auto-Updates (Requires Node.js)</b></summary>

  1. Visit: https://smithery.ai/server/@wonderwhy-er/desktop-commander
  2. Login to Smithery if you haven't already
  3. Select your client (Claude Desktop) on the right side
  4. Install with the provided key that appears after selecting your client
  5. Restart Claude Desktop

✅ Auto-Updates: Yes - automatically updates when you restart Claude 🔄 Manual Update: Visit the Smithery page and reinstall

</details>

<details> <summary><b>Option 4: Add to claude_desktop_config manually ⭐ Auto-Updates (Requires Node.js)</b></summary>

Add this entry to your claude_desktop_config.json:

  • On Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%\Claude\claude_desktop_config.json
  • On Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "-y",
        "@wonderwhy-er/desktop-commander@latest"
      ]
    }
  }
}
Restart Claude if running.

✅ Auto-Updates: Yes - automatically updates when you restart Claude 🔄 Manual Update: Run the setup command again 🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove or remove the entry from your claude_desktop_config.json

</details>

<details> <summary><b>Option 5: Checkout locally ❌ Manual Updates (Requires Node.js)</b></summary>

git clone https://github.com/wonderwhy-er/DesktopCommanderMCP.git
cd DesktopCommanderMCP
npm run setup
Restart Claude if running.

The setup command will install dependencies, build the server, and configure Claude's desktop app.

❌ Auto-Updates: No - requires manual git updates 🔄 Manual Update: cd DesktopCommanderMCP && git pull && npm run setup 🗑️ Uninstall: Run npx @wonderwhy-er/desktop-commander@latest remove or remove the cloned directory and MCP server entry from Claude config

</details>

<details> <summary><b>Option 6: Docker Installation 🐳 ⭐ Auto-Updates (No Node.js Required)</b></summary>

Perfect for users who want isolation or don't have Node.js installed. Runs in a sandboxed Docker container with a persistent work environment.

Prerequisites: Docker Desktop installed and running, Claude Desktop app installed.

macOS/Linux:

bash <(curl -fsSL https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.sh)

Windows PowerShell:

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/wonderwhy-er/DesktopCommanderMCP/refs/heads/main/install-docker.ps1'))

The installer will check Docker, pull the image, prompt for folder mounting, and configure Claude Desktop.

Docker persistence: Your tools, configs, work files, and package caches all survive restarts.

<details> <summary>Manual Docker Configuration</summary>

Basic setup (no file access):

{
  "mcpServers": {
    "desktop-commander-in-docker": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/desktop-commander:latest"]
    }
  }
}

With folder mounting:

{
  "mcpServers": {
    "desktop-commander-in-docker": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/Users/username/Desktop:/mnt/desktop",
        "-v", "/Users/username/Documents:/mnt/documents",
        "mcp/desktop-commander:latest"
      ]
    }
  }
}

Advanced folder mounting:

{
  "mcpServers": {
    "desktop-commander-in-docker": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "dc-system:/usr",
        "-v", "dc-home:/root", 
        "-v", "dc-workspace:/workspace",
        "-v", "dc-packages:/var",
        "-v", "/Users/username/Projects:/mnt/Projects",
        "-v", "/Users/username/Downloads:/mnt/Downloads",
        "mcp/desktop-commander:latest"
      ]
    }
  }
}

</details>

<details> <summary>Docker Management Commands</summary>

macOS/Linux: ```bash

Install in Other Clients

Desktop Commander works with any MCP-compatible client. The standard JSON configuration is:

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

Add this to your client's MCP configuration file at the locations below:

<details> <summary><b>Cursor</b></summary><br>

Install MCP Server

View MCP Server in Directory

Or add manually to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project folder (project-specific).

See Cursor MCP docs for more info.

</details>

<details> <summary><b>Windsurf</b></summary>

Add to ~/.codeium/windsurf/mcp_config.json. See Windsurf MCP docs for more info.

</details>

<details> <summary><b>VS Code / GitHub Copilot</b></summary>

Add to .vscode/mcp.json in your project or VS Code User Settings (JSON). Make sure MCP is enabled under Chat > MCP. Works in Agent mode.

See VS Code MCP docs for more info.

</details>

<details> <summary><b>Cline</b></summary>

Configure through the Cline extension settings in VS Code. Open the Cline sidebar, click the MCP Servers icon, and add the JSON configuration above. See Cline MCP docs for more info.

</details>

<details> <summary><b>Roo Code</b></summary>

Add to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.

</details>

<details> <summary><b>Claude Code</b></summary>

claude mcp add --scope user desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest

Remove --scope user to install for the current project only. See Claude Code MCP docs for more info.

</details>

<details> <summary><b>Trae</b></summary>

Use the "Add manually" feature and paste the JSON configuration above. See Trae MCP docs for more info.

</details>

<details> <summary><b>Kiro</b></summary>

Navigate to Kiro > MCP Servers, click + Add, and paste the JSON configuration above. See Kiro MCP docs for more info.

</details>

<details> <summary><b>Codex (OpenAI)</b></summary>

Codex uses TOML configuration. Run this command to add Desktop Commander:

codex mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest

Or manually add to ~/.codex/config.toml:

[mcp_servers.desktop-commander]
command = "npx"
args = ["-y", "@wonderwhy-er/desktop-commander@latest"]

See Codex MCP docs for more info.

</details>

<details> <summary><b>JetBrains (AI Assistant)</b></summary>

In JetBrains IDEs, go to Settings → Tools → AI Assistant → Model Context Protocol (MCP), click + Add, select As JSON, and paste the JSON configuration above. See JetBrains MCP docs for more info.

</details>

<details> <summary><b>Gemini CLI</b></summary>

Add to ~/.gemini/settings.json:

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

See Gemini CLI docs for more info.

</details>

<details> <summary><b>Augment Code</b></summary>

Press Cmd/Ctrl+Shift+P, open the Augment panel, and add a new MCP server named desktop-commander with the JSON configuration above. See Augment Code MCP docs for more info.

</details>

<details> <summary><b>Qwen Code</b></summary>

Run this command to add Desktop Commander:

qwen mcp add desktop-commander -- npx -y @wonderwhy-er/desktop-commander@latest

Or add to .qwen/settings.json (project) or ~/.qwen/settings.json (global). See Qwen Code MCP docs for more info.

</details>

<details> <summary><b>ChatGPT / Claude Web (Remote MCP)</b></summary>

Use Desktop Commander from ChatGPT, Claude web, and other AI services via Remote MCP — no desktop app required.

👉 Get started at mcp.desktopcommander.app

How it works: 1. You run a lightweight Remote Device on your computer 2. It connects securely to the cloud Remote MCP service 3. Your AI sends commands through the cloud to your device 4. Commands execute locally, results return to your AI 5. You stay in control — stop anytime with Ctrl+C

Updating & Uninstalling Desktop Commander

Uninstalling Desktop Commander

🤖 Automatic Uninstallation (Recommended)

The easiest way to completely remove Desktop Commander:

npx @wonderwhy-er/desktop-commander@latest remove

This automatic uninstaller will: - ✅ Remove Desktop Commander from Claude's MCP server configuration - ✅ Create a backup of your Claude config before making changes - ✅ Provide guidance for complete package removal - ✅ Restore from backup if anything goes wrong

🔧 Manual Uninstallation

If the automatic uninstaller doesn't work or you prefer manual removal:

Remove from Claude Configuration

1. Locate your Claude Desktop config file: - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\Claude\claude_desktop_config.json - Linux: ~/.config/Claude/claude_desktop_config.json

2. Edit the config file: - Open the file in a text editor - Find and remove the "desktop-commander" entry from the "mcpServers" section - Save the file

Example - Remove this section:

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

Close and restart Claude Desktop to complete the removal.

🆘 Troubleshooting

If automatic uninstallation fails: - Use manual uninstallation as a fallback

If Claude won't start after uninstalling: - Restore the backup config file created by the uninstaller - Or manually fix the JSON syntax in your claude_desktop_config.json

Need help? - Join our Discord community: https://discord.com/invite/kQ27sNnZr7

Getting Started

Once Desktop Commander is installed and Claude Desktop is restarted, you're ready to supercharge your Claude experience!

Docker Support

Installation Instructions

1. Install Docker for Windows/Mac - Download and install Docker Desktop from docker.com

2. Get Desktop Commander Docker Configuration - Visit: https://hub.docker.com/mcp/server/desktop-commander/manual - Option A: Use the provided terminal command for automated setup - Option B: Click "Standalone" to get the config JSON and add it manually to your Claude Desktop config docker-config.png

3. Mount Your Machine Folders (Coming Soon) - Instructions on how to mount your local directories into the Docker container will be provided soon - This will allow you to work with your files while maintaining complete isolation

Benefits of Docker Usage

  • Complete isolation from your host system
  • Consistent environment across different machines
  • Easy cleanup - just remove the container when done
  • Perfect for testing new features or configurations

For npx installations, modify your claude_desktop_config.json:

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

When onboarding is automatically disabled: - When the MCP client name is set to "desktop-commander" - When using the --no-onboarding flag - After users have used onboarding prompts or made 10+ tool calls

Debug information: The server will log when onboarding is disabled: "Onboarding disabled via --no-onboarding flag"

Or if installed locally

npm run setup:debug ```

This will: 1. Configure Claude to use a separate "desktop-commander" server 2. Enable Node.js inspector protocol with --inspect-brk=9229 flag 3. Pause execution at the start until a debugger connects 4. Enable additional debugging environment variables

To connect a debugger: - In Chrome, visit chrome://inspect and look for the Node.js instance - In VS Code, use the "Attach to Node Process" debug configuration - Other IDEs/tools may have similar "attach" options for Node.js debugging

Important debugging notes: - The server will pause on startup until a debugger connects (due to the --inspect-brk flag) - If you don't see activity during debugging, ensure you're connected to the correct Node.js process - Multiple Node processes may be running; connect to the one on port 9229 - The debug server is identified as "desktop-commander-debug" in Claude's MCP server list

Troubleshooting: - If Claude times out while trying to use the debug server, your debugger might not be properly connected - When properly connected, the process will continue execution after hitting the first breakpoint - You can add additional breakpoints in your IDE once connected

I'm having trouble installing or using the tool. Where can I get help?

Join our Discord server for community support, check the GitHub issues for known problems, or review the full FAQ for troubleshooting tips. You can also visit our website FAQ section for a more user-friendly experience. If you encounter a new issue, please consider opening a GitHub issue with details about your problem.

Usage

The server provides a comprehensive set of tools organized into several categories:

Quick Examples

Data Analysis:

"Analyze sales.csv and show top customers" → Claude runs Python code in memory

Remote Access:

"SSH to my server and check disk space" → Claude maintains SSH session

Development:

"Start Node.js and test this API" → Claude runs interactive Node session

Tool Usage Examples

Search/Replace Block Format: ``` filepath.ext <<<<<<< SEARCH

🐳 Isolated Environment Usage

Desktop Commander can be run in Docker containers for complete isolation from your host system, providing zero risk to your computer. This is perfect for testing, development, or when you want complete sandboxing.

What are the most common use cases?

  • Exploring and understanding complex codebases
  • Generating diagrams and documentation
  • Automating tasks across your system
  • Working with multiple projects simultaneously
  • Making surgical code changes with precise control

Automatic Updates (Options 1, 2, 3, 4 & 6)

Options 1 (npx), Option 2 (bash installer), 3 (Smithery), 4 (manual config), and 6 (Docker) automatically update to the latest version whenever you restart Claude. No manual intervention needed.

Manual Updates (Option 5)

  • Option 5 (local checkout): cd DesktopCommanderMCP && git pull && npm run setup

Configuration Management

Configuration Tools

You can manage server configuration using the provided tools:

// Get the entire config
get_config({})

// Set a specific config value
set_config_value({ "key": "defaultShell", "value": "/bin/zsh" })

// Set multiple config values using separate calls
set_config_value({ "key": "defaultShell", "value": "/bin/bash" })
set_config_value({ "key": "allowedDirectories", "value": ["/Users/username/projects"] })

The configuration is saved to config.json in the server's working directory and persists between server restarts.

Understanding fileWriteLineLimit

The fileWriteLineLimit setting controls how many lines can be written in a single write_file operation (default: 50 lines). This limit exists for several important reasons:

Why the limit exists: - AIs are wasteful with tokens: Instead of doing two small edits in a file, AIs may decide to rewrite the whole thing. We're trying to force AIs to do things in smaller changes as it saves time and tokens - Claude UX message limits: There are limits within one message and hitting "Continue" does not really work. What we're trying here is to make AI work in smaller chunks so when you hit that limit, multiple chunks have succeeded and that work is not lost - it just needs to restart from the last chunk

Setting the limit:

// You can set it to thousands if you want
set_config_value({ "key": "fileWriteLineLimit", "value": 1000 })

// Or keep it smaller to force more efficient behavior
set_config_value({ "key": "fileWriteLineLimit", "value": 25 })

Maximum value: You can set it to thousands if you want - there's no technical restriction.

Best practices: - Keep the default (50) to encourage efficient AI behavior and avoid token waste - The system automatically suggests chunking when limits are exceeded - Smaller chunks mean less work lost when Claude hits message limits

Command Line Options

Desktop Commander supports several command line options for customizing behavior:

Do I need to pay for API credits?

No. This tool works with Claude Desktop's standard Pro subscription ($20/month), not with API calls, so you won't incur additional costs beyond the subscription fee.

Model Context Protocol Integration

This project extends the MCP Filesystem Server to enable: - Local server support in Claude Desktop - Full system command execution - Process management - File operations - Code editing with search/replace blocks

Created as part of exploring Claude MCPs: https://youtube.com/live/TlbjFDbl5Us

Frequently Asked Questions

Here are answers to some common questions. For a more comprehensive FAQ, see our detailed FAQ document.

🇨🇳 中文文档镜像 AI 翻译 2026-05-23
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

Desktop Commander MCP 是一个桌面命令行工具,允许用户通过 Remote MCP 远程控制 ChatGPT、Claude Web 和其他 AI 服务。它还提供了文件预览 UI、增强的终端命令和交互式进程控制功能。

⚡ 功能介绍

Desktop Commander MCP 的主要功能包括:远程 AI 控制、文件预览 UI、增强的终端命令和交互式进程控制。它还提供了文件预览、展开/折叠、打开文件夹、加载更多行和文本选择等功能。

🛠 安装步骤(Docker/pip/源码)

Desktop Commander MCP 可以通过多种方式安装,包括通过 npx、bash 安装器、Smithery 和 Docker 等方式。用户可以选择安装最新版本或手动更新。

🚀 使用教程

Desktop Commander MCP 提供了一个综合的工具集,包括数据分析、远程访问和开发等功能。用户可以通过命令行接口使用这些工具,例如分析销售数据、SSH 到服务器或启动 Node.js 等。

⚙️ 配置说明(含 MCP / env)

Desktop Commander MCP 支持自动更新功能,用户可以选择使用 npx、bash 安装器、Smithery 或 Docker 等方式进行自动更新。手动更新可以通过 Git 检出和 npm 运行设置等方式进行。

🔌 API 说明

Desktop Commander MCP 不需要付费 API 信用,用户可以使用 Claude Desktop 的标准 Pro 订阅($20/月)即可使用工具。

🔄 工作流/模块

Desktop Commander MCP 扩展了 MCP 文件系统服务器,支持本地服务器、全系统命令执行、进程管理、文件操作和代码编辑等功能。

❓ FAQ 摘要

Desktop Commander MCP 的常见问题包括安装、使用、配置和 API 等方面。用户可以参考 FAQ 文档获取更多信息。

🎯 aiskill88 AI 点评 A 级 2026-05-19

优秀的MCP扩展实现,为Claude提供强大系统操作能力。代码质量高、维护活跃,6k星证明社区认可度高。安全配置需重视。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
DesktopCommanderMCP 中文教程DesktopCommanderMCP 安装报错怎么办DesktopCommanderMCP MCP 配置DesktopCommanderMCP 与同类工具对比DesktopCommanderMCP 最佳实践DesktopCommanderMCP 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +GitHub 6.0k Star,社区高度认可
  • +MIT 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

可以,建议在隔离环境运行,严格限制执行权限和命令白名单。
💡 AI Skill Hub 点评

经综合评估,桌面命令MCP服务器 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 桌面命令MCP服务器
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 DesktopCommanderMCP
原始描述 开源MCP工具:This is MCP server for Claude that gives it terminal control, file system search。⭐6.0k · TypeScript
Topics MCP服务终端控制文件搜索Claude扩展TypeScript
GitHub https://github.com/wonderwhy-er/DesktopCommanderMCP
License MIT
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/wonderwhy-er/DesktopCommanderMCP 🌐 官方网站  https://desktopcommander.app/

收录时间:2026-05-14 · 更新时间:2026-05-16 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →