MarkTechPost@AI 06月01日 22:36
Guide to Using the Desktop Commander MCP Server
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

Desktop Commander MCP Server是一个强大的工具,它将所有开发操作集中在一个聊天界面中。基于MCP文件系统服务器构建,允许你搜索、编辑和管理文件,运行终端命令,并直接通过桌面控制进程,使用模型上下文协议(MCP)。本文介绍了如何配置和使用该服务器,以实现文件管理、终端控制等功能,提供了详细的步骤和配置说明,帮助用户高效地进行开发工作。

💻 终端与进程控制:Desktop Commander支持执行终端命令,并提供实时输出流。用户可以设置超时时间,在后台运行命令,并管理长时间运行的任务会话。此外,它还允许列出和终止正在运行的进程,并提供详细信息。

⚙️ 配置管理:该服务器允许获取或设置服务器设置,如默认Shell、被阻止的命令、允许访问的目录以及是否启用遥测等。用户可以应用更改,而无需重启服务器。

📁 文件系统操作:Desktop Commander支持读取和写入文件,并可以按行进行限制。用户可以追加或覆盖文件内容,创建和列出目录,移动或重命名文件和文件夹,以及获取文件和目录的元数据。此外,还支持按名称搜索文件(不区分大小写)。

⌨️ 代码和文本编辑:该工具能够执行精确的文本替换,例如更改配置值。用户可以重写整个文件以进行重大更新,并在多个文件中搜索和替换模式。它使用vscode-ripgrep进行快速递归文本/代码搜索。

📝 审计日志记录:所有操作都会被记录,包括时间戳和参数。日志会自动轮换,大小限制为10MB,以避免混乱。

The Desktop Commander MCP Server is a powerful tool that brings all your development operations into one chat interface. Built on top of the MCP Filesystem Server, it allows you to search, edit, and manage files, run terminal commands, and control processes directly from your desktop using the Model Context Protocol (MCP).

Following are the core capabilities of the Desktop Commander MCP server:

Terminal & Process Control

Configuration Management

Filesystem Operations

Code & Text Editing

Audit Logging

In this tutorial, we will be connecting Claude desktop with the MCP server and perform some tasks.

Step 1: Setting up dependencies

Node JS

We need npx to run the Desktop Commander server, which comes with Node.js.

Claude Desktop

Download Claude using https://claude.ai/download.

Step 2: Configuring the MCP Server

Next, configure Claude to connect to your MCP server. Open the claude_desktop_config.json file located in the Claude installation directory using any text editor. If the file doesn’t exist, you can create it manually. Once opened, enter the following code:

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

Step 3: Running the server

Once the MCP configuration is complete, your server should appear in Claude. The Desktop Commander server is a powerful interface, offering 18 tools for tasks like file management, terminal execution, process control, and more.


Feel free to follow us on Twitter and don’t forget to join our 95k+ ML SubReddit and Subscribe to our Newsletter.

The post Guide to Using the Desktop Commander MCP Server appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Desktop Commander MCP Server 开发工具 文件管理 终端控制
相关文章